From team-skills
Automate the setup of a new feature branch: create branch, scaffold directory, pull latest, generate API contract template.
How this skill is triggered — by the user, by Claude, or both
Slash command
/team-skills:start-featureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Automate the setup of a new feature branch: create branch, scaffold directory, pull latest, generate API contract template.
Automate the setup of a new feature branch: create branch, scaffold directory, pull latest, generate API contract template.
团队架构参考: https://lucian-why.github.io/team-skills/team-architecture.html
Core principle: One command to go from "I need to start X" to "ready to code".
Announce at start: "I'm using the start-feature skill to set up a new feature."
git status --porcelain
If uncommitted changes exist:
⚠️ You have uncommitted changes:
M src/services/auth.service.ts
?? src/temp.ts
Options:
1. Stash and continue (git stash)
2. Commit first, then start new feature
3. Abort
Don't proceed until working tree is clean.
Ask the user (2-3 questions max):
新功能信息:
1. 功能名称?(用于分支名和目录名)
2. 简单描述这个功能做什么?(用于接口契约模板)
Naming rules:
feature/<name> or fix/<name>, kebab-casefeatures/<name>/, same as branch namefeature/user-profile → features/user-profile/git checkout main 2>/dev/null || git checkout master 2>/dev/null
git pull origin main 2>/dev/null || git pull origin master 2>/dev/null
git checkout -b feature/<name>
Create the standard feature directory structure:
features/<name>/
├── components/ # UI components
├── api/ # API routes
├── service/ # Business logic
└── tests/ # Tests
mkdir -p features/<name>/{components,api,service,tests}
If the project uses a different structure, match the existing pattern.
Create a template file for the feature's API contract:
# <Feature Name> API Contract
## Endpoints
### GET /api/<name>
- Description: <what it does>
- Request: <params>
- Response: <shape>
### POST /api/<name>
- Description: <what it does>
- Request Body: <shape>
- Response: <shape>
## Data Models
### <ModelName>
- field1: type — description
- field2: type — description
## Notes
- <any constraints, auth requirements, etc.>
Save as features/<name>/CONTRACT.md.
✅ Feature setup complete:
Branch: feature/user-profile
Directory: features/user-profile/
Contract: features/user-profile/CONTRACT.md
Next steps:
1. Edit CONTRACT.md to define your API
2. Start coding in features/user-profile/
3. When done, say "推送" to run pre-push
| What | How |
|---|---|
| Branch naming | feature/<kebab-name> or fix/<kebab-name> |
| Directory | features/<name>/ with components/api/service/tests |
| Contract | features/<name>/CONTRACT.md — fill before coding |
| Pre-requisite | Clean working tree (stash or commit first) |
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub lucianwhy/team-skills --plugin team-skills