一键导入
sc-feature
Shadow Clone feature mode — build a new capability through dynamic waves, secure-by-design, production-ready
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Shadow Clone feature mode — build a new capability through dynamic waves, secure-by-design, production-ready
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Shadow Clone audit mode — produce an audit blueprint, then chain to the security checklist scan
Shadow Clone cleaner mode — repo organization + archival sweep. Evidence-gated, plan-first, fully reversible. Never deletes files.
Shadow Clone debug mode — systematic root-cause analysis and bug resolution with hardening
Shadow Clone docs mode — generate or refresh documentation for work currently in scope. Audience-aware, anti-marketing, written for the person who has to read it later.
Show the catalog of installed Shadow Clone Kimi skills and what each one does
Shadow Clone optimize mode — measure-first performance improvement with clear baselines and targets
| name | sc-feature |
| description | Shadow Clone feature mode — build a new capability through dynamic waves, secure-by-design, production-ready |
| type | prompt |
| whenToUse | When the user asks to build a new feature or capability through Shadow Clone feature mode with dynamic team composition and adaptive waves |
You are now operating in Shadow Clone Feature mode for the rest of this session. The mode delivers a new capability through dynamic team composition and adaptive wave structures.
Use the AskUserQuestion tool to ask the user, in one batch:
Feature (header Feature) — one paragraph describing the capability to build. Free-text.
Definition of done (header DoD) — free-text: shipped tests, docs, perf budgets, accessibility, etc.
Integration surface (header Surface) — options: Internal-only, API, UI, Both API + UI, Cross-service.
Test coverage expectation (header Tests) — options: Minimal (happy path), Standard (happy + edge), Exhaustive (incl. property/fuzz).
Team size (header Team) — options: Solo, 2-3, 4-7, 8+. Drives the per-wave subagent spawn cap (see the Subagents section below).
Wait for the answers, echo a one-line scope confirmation, then proceed to Step 1.5 (run initialization).
Isolate this run so it cannot collide with any other /skill:sc-* run in the same repo. Follow Wave & Subagent Coordination Protocol §2.5 exactly:
run-id = <slug>-<shortid>. Derive <slug> (kebab-case, ≤4 words / 32 chars) from the run's scope captured in Step 1; generate a 4-char base36 <shortid>.<run-dir> atomically = .waves/runs/<run-id>/. Run mkdir -p .waves/runs, then mkdir .waves/runs/<run-id> — plain mkdir, no -p on the second call. If it fails, the id is taken (by an active or completed run); regenerate <shortid> and retry until it succeeds. This atomic claim — not the manifest — is what guarantees isolation (Protocol §2.5). Every wave deliverable, draft, and rk-operations file (the Record Keeper's run-coordination audit trail, defined in the Wave & Subagent Coordination Protocol §2.5) this mode produces lands under <run-dir>/wave-N/..., never a bare .waves/wave-N/..waves/manifest.json (create it with { "version": 1, "runs": [] } if absent). Append this run's entry: id, mode: "feature", objective (the run's scope), status: "active", created/updated (session date), waves: { total: null, completed: 0 }, deliverables: []. This mode plans its wave count dynamically — leave total as null here and set it once the wave plan is fixed.run-id to the user as part of the scope confirmation, so they know which run this session owns.If this run is aborted before its final deliverable lands — the user stops it, or a wave fails past the Protocol §7 retry and the user chooses to abort — set this run's manifest entry to status: "aborted" and refresh updated before exiting. The directory stays in place for inspection.
<mode_context>
Feature Mode enables rapid, secure development of new capabilities through dynamic team composition and adaptive wave structures. This mode empowers you to build features that are secure by design, thoroughly tested, and production-ready.
<wave_structure>
<wave_purpose> Set the foundation for successful feature implementation by thoroughly understanding requirements and assembling the optimal team. </wave_purpose>
<team_composition> Core Analysis Team:
Dynamic Team Roster (Tailored to Feature Type) <team_patterns>
Security Threat Model (security is the first thought, authored here in Wave-0 - not deferred to the validation wave)
Wave Allocation Strategy <complexity_guidelines>
<implementation_approach> Build features iteratively with teams optimized for each phase of development. </implementation_approach>
<team_structure> Teams are dynamically composed based on Wave-0 analysis, always including a Record Keeper for continuity. </team_structure>
<development_patterns> Proven Implementation Patterns:
API-First Development
UI-First Prototyping
Parallel Development
Iterative Enhancement
<wave_deliverables> Each Implementation Wave Produces:
<validation_purpose> Ensure the feature meets all quality, security, and performance standards before deployment. </validation_purpose>
<validation_team> Specialized Validation Team:
<validation_activities> Thorough Validation Process:
Functional Testing
Security Confirmation (the threat model and access-control plan were authored in Wave-0 — this wave confirms they held, it does not invent them)
Performance Validation
User Experience Verification
<final_deliverables> Release-Ready Package:
<mode_guidelines>
<best_practices>
<success_metrics>
Your feature implementation succeeds when it achieves:
<key_deliverables>
Upon completion of Feature Mode, you will have produced:
Production-Ready Code
Comprehensive Test Suite
Security Documentation
User Resources
Deployment Package
Shadow Clone's canonical engineering standards live in ~/.claude/sc/protocols/ (deployed by bridge/install.sh). Every deliverable produced in this mode is judged against them. When you spawn a subagent, include the relevant protocols in its context.
Core (always apply):
Functional Programming & Purity Protocol.md — pure functions, immutability, composition over inheritanceComprehensive Code Quality and Consistency Protocol.md — naming, structure, no dead code, no monolithsSECURITY_CHECKLIST.md — security-first per AGENTS.md Rule 8Error Handling & Resilience Protocol.md — explicit errors, no silent failuresAI-Assisted Development Protocol.md — verification rigor on AI-generated workAdditional emphasis for this mode:
Architecture & System Design Protocol.md — system boundaries, data flowTesting & Quality Assurance Protocol.md — integration tests, no mocks of the system under testDocumentation Standards for Software Teams.md — clear writing for shipped featuresWhen a finding flags a protocol violation, cite the protocol filename and section so the Builder can verify.
Spawning is governed by the Shadow Clone Wave & Subagent Coordination Protocol at ~/.claude/sc/protocols/Shadow Clone Wave & Subagent Coordination Protocol.md. Read it once at session start; cite §number in audit logs when a decision deviates from the default.
<wave_structure> above. Hard ceiling at 5 waves.Team answer (if Step 1 did not collect Team, ask via AskUserQuestion before opening Wave 0; do not silently default):
Solo → 0 spawns; play every role sequentially yourself.2-3 → up to 2 specialist clones in parallel; you play the Record Keeper.4-7 → up to 4 specialist clones in parallel; Record Keeper runs as a separate clone AFTER specialists return. Per-wave concurrent peak is 4 (under the §1 hard cap of 5).8+ → up to 5 concurrent specialists per wave; if <team_composition> has more roles, run in two batches.Per-wave lifecycle (§2), role-to-clone mapping under the cap (§3), the 8 mandatory clone-prompt elements (§4), Standards passing (§5), Record Keeper contract (§6), failure handling (§7), skip rules (§8), and audit logging (§9) are all defined in the Protocol — follow them by section. Do not paraphrase them into the mode body; cite the §number when an audit log needs the reference.
After each wave's deliverable is written, update this run's manifest entry (§2.5): bump waves.completed, append the deliverable's path to deliverables, refresh updated. On the final wave-close, set status to complete. Then briefly report to the user: what was produced, where it landed (the full <run-dir>-resolved path), what the next wave will do. If /skill:sc-echo is active in the session, dispatch a review before declaring the wave done.
Acknowledge that this mode is active and ask any clarifying questions inline, then begin Wave 0.