feature-orchestrator
npx skills add https://github.com/womendefiningai/claude-code-skills --skill feature-orchestrator
Agent 安装分布
Skill 文档
Feature Orchestrator Skill
ð¨ CRITICAL: This Skill Runs BEFORE Feature Implementation
Purpose: Enforce research-backed CI/CD workflow, prevent code duplication, ensure incremental delivery
When to invoke: Automatically when user requests implementing ANY new feature, component, or functionality
Auto-invoke triggers:
- “implement X feature”
- “add Y functionality”
- “build Z component”
- “create new X”
- “develop X feature”
What this skill does NOT apply to:
- Bug fixes (< 10 lines changed)
- Simple content/text updates
- Documentation-only changes
- Configuration tweaks
ð Research Foundation
This workflow is backed by industry research from Google, Microsoft, IEEE, and leading software engineering organizations:
Incremental Development (Scrum.org, 2024):
“Incremental delivery enables organizations to have greater visibility, decreases risks faster, delivers value sooner.”
Continuous Integration (Harness.io, 2024):
“Small problems are easier to fix than big problems, and frequent commits make bugs easier to identify.”
Code Review (Microsoft Research):
“Reviewing 200â400 lines of code at a time detects up to 90% of defects.”
DRY Principle (MetriDev, 2024):
“Abstraction and modularity prevent code duplication through identifying common patterns for reuse.”
For complete research citations and detailed procedures: See REFERENCE.md
ð¯ Four-Phase Workflow
Overview
| Phase | Purpose | Time | Output |
|---|---|---|---|
| 1. Gap Analysis | Search for existing code | 2-3 min | Reuse opportunities identified |
| 2. Planning | Break into increments | 3-5 min | Implementation plan with todos |
| 3. Review Gate | Agent quality review | 1-2 min | Feedback incorporated |
| 4. Execution | Build incrementally | Varies | Feature complete, tests passing |
Phase 1: Gap Analysis (MANDATORY)
Purpose: Search for existing implementations BEFORE writing any code
Research: DRY principle – < 5% duplication target (SonarQube standard)
Quick Procedure:
# Search existing code
glob "**/*[keyword]*.tsx"
grep "[keyword]" --output_mode files_with_matches
# If found: Reuse or extend
# If not found: Create new with plan
Template: Use resources/gap-analysis-template.md
Detailed procedures: See REFERENCE.md â Phase 1
Verification:
- Searched for existing implementations?
- Identified reuse opportunities?
- Reported findings to user?
If similar code exists: Plan to extend/reuse â NO duplication
Phase 2: Implementation Planning (MANDATORY per CLAUDE.md)
Purpose: Break feature into incremental, testable steps
Research: Agile INVEST criteria – Independent, Negotiable, Valuable, Estimable, Small, Testable
Required Elements:
- Objective – What & Why & Success criteria
- Technical Approach – Components, data flow, architecture
- Incremental Steps – 30-60 min each, < 100 LOC each
- Testing Strategy – Unit, integration, E2E, accessibility
- Performance – React.memo(), useMemo(), code splitting
- Rollback Plan – Feature flags, gradual rollout
Template: Use resources/implementation-plan-template.md
Detailed procedures: See REFERENCE.md â Phase 2
Create TodoWrite Tracking:
TodoWrite({
todos: [
{
content: "Step 1: Description",
activeForm: "Step 1: Active form",
status: "pending"
},
// ... all steps
]
})
Present plan to user â Get approval before proceeding
Phase 3: Review Gate (CONDITIONAL)
Purpose: Invoke specialized agents for code/design review
Research: Google code reviews < 4 hour median latency for fast feedback
Decision Matrix:
| Criteria | Threshold | Action |
|---|---|---|
| Lines of code | > 100 | Invoke critic-agent |
| Security critical | Auth, payments | Always review |
| User-facing UI | Any | Invoke ui-ux-designer |
| Simple addition | < 50 lines | Skip review |
Invoke Agents in Parallel:
Use Task tool with multiple calls in ONE message:
1. Task(subagent_type="critic-agent") â Code quality
2. Task(subagent_type="ui-ux-designer") â UX/accessibility
After review: Incorporate feedback â Update plan â Update todos
Detailed procedures: See REFERENCE.md â Phase 3
Phase 4: Incremental Execution (MANDATORY)
Purpose: Implement feature in small, testable increments
Research: CI with frequent commits reduces integration issues (ResearchGate, 2024)
The Golden Rule: NEVER Break the Build
For EACH increment:
1. Mark todo as "in_progress"
2. Implement (keep changes < 100 lines)
3. Test (MANDATORY - all must pass):
npm run lint # Must pass
npm run type-check # Must pass
npm run test # Must pass
# Or use automation:
./scripts/validate-increment.sh # Linux/Mac
./scripts/validate-increment.bat # Windows
4. Mark todo as "completed" (immediately!)
5. Commit (if appropriate)
6. ONLY proceed if ALL tests pass
Template: Use resources/increment-checklist-template.md
Code Quality Rules:
- Component size: < 200 lines (React), < 250 lines (services)
- Data separation: Arrays >20 lines â data files
- Performance: React.memo() for animations, expensive components
- Imports: No file extensions, use path aliases (@/…)
- Accessibility: WCAG 2.1 AA compliance
File Size Monitoring:
# Check before editing
./scripts/check-file-size.sh [file-path]
# Thresholds:
# 150-200 lines â â ï¸ Plan extraction
# 200-300 lines â ð¨ Extract before adding
# 300+ lines â ð MUST refactor first
Detailed procedures: See REFERENCE.md â Phase 4
Verification (per increment):
- Implemented ONLY this increment’s scope?
- All tests passing?
- Todo marked completed?
ð Complete Workflow Example
See EXAMPLES.md for:
- Complete auth system implementation (2.5 hours)
- Simple feature addition (5 minutes)
- Gap analysis preventing duplication
- Review gate catching security issues
ð¯ Integration with CLAUDE.md Rules
This skill enforces ALL mandatory CLAUDE.md rules:
- â Search for existing code FIRST (Phase 1: Gap Analysis)
- â Plan before implementing (Phase 2: Implementation Planning)
- â Incremental implementation (Phase 4: Never break the build)
- â Test between increments (Phase 4: lint + type-check + test)
- â React.memo() for performance (Phase 4: Code quality rules)
- â Coordinate agents (Phase 3: Review gate)
- â TodoWrite tracking (Phase 2 + Phase 4)
- â Component size limits (Phase 4: File size monitoring)
ð¨ Anti-Patterns This Skill Prevents
â What NOT to Do:
- Starting without gap analysis â Skill forces search first
- No implementation plan â Skill requires incremental plan
- Large commits â Skill enforces small increments
- Breaking the build â Skill tests after each increment
- Skipping code review â Skill invokes agents automatically
- Giant components (>300 lines) â Skill monitors file size
- Missing optimization â Skill checks React.memo(), etc.
ð Verification Checklist (Before Completing)
Before marking feature complete, verify:
- Phase 1: Gap analysis completed?
- Phase 1: Existing code reused where possible?
- Phase 2: Implementation plan created?
- Phase 2: TodoWrite tracking set up?
- Phase 3: Agent review completed (if needed)?
- Phase 4: All increments implemented?
- Phase 4: All todos marked complete?
- Phase 4: All tests passing?
- Phase 4: No breaking changes introduced?
- Phase 4: Performance optimized?
- Phase 4: Accessibility verified (WCAG 2.1 AA)?
- Phase 4: Component sizes within limits?
If any answer is NO, STOP and complete that phase.
ð Expected Outcomes
When this skill runs successfully:
- â No duplicate code – Gap analysis finds existing implementations
- â No redundancy – Reuses existing components/services
- â Well-planned – Clear roadmap with time estimates
- â Incrementally built – Small, testable steps
- â High quality – Agent reviews catch issues early
- â Well-tested – Tests run after each increment
- â Performant – Optimization applied automatically
- â Accessible – WCAG compliance checked
- â Maintainable – Component sizes controlled
- â Tracked – TodoWrite shows clear progress
ð Success Metrics
Measure skill effectiveness:
- â Zero duplicate implementations in last 10 features
- â All features have implementation plans
- â No surprise breaking changes in commits
- â Test pass rate > 95% on first try
- â Code review feedback declining over time
- â Component sizes staying within limits
- â Feature delivery time predictable (within 20% of estimate)
For detailed metrics and KPIs: See REFERENCE.md â Success Metrics
ð§ Automation Scripts
Validate increments:
# Linux/Mac
./scripts/validate-increment.sh
# Windows
./scripts/validate-increment.bat
Check file sizes:
./scripts/check-file-size.sh [file-path]
All scripts include:
- Research citations
- Clear pass/fail status
- Actionable recommendations
- Exit codes for CI/CD integration
ð Supporting Documentation
For AI Assistants:
REFERENCE.md– Complete research citations, detailed procedures, troubleshootingEXAMPLES.md– Real-world workflow examples, before/after scenariosresources/gap-analysis-template.md– Gap analysis structureresources/implementation-plan-template.md– Complete planning templateresources/increment-checklist-template.md– Per-increment verification
Research Sources:
Academic:
- Google Research: “Modern Code Review” (9M reviews analyzed)
- Microsoft Research: “Expectations of Modern Code Review” (900+ devs surveyed)
- IEEE: “Continuous Integration Research” (meta-analysis)
- Scrum.org: “Incremental Delivery Research” (2024)
Industry:
- SonarQube: Code quality standards
- Atlassian: Trunk-based development
- Harness.io: CI/CD best practices
- MetriDev: Code duplication research
Books:
- “The DevOps Handbook” (Gene Kim)
- “Accelerate” (Nicole Forsgren)
- “Building Maintainable Software” (O’Reilly)
ð¡ Tips for Maximum Effectiveness
- Trust the process – Let all 4 phases run
- Don’t skip gap analysis – Even if you “know” nothing exists
- Break steps small – 30-45 min increments ideal
- Test frequently – After EVERY increment
- Use agent reviews – They catch issues you miss
- Keep todos updated – Reflects real progress
- Use automation – Scripts save time and reduce errors
ð Integration with Other Skills
Works with:
- code-refactoring – Triggered when files exceed size limits
- ui-ux-audit – Invoked during Phase 3 for UI features
- devops-deployment – After Phase 4 for production deployment
- qa-testing – Referenced in Phase 2 for test strategy
Final Note
This skill is not optional. When user requests implementing any feature, this skill MUST run to enforce research-backed CI/CD workflow rules.
The goal: Ship high-quality features faster by preventing common mistakes through automation.
Research-backed. Industry-proven. Battle-tested.
Version History
- v1.0 (Oct 2025): Initial version based on CLAUDE.md
- v2.0 (Nov 2025): Added research citations, progressive disclosure, automation scripts, templates
For complete version history and detailed research: See REFERENCE.md