Skip to content
Development
Skill

/new-service

Scaffold a new API service with request functions, Zod schemas, URL constants, and optional MSW mock handlers. Use this skill whenever the user asks to "add a service", "create the projects API", "scaffold a new GAIA service", "wire up CRUD for users", or anything implying a new

From plugin
gaia-react-gaia
2320 skills10 agents14 commands
Install
$ npx -y skills add gaia-react/gaia --skill new-service --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/new-service

Context preview

The summary Claude sees to decide when to auto-load this skill.

Scaffold a new API service with request functions, Zod schemas, URL constants, and optional MSW mock handlers. Use this skill whenever the user asks to "add a service", "create the projects API", "scaffold a new GAIA service", "wire up CRUD for users", or anything implying a new

SKILL.md

new-service.SKILL.md
name: new-service
description: Scaffold a new API service with request functions, Zod schemas, URL constants, and optional MSW mock handlers. Use this skill whenever the user asks to "add a service", "create the projects API", "scaffold a new GAIA service", "wire up CRUD for users", or anything implying a new folder under `app/services/gaia/{name}/` with parsers/types/requests + matching `test/mocks/{name}/` collections.
model: haiku

new-service

Trigger: user asks to scaffold an API service.

Workflow

1. Confirm: name (kebab), endpoints, schema (`name:type` pairs), with mocks? 2. Run: `.gaia/cli/gaia scaffold service <name> --endpoints "..." --schema "..." [--mocks]` 3. Verify: `pnpm typecheck` clean; if `--mocks`, run a single MSW round-trip in a vitest test. 4. Wire the service into the consuming page/hook (CLI does not do this, manual).

Flags

  • `--endpoints "get,post,put,delete"`, required (subset of get/post/put/delete)
  • `--schema "id:string,name:string,status:enum(active,archived)"`, required
  • `--mocks`, also emit MSW mock collection
  • `--json`, emit `ScaffoldResult` JSON

Schema types: `string`, `number`, `boolean`, `datetime`, `enum(a,b,...)`. Append `?` for optional.

See

  • `wiki/concepts/API Service Pattern.md`, pattern source of truth
  • `.claude/rules/api-service.md`, quick pointer
Ships withgaia-react-gaia

Claude is raw power. GAIA is order and focus. The foundation that keeps Claude-shipped code production-grade as your team scales. The React frontend is handled. You build the rest of your app on top. Every convention enforced in code.

Get the whole plugin

Other skills on gaia-react-gaia.