Best for
- Use when asked to build, add, create, scaffold, or set up a new feature, endpoint, component, or UI capability.
yonatangross/orchestkit/src/skills/implement/SKILL.md
Full-power feature implementation using parallel subagents for backend, frontend, testing, and security, with worktree isolation and quality verification in one workflow. Chains with /ork:cover for tests and /ork:verify for validation. Use when asked to build, add, create, scaffold, or set up a new feature, endpoint, component, or UI capability. Not for fixing a bug, reviewing, explaining, testing, or comparing existing code.
Decision brief
Parallel subagent execution for feature implementation with scope control and reflection.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/yonatangross/orchestkit --skill "src/skills/implement"Inspect the Agent Skill "implement" from https://github.com/yonatangross/orchestkit/blob/1ff988bd66daf223028ed44767b591fecc8510c2/src/skills/implement/SKILL.md at commit 1ff988bd66daf223028ed44767b591fecc8510c2. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Review the “Quick Start” section in the pinned source before continuing.
Run BEFORE any other step. Detect available MCP servers and check for resumable state.
Review the “"Resuming from Phase {N} — architecture decided in previous session"” section in the pinned source before continuing.
pct = tokensAsContextPct(tokensUsedSoFar) from lib/context-window.ts remaining = max(0, 100 - pct) state["budgetremainingpct"] = remaining Write(".claude/chain/state.json", JSON.stringify(state)) python AskUserQuestion(questions=[{ "question": "Isolate this feature in a git work…
If .claude/chain/assess-verdict.json exists with a feature matching this run and verdict == "fail" (composite < the 5.5 minpass in ${CLAUDEPLUGINROOT}/skills/assess/rubric.json, or any dimension below its minblocker), BLOCK Phase 1. Present each blockers[] entry (dimension, scor…
Permission review
The documentation asks the agent to read local files, directories, or repositories.
Scan codebase signals and classify into tiers 1-6 (Interview through Open Source). Each tier sets an architecture ceiling and determines which phases/agents to use.The documentation includes network, browsing, or remote request actions.
WebFetch("https://docs.example.com/api") # T1 fallbackEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 96/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 224 | Source | Repository attention, not individual Skill quality |
| Compatibility | 1 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Parallel subagent execution for feature implementation with scope control and reflection.
/ork:implement user authentication
/ork:implement --model=opus real-time notifications
/ork:implement dashboard analytics
FEATURE_DESC = "$ARGUMENTS" # Full argument string, e.g., "user authentication"
# $ARGUMENTS[0] is the first token, $ARGUMENTS[1] second, etc. (CC 2.1.59)
# Model override detection (CC 2.1.72)
MODEL_OVERRIDE = None
for token in "$ARGUMENTS".split():
if token.startswith("--model="):
MODEL_OVERRIDE = token.split("=", 1)[1] # "opus", "sonnet", "haiku", "fable"
FEATURE_DESC = FEATURE_DESC.replace(token, "").strip()
Pass MODEL_OVERRIDE to all Agent() calls via model=MODEL_OVERRIDE when set. Accepts symbolic names (opus, sonnet, haiku, fable on harnesses whose Agent tool lists it; note fable is premium API spend after 2026-07-12) or full IDs (claude-opus-4-8) per CC 2.1.74.
Run BEFORE any other step. Detect available MCP servers and check for resumable state.
# Probe MCPs (parallel — all in ONE message):
# memory is alwaysLoad in .mcp.json (CC 2.1.121+, #1541) — probe below kept as fallback for older CC:
ToolSearch(query="select:mcp__memory__search_nodes")
ToolSearch(query="select:mcp__context7__resolve-library-id")
Write(".claude/chain/capabilities.json", JSON.stringify({
"memory": <true if found>,
"context7": <true if found>,
"timestamp": now()
}))
# Resume check:
Read(".claude/chain/state.json")
# If exists and skill == "implement":
# Read last handoff (e.g., 04-architecture.json)
# Skip to current_phase
# "Resuming from Phase {N} — architecture decided in previous session"
# If not: write initial state
Write(".claude/chain/state.json", JSON.stringify({
"skill": "implement", "feature": FEATURE_DESC,
"current_phase": 1, "completed_phases": [],
"capabilities": capabilities,
"budget_remaining_pct": 100 // advisory; see Budget Awareness below
}))
For implementations touching >10 files, enforce max 5 files per agent batch, run tests between batches, commit green batches immediately, stop on red. Override via --batch-size N. Full rule: Read("${CLAUDE_PLUGIN_ROOT}/skills/implement/rules/batch-governance.md").
Opus 5 exposes per-task token budgets. Until the CC side is GA, OrchestKit tracks an advisory budget_remaining_pct in state.json so long runs self-throttle. Update after each phase:
# At end of every phase, estimate remaining budget:
pct = tokensAsContextPct(tokensUsedSoFar) # from lib/context-window.ts
remaining = max(0, 100 - pct)
state["budget_remaining_pct"] = remaining
Write(".claude/chain/state.json", JSON.stringify(state))
Thresholds influence behavior:
| Remaining | Behavior |
|---|---|
> 50% | Normal — all optional depth (devil's advocate, visual capture, deep exploration). |
20-50% | Efficient — skip optional depth; keep core phases. Warn user once. |
< 20% | Conservation — finish current phase, emit a handoff with next steps, do not start new work. |
When CC's native task-budget API ships GA, replace the estimate with the real signal; the thresholds and behavior stay the same.
Load:
Read("${CLAUDE_PLUGIN_ROOT}/skills/chain-patterns/references/checkpoint-resume.md")
If .claude/chain/assess-verdict.json exists with a feature matching this run and verdict == "fail" (composite < the 5.5 min_pass in ${CLAUDE_PLUGIN_ROOT}/skills/assess/rubric.json, or any dimension below its min_blocker), BLOCK Phase 1. Present each blockers[] entry (dimension, score, reason), then AskUserQuestion with plain label+description options (no preview):
/ork:assess, then return here."assess_gate": "overridden" in state.json and carry the blockers into Phase 1 context.Missing file or verdict == "pass" → no gate; continue to Step 0.
xhigh added in 2.1.111)Read the /effort setting to scale implementation depth. The effort-aware context budgeting hook detects effort level automatically — adapt the phase plan accordingly:
| Effort Level | Phases Run | Agents | Token Budget |
|---|---|---|---|
| low | 1 (Discovery) → 5 (Implement) → 10 (Reflect) | 2 max | ~50K |
| medium | 1 → 2 → 5 → 7 (Scope Creep) → 10 | 3 max | ~150K |
| high (default) | All 10 phases | 4-7 | ~400K |
| xhigh (Opus 5, CC 2.1.111+) | All 10 phases + one additional healing iteration on test failures before escalating | 4-7 | ~550K |
Override: Explicit user selection in Step 0 (e.g., "Plan first" or "Worktree") overrides
/effortdownscaling. If user requests full exploration, respect that regardless of effort level.
BEFORE any work, detect the project tier. This becomes the complexity ceiling for all patterns.
Scan codebase signals and classify into tiers 1-6 (Interview through Open Source). Each tier sets an architecture ceiling and determines which phases/agents to use.
Load tier details, workflow mapping, and orchestration mode: Read("${CLAUDE_PLUGIN_ROOT}/skills/implement/references/tier-classification.md")
For features touching 5+ files, offer worktree isolation to prevent conflicts with the main working tree:
AskUserQuestion(questions=[{
"question": "Isolate this feature in a git worktree?",
"header": "Isolation",
"options": [
{"label": "Yes — worktree (Recommended)", "description": "Creates isolated branch via EnterWorktree, merges back on completion"},
{"label": "No — work in-place", "description": "Edit files directly in current branch"},
{"label": "Plan first", "description": "Research and design in plan mode before writing code"}
],
"multiSelect": false
}])
If 'Plan first' selected:
# 1. Enter read-only plan mode
EnterPlanMode("Research and design: $ARGUMENTS")
# 2. Research phase — Read/Grep/Glob ONLY, no Write/Edit
# - Read existing code in the target area
# - Grep for related patterns, imports, dependencies
# - Check tests, configs, and integration points
# - If context7 available: query library docs
# 3. Design the plan — produce:
# - File map: which files to create/modify
# - Architecture decisions with rationale
# - Task breakdown with acceptance criteria
# - Risk assessment and edge cases
# 4. Exit plan mode — returns plan to user for approval
ExitPlanMode()
# 5. User reviews plan. If approved → continue to Phase 1 (Discovery)
# with the plan as input. If rejected → revise or stop.
If worktree selected:
EnterWorktree(name: "feat-{slug}") to create isolated branchgit checkout {original-branch} && git merge feat-{slug}AskUserQuestionLoad worktree details: Read("${CLAUDE_PLUGIN_ROOT}/skills/implement/references/worktree-isolation-mode.md")
Before Phase 1, resolve the unknowns whose answers would change the architecture, in blast-radius order — schema/migration → auth → API contract → perf/scale → cosmetics (last). Grep first, then AskUserQuestion one at a time (highest first, cap ~5, skip the obvious). Each answer becomes a row in a Decisions table written to .claude/chain/decisions.json and the PR body, feeding Phase 4 (Architecture) as constraints. Do NOT start Phase 1 with an unresolved schema/auth question; skip in low effort. Full protocol: Read("${CLAUDE_PLUGIN_ROOT}/skills/implement/references/blast-radius-clarification.md").
BEFORE doing ANYTHING else, create tasks to track progress:
# 1. Create main task IMMEDIATELY
TaskCreate(
subject="Implement: {feature}",
description="Feature implementation with parallel subagents",
activeForm="Implementing {feature}"
)
# 2. Create subtasks for each phase
TaskCreate(subject="Research best practices and docs", activeForm="Researching best practices") # id=2
TaskCreate(subject="Micro-plan: scope, files, criteria", activeForm="Micro-planning") # id=3
TaskCreate(subject="Architecture design (parallel agents)", activeForm="Designing architecture") # id=4
TaskCreate(subject="Implement and write tests", activeForm="Implementing code") # id=5
TaskCreate(subject="Integration verification", activeForm="Verifying integration") # id=6
TaskCreate(subject="Scope creep check", activeForm="Checking scope creep") # id=7
TaskCreate(subject="E2E verification", activeForm="Running E2E verification") # id=8
TaskCreate(subject="Document and reflect", activeForm="Documenting decisions") # id=9
# 3. Set dependencies for sequential phases
TaskUpdate(taskId="3", addBlockedBy=["2"]) # Plan needs research
TaskUpdate(taskId="4", addBlockedBy=["3"]) # Architecture needs plan
TaskUpdate(taskId="5", addBlockedBy=["4"]) # Implementation needs architecture
TaskUpdate(taskId="6", addBlockedBy=["5"]) # Integration needs implementation
TaskUpdate(taskId="7", addBlockedBy=["6"]) # Scope creep needs integration
TaskUpdate(taskId="8", addBlockedBy=["7"]) # E2E needs scope check
TaskUpdate(taskId="9", addBlockedBy=["8"]) # Docs need E2E
# 4. Update status as you progress
TaskUpdate(taskId="2", status="in_progress") # When starting
TaskUpdate(taskId="2", status="completed") # When done — repeat for each subtask
| Phase | Activities | Agents |
|---|---|---|
| 1. Discovery | Research best practices, Context7 docs, break into tasks | — |
| 2. Micro-Planning | Detailed plan per task (load ${CLAUDE_PLUGIN_ROOT}/skills/implement/references/micro-planning-guide.md) | — |
| 3. Worktree | Isolate in git worktree for 5+ file features (load ${CLAUDE_PLUGIN_ROOT}/skills/implement/references/worktree-workflow.md) | — |
| 4. Architecture | 4 parallel background agents (+ event-driven-architect when event/CQRS/queue-shaped) | workflow-architect, backend-system-architect, frontend-ui-developer, llm-integrator |
| 5. Implementation + Tests | Parallel agents, single-pass artifacts with mandatory tests | backend-system-architect, frontend-ui-developer, llm-integrator, test-generator |
| 6. Integration Verification | Code review + real-service integration tests | backend, frontend, code-quality-reviewer, security-auditor |
| 7. Scope Creep | Compare planned vs actual (load ${CLAUDE_PLUGIN_ROOT}/skills/implement/references/scope-creep-detection.md) | workflow-architect |
| 8. E2E Verification | Browser + API E2E testing (load ${CLAUDE_PLUGIN_ROOT}/skills/implement/references/e2e-verification.md) | — |
| 9. Documentation | Save decisions to memory graph | — |
| 10. Reflection | Lessons learned, estimation accuracy | workflow-architect |
Load agent prompts: Read("${CLAUDE_PLUGIN_ROOT}/skills/implement/references/agent-phases.md")
For Agent Teams mode: Read("${CLAUDE_PLUGIN_ROOT}/skills/implement/references/agent-teams-phases.md")
Nested delegation (CC 2.1.172+): Phase 4-6 specialist agents MAY be instructed to delegate a bounded sub-problem to their own declared sub-agents (e.g. backend-system-architect → database-engineer for schema design) instead of doing everything inline. Keep chains ≤ 3 levels deep; when sub-tasks are independent, flatten to parallel dispatch from this orchestrator. See chain-patterns Pattern 9 (CC 2.1.172+).
Write handoff JSON after major phases. See chain-patterns skill for schema.
| After Phase | Handoff File | Key Outputs |
|---|---|---|
| 1. Discovery | 01-discovery.json | Best practices, library docs, task breakdown |
| 2. Micro-Plan | 02-plan.json | File map, acceptance criteria per task |
| 4. Architecture | 04-architecture.json | Decisions, patterns chosen, agent results |
| 5. Implementation | 05-implementation.json | Files created/modified, test results |
| 7. Scope Creep | 07-scope.json | Planned vs actual, PR split recommendation |
Output results incrementally after each phase — don't batch everything until the end.
Focus mode (CC 2.1.101): In focus mode (
/focus), the user only sees your final message. Include a self-contained summary with all key results — don't assume they saw incremental outputs.
| After Phase | Show User |
|---|---|
| 1. Discovery | Key findings, library recommendations, task breakdown |
| 4. Architecture | Each agent's design decisions as they return |
| 5. Implementation | Files created/modified per agent, test results |
| 7. Scope Creep | Planned vs actual delta, PR split recommendation |
When agents run with run_in_background=true, output each agent's findings as soon as it returns — don't wait for all agents to finish. This gives users ~60% faster perceived feedback and enables early intervention if an agent's approach diverges from the plan.
Teammate background tasks survive turn-end (CC 2.1.183): A
run_in_backgroundtask started by a teammate is no longer killed when that teammate finishes its turn. A parallel architecture/test teammate can launch a long build and let it outlive its own turn; the lead collects the result later. Pre-2.1.183 the lead had to own every background task to keep it alive.
Use Monitor to stream real-time events from background build/test scripts instead of polling output files:
# Start a long-running build in background
Bash(command="npm run build 2>&1", run_in_background=true)
# Stream its output line-by-line as notifications (no polling)
Monitor(pid=build_task_id)
# For background agents with test suites:
Agent(subagent_type="ork:test-generator", run_in_background=true, ...)
# Monitor agent progress via task notifications (CC 2.1.98 partial progress)
Full pattern reference (when to use vs. TaskOutput, until-condition gates, partial-result salvage, anti-patterns): Read("${CLAUDE_PLUGIN_ROOT}/skills/chain-patterns/references/monitor-patterns.md").
Partial results (CC 2.1.98): if a worktree-isolated agent crashes mid-implementation, salvage its partial output — git diff --name-only in its worktree, commit what's usable, flag incomplete items — instead of re-spawning; escalate a BLOCKED agent to the user. Full salvage logic: the monitor-patterns reference above.
Spawn parallel implementation agents with Agent(isolation="worktree"). The
subagent bypass of the worktree-isolation guard was fixed in CC 2.1.154 and
completed in 2.1.203; ork's floor is >= 2.1.220, so every supported session gets
real isolation. Full pattern, plus the 2.1.206 caveat that EnterWorktree
now prompts for confirmation on ork's out-of-tree ../<repo>-<task> convention:
Read("${CLAUDE_PLUGIN_ROOT}/skills/chain-patterns/references/worktree-agent-pattern.md")
Historical (CC <= 2.1.153 only): the param thrashed the primary worktree's HEAD
and cut agents off at ~60 tool uses (Yonatan-HQ/platform#3224). The manual
pre-create workaround that fixed it is superseded and kept only as a record:
references/manual-worktree-pattern.md.
After final PR, schedule health monitoring:
# Guard: Skip cron in headless/CI (CLAUDE_CODE_DISABLE_CRON)
# if env CLAUDE_CODE_DISABLE_CRON is set, run a single check instead
CronCreate(
schedule="0 */6 * * *",
prompt="Health check for {feature} in PR #{pr}:
gh pr checks {pr} --repo {repo}.
If healthy 24h → CronDelete. If errors → alert."
)
if capabilities.context7:
mcp__context7__resolve-library-id({ libraryName: "next-auth" })
mcp__context7__query-docs({ libraryId: "...", query: "..." })
else:
WebFetch("https://docs.example.com/api") # T1 fallback
If working on a GitHub issue, run the Start Work ceremony from issue-progress-tracking and post progress comments after major phases.
Maintain checkpoints after each task. Load triggers: Read("${CLAUDE_PLUGIN_ROOT}/skills/implement/references/feedback-loop.md")
Phase 5 test-generator MUST produce tests matching the change type. Each change type maps to specific required tests and testing rules.
Load test matrix, real-service detection, and phase 9 gate: Read("${CLAUDE_PLUGIN_ROOT}/skills/implement/references/test-requirements-matrix.md")
Read("${CLAUDE_PLUGIN_ROOT}/shared/rules/verification-gate.md") and satisfy EVERY check: every changed file verified, tests green, scope-creep scored. A partial pass is NOT done; "should work now" is not evidence.Read("${CLAUDE_PLUGIN_ROOT}/shared/status-protocol.md")run_in_background: true, launch all agents in ONE messageCtrl+F twice to stop lingering background agents. Note: /clear (CC 2.1.72+) preserves background agentsExitWorktree(action: "keep") in Phase 10 if worktree was entered in Step 0; never leave orphaned worktrees/ork:verify {FEATURE} # Grade the implementation
/ork:cover {FEATURE} # Generate test suite
/ork:commit # Commit changes
/loop 10m npm test # Watch tests while iterating
/loop 30m /ork:verify {FEATURE} # Periodic quality gate
/ork:implement runs commonly take 10–30 min with parallel agents. At the final synthesis step, after the PR is opened and tests are green, call PushNotification — the user has almost certainly context-switched.
PushNotification(
message=f"ork:implement complete — {FEATURE}: {tests_passing}/{tests_total} tests · PR #{pr_num} opened · ready for /ork:verify",
status="proactive"
)
Full rule (when to fire, body content limits, graceful fallback for users without Remote Control): load Read("${CLAUDE_PLUGIN_ROOT}/skills/chain-patterns/rules/push-notification-on-completion.md").
When dispatching subagents — whether via the in-session Agent tool or a headless claude -p --bare from a wrapper script — set explicit --permission-mode and --effort per agent role so behaviour is deterministic across interactive vs CI runs:
| Agent role | --permission-mode | --effort | Rationale |
|---|---|---|---|
Read-only analysis (Explore, code-quality-reviewer, debug-investigator) | dontAsk | low | No writes, no risk; minimise cost. |
Test generation (test-generator) | acceptEdits | medium | Writes test files; permission prompts would block the parallel sweep. |
Production code (frontend-ui-developer, backend-system-architect) | default or acceptEdits | medium to high | Set per-feature complexity. default keeps the user in the loop. |
| Never | bypassPermissions | — | Skip the audit trail — only acceptable in throwaway sandboxes. |
In-session Agent tool calls inherit the parent session's permission mode; the table is the policy for what those defaults should be. For genuinely headless invocations (cron, CI), pass the flags explicitly to claude -p --bare:
claude -p --bare \
--permission-mode dontAsk \
--effort low \
--max-turns 8 \
"<prompt>"
All spawned agents receive: changed files list, project tier, architectural constraints, and decisions from prior phases (discovery, plan). Pass via the agent prompt, not just "implement X".
When backend and frontend agents need to align on API contracts:
SendMessage(to="frontend-ui-developer", message="API endpoint is POST /api/auth with {token, refreshToken} response shape")
SendMessage(to="test-generator", message="Backend uses JWT — mock auth middleware in test fixtures")
After implementation completes, chain to verification:
TaskCreate(subject="Verify implementation", activeForm="Verifying changes")
TaskUpdate(taskId=verify_id, addBlockedBy=[impl_task_id])
# Then: /ork:verify {feature}
Session recovery (CC 2.1.108+): After idle periods or interruptions, use
/recapto restore conversational context. Combined with.claude/chain/state.jsoncheckpoint-resume, this enables full recovery of multi-phase implement sessions. Enabled by default since CC 2.1.110 (even with telemetry disabled).
Done means all of these hold:
ork:explore: Explore codebase before implementingork:verify: Verify implementations work correctlyork:issue-progress-tracking: Auto-updates GitHub issues with commit progressLoad on demand with Read("${CLAUDE_PLUGIN_ROOT}/skills/implement/references/<file>"):
| File | Content |
|---|---|
agent-phases.md | Agent prompts and spawn templates |
agent-teams-phases.md | Agent Teams mode phases |
interview-mode.md | Interview/take-home constraints |
blast-radius-clarification.md | Step 0b: ask-what-before-how blast-radius interview + decisions table |
orchestration-modes.md | Task tool vs Agent Teams selection |
feedback-loop.md | Checkpoint triggers and actions |
cc-enhancements.md | CC version-specific features |
agent-teams-full-stack.md | Full-stack pipeline for teams |
team-worktree-setup.md | Team worktree configuration |
micro-planning-guide.md | Detailed micro-planning guide |
scope-creep-detection.md | Planned vs actual comparison |
worktree-workflow.md | Git worktree workflow |
e2e-verification.md | Browser + API E2E testing guide |
worktree-isolation-mode.md | Worktree isolation details |
tier-classification.md | Tier classification, workflow mapping, orchestration mode |
test-requirements-matrix.md | Test matrix by change type, real-service detection, phase 9 gate |
Frequently asked questions
Parallel subagent execution for feature implementation with scope control and reflection.
The source record exposes this install command: npx skills add https://github.com/yonatangross/orchestkit --skill "src/skills/implement". Inspect the command and pinned source before running it.
The pinned source record declares support for: claude code.
Static rules flagged read-files, network in the source; the page lists the matching lines and excerpts.
Alternatives
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
yonatangross/orchestkit
Grade work that already exists and decide whether it can merge. Runs the project's current unit, integration, and E2E suites plus security scanning and type checking, scores every dimension 0-10, and returns a merge verdict with a VERIFIED-vs-CLAIMED evidence manifest. Writes no test files and edits no source. Use when verifying changes are ready to merge. Use /ork:cover instead when the tests still have to be written.
vasilyu1983/AI-Agents-public
Systematic debugging for crashes, regressions, flakes, and production bugs. Use when diagnosing stack traces, logs, traces, or profiling data.
upex-galaxy/agentic-qa-boilerplate
Plan, write, and review automated tests following KATA (Komponent Action Test Architecture) on Playwright + TypeScript, or explain existing automated tests in a sealed read-only mode. Use when writing E2E or API/integration tests, creating Page or Api components, designing ATCs, parameterizing test data, registering fixtures, reviewing test code for KATA compliance, or requesting break-down-tests / a plain-English test breakdown. The explain mode reads source and reports assertions without enter