CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

dev-create-service

Use when adding API integration to a module - creates types, contracts, adapter, and service layer.

Quality

86%

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

SKILL.md
Quality
Evals
Security

Create the complete data layer for a resource following docs/ARCHITECTURE.md sections 4.1-4.3.

Resource: $ARGUMENTS

Steps

  1. Read docs/ARCHITECTURE.md sections 4.1 (Services), 4.2 (Adapters), 4.3 (Types).

  2. Ask the user:

    • What is the endpoint base URL? (e.g. /v4/marketplace)
    • What is the response JSON format? (ask for an example or describe the fields)
    • Which operations? (GET list, GET by ID, POST, PATCH, DELETE)
  3. Create in order:

    a. types/[resource].types.ts -- mirrors API exactly (snake_case) b. types/[resource].contracts.ts -- app contract (camelCase, correct types) c. adapters/[resource]-adapter.ts -- inbound (API->App) + outbound (App->API) d. services/[resource]-service.ts -- HTTP only, no try/catch, no transformation

  4. Required rules:

    • Service: NO try/catch, NO .map()/.filter()/new Date()
    • Adapter: pure functions, no side effects
    • Types separated: .types.ts (API) != .contracts.ts (App)
    • Service is usable in both Server Components and Client Components
  5. Validate: npx tsc --noEmit

Repository

fernandezbaptiste/specialist-agent

Path

packs/nextjs/skills/dev-create-service/SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.