CtrlK
BlogDocsLog inGet started
Tessl Logo

ssi-salamancasolutioninternational/react-service

Safely insert new methods into existing API + domain service files

58

Quality

73%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

SKILL.md

name:
react-service-update
description:
Safely updates existing React API + domain services by inserting new methods without replacing full files or class bodies.

Context

Use this skill only when the task is updating service files:

  • add endpoints
  • add methods
  • keep previous methods untouched

If the task is creating a brand-new service pair, use the creation skill.

Target files

src/api/services/CATEGORY/SERVICE_NAME.api.service.ts
src/api/services/CATEGORY/SERVICE_NAME.service.ts

Parameters to infer (do not print as a checklist)

  • CATEGORY
  • SERVICE_NAME (kebab-case)
  • HTTP_METHOD (get|post|put|patch|delete)
  • API_FN (camelCase)
  • SERVICE_FN (camelCase)
  • ENDPOINT_PATH

Hard rules

  1. Never replace full file content.
  2. Never replace the whole class body.
  3. Insert only new methods inside existing classes.
  4. If API_FN/SERVICE_FN already exists, do not duplicate.
  5. Preserve previous methods (no regressions).

Missing file policy

If one target file is missing, create a minimal scaffold first (per update-rs-2.md), then insert methods. Do not rewrite populated files.

Insert rules

API class

  • Insert after the last existing method.
  • If no methods exist: insert after constructor if present, otherwise after {.
  • Use template per HTTP method:
    • get: api.get(..., { params: data })
    • post|put|patch: api.<method>(..., data)
    • delete: match current file style

Domain class

  • Delegate via this.apiService (or existing instance name in file).
  • Keep current error-handling style; if absent, use .then/.catch with console.error + rethrow.

Process

Read -> check duplicates -> insert in class -> verify existing methods remain -> save.

Suggested completion output

API: API_FN added or already existed in CATEGORY/SERVICE_NAME.api.service.ts
SERVICE: SERVICE_FN added or already existed in CATEGORY/SERVICE_NAME.service.ts

SKILL.md

tile.json