new-feature
Scaffold a new feature package the canonical way and wire it into the app. This is the ONLY correct way to start a feature (ARCHITECTURE.md §5, §10.2 "one way to do a thing").
- License 许可
- MIT
- 最近更新
- 2026-07-16
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- new-feature
- description
- Scaffold a new feature package the canonical way and wire it into the app. This is the ONLY correct way to start a feature (ARCHITECTURE.md §5, §10.2 "one way to do a thing").
03 SKILL.md 正文
New feature
pnpm new-feature <kebab-name> # e.g. pnpm new-feature order-history
pnpm install # link the new workspace package
The generator prints the exact two lines to register the route in
apps/app/src/router.tsx (import + the replacement routeTree line). Apply them.
Then, per the Definition of Done (ARCHITECTURE.md §5):
- Spec
docs/specs/FEAT-xxxx-<name>.mdexists; update the feature's CLAUDE.md with the real id. - Screen contract
use<Pascal>Screenimplements the spec; tests cover its acceptance criteria (Given/When/Then → test names). - Server state via generated query hooks only; errors as values (
Result, §7.2); noif (platform). - UI uses
@app/uicomponents; new DS components need stories (§8.1). pnpm verifygreen; visually verify the screen (skill: screenshot-verify).
Structure produced (never hand-roll or copy-paste a feature):
packages/features/<name>/
├── package.json / tsconfig.json / vitest.config.ts / CLAUDE.md
└── src/ index.ts (public entry) · routes.tsx · screens/<Pascal>Screen.tsx
· screens/use<Pascal>Screen.ts · __tests__/
Features may import other features ONLY via their package entry (@app/feature-*),
never deep paths — the boundaries linter enforces this.
04 同仓库更多 Skills
screenshot-verify
Visually verify a UI change in the browser (app dev server, production/PWA build, or Storybook) before claiming it works. The primary agent verification loop (ARCHITECTURE.md §10.6) — no emulator needed.
run-android
Build, deploy and visually verify the app on an Android emulator or device via the Capacitor shell, then verify with Maestro. Use when a change touches the native shell, plugins, or needs on-device confirmation.
implement-spec
Implement a feature end-to-end from its FEAT-xxxx spec — scaffold, code to the fixed contracts, tests per the Verification mapping, full verification pyramid, self-review, MR-ready summary. Usage - /implement-spec FEAT-0002. The spec is the single source of truth; do not invent requirements.
build-verify
Verify this repo exactly like CI does (lint, format, boundaries, dep-cruise, typecheck, tests, build) and fix the common failure classes. Use before claiming any change is done, and to reproduce CI failures locally.
screenshot-verify
暂无简介
run-android
暂无简介