.claude/skills/feature-technical-spec/SKILL.md
Define technical approach (architecture, integration points, data model) for a feature through guided Q&A and write FEATURE_TECHNICAL_SPEC.md. Use after /feature-spec.
npx skillsauth add benjaminshoemaker/ai_coding_project_base feature-technical-specInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate a feature technical specification document for the feature $1.
Copy this checklist and track progress:
Feature Technical Spec Progress:
- [ ] Directory guard
- [ ] Check prerequisites (FEATURE_SPEC.md exists)
- [ ] Existing file guard (prevent overwrite)
- [ ] Existing code analysis (similar functionality, patterns, integration points)
- [ ] Codebase maturity assessment
- [ ] Generate FEATURE_TECHNICAL_SPEC.md
- [ ] Run spec-verification
- [ ] Capture deferred requirements
- [ ] Cross-model review (if Codex available)
If .toolkit-marker exists in the current working directory → STOP:
"You're in the toolkit repo. Feature skills run from your project directory.
Run: cd ~/Projects/your-project && /feature-technical-spec $1"
Check .claude/toolkit-version.json exists in the current working directory (confirms /setup was run).
If missing → STOP: "Toolkit not installed. Run /setup from the toolkit first."
Check AGENTS.md exists in the current working directory (confirms project root).
If missing → STOP: "Run this from your project root (where AGENTS.md lives)."
$1 = feature name (e.g., analytics, dark-mode)$1 is empty, ask the user for the feature namePROJECT_ROOT = current working directoryFEATURE_DIR = PROJECT_ROOT/features/$1FEATURE_DIR/FEATURE_SPEC.md exists. If not:
"FEATURE_SPEC.md not found at features/$1/. Run /feature-spec $1 first."PROJECT_ROOT/AGENTS.md exists (indicates an existing project). If not, warn:
"AGENTS.md not found. Feature development assumes an existing project. Did you mean to run /product-spec for a new project?"Before asking any questions, check whether FEATURE_DIR/FEATURE_TECHNICAL_SPEC.md already exists.
FEATURE_DIR/FEATURE_TECHNICAL_SPEC.md.bak.YYYYMMDD-HHMMSS, then write the new document to FEATURE_DIR/FEATURE_TECHNICAL_SPEC.mdFEATURE_DIR/FEATURE_TECHNICAL_SPEC.md with the new documentRead .claude/skills/feature-technical-spec/PROMPT.md and follow its instructions exactly:
Read FEATURE_DIR/FEATURE_SPEC.md as input
Perform Existing Code Analysis (REQUIRED before any design):
Note: All code analysis should be performed on PROJECT_ROOT (current working directory).
a. Similar Functionality Audit
SIMILAR FUNCTIONALITY FOUND
---------------------------
- {file}: {description of similar functionality}
- {file}: {reusable utility/helper}
Recommendation: {extend existing | create new | hybrid approach}
b. Pattern Compliance Check
EXISTING PATTERNS
-----------------
File organization: {pattern}
Naming convention: {pattern}
Error handling: {pattern}
Testing approach: {pattern}
c. Integration Point Mapping
INTEGRATION POINTS
------------------
| File | Risk | Coverage | Notes |
|------|------|----------|-------|
| {file} | High/Med/Low | X% | {concerns} |
Assess codebase maturity — Is this a legacy/brownfield codebase?
Work through integration analysis, regression risks, and migration strategy
Generate the final FEATURE_TECHNICAL_SPEC.md document, incorporating findings from step 2
Write the completed specification to FEATURE_DIR/FEATURE_TECHNICAL_SPEC.md.
--lean)When --lean is passed:
/verify-spec, /codex-consult, or /criteria-audit. Report each as LEAN_SKIP in the output.--lean)These gates MUST execute before you produce the "Next Step" output. The output template requires results from each gate. Reporting SKIPPED without --lean is a skill violation — go back and run the gate.
After writing FEATURE_TECHNICAL_SPEC.md, run the spec-verification workflow:
.claude/skills/spec-verification/SKILL.md for the verification processIMPORTANT: Do not proceed to Gate 2 until verification passes or user explicitly chooses to proceed with noted issues.
IMPORTANT: Capture deferred requirements interactively during the Q&A process, not after.
Write deferred items to PROJECT_ROOT/DEFERRED.md (not the feature directory).
During the Q&A, watch for signals that the user is deferring a technical decision:
When you detect a deferral signal, immediately use AskUserQuestion:
Question: "Would you like to save this to your deferred requirements?"
Header: "Defer?"
Options:
- "Yes, capture it" — I'll ask a few quick questions to document it
- "No, skip" — Don't record this
If user selects "Yes, capture it":
Ask these clarifying questions:
What's being deferred? "In one sentence, what's the technical decision or feature?" (Pre-fill with your understanding from context)
Why defer it? Options: "Premature optimization" / "Out of scope" / "Separate feature" / "V2" / "Needs more research" / "Other"
Notes for later? "Any technical context that will help when revisiting this?" (Optional — user can skip)
After collecting answers, append to PROJECT_ROOT/DEFERRED.md right away.
Add new section or append to existing feature section:
## From FEATURE_TECHNICAL_SPEC.md: {FEATURE_NAME} ({date})
| Requirement | Reason | Notes |
|-------------|--------|-------|
| {user's answer} | {selected reason} | {notes or "—"} |
After capturing (or skipping), continue the spec Q&A where you left off.
After verification passes, run cross-model review if Codex CLI is available:
codex --version/codex-consult with upstream contextConsultation invocation:
/codex-consult --upstream features/$1/FEATURE_SPEC.md --research "{detected technologies from codebase}" features/$1/FEATURE_TECHNICAL_SPEC.md
If Codex finds issues:
If Codex CLI is not installed or not authenticated: Report UNAVAILABLE (not SKIPPED — the distinction matters).
| Situation | Action |
|-----------|--------|
| FEATURE_SPEC.md not found in features/$1/ | Stop and report "Run /feature-spec $1 first" |
| PROMPT.md not found at .claude/skills/feature-technical-spec/PROMPT.md | Stop and report "Skill asset missing — reinstall toolkit or run /setup" |
| Codebase too large for full code analysis (>5000 files) | Limit analysis to src/, lib/, and app/ directories; note reduced scope in output |
| DEFERRED.md write fails (permissions or disk) | Output deferred items to terminal, warn user, continue with spec generation |
| Codex CLI invocation fails or times out | Log the error, skip cross-model review, proceed to Next Step |
Pre-condition: All gates above have completed, or --lean was explicitly passed. If you have not run them, STOP and run them now. Reporting SKIPPED without --lean is a skill violation.
When complete, inform the user:
FEATURE_TECHNICAL_SPEC.md created and verified at features/$1/FEATURE_TECHNICAL_SPEC.md
Verification: PASSED | PASSED WITH NOTES | NEEDS REVIEW | LEAN_SKIP
Cross-Model Review: PASSED | PASSED WITH NOTES | UNAVAILABLE | LEAN_SKIP
Deferred Requirements: {count} items captured to DEFERRED.md
Next: Run /feature-plan $1
testing
Audit project alignment with VISION.md, identify SDLC gaps, and generate feature proposals. Use when reviewing strategic direction or planning new features.
development
Run code-verification on a specific task. Use to verify a single task's acceptance criteria after implementation.
testing
Resolve Vercel preview deployment URL for the current git branch. Invoked by browser-verification when deployment.enabled is true, or directly to check deployment status. Use to check deployment status or when browser verification needs a URL.
tools
Discover and sync all toolkit-using projects with the latest skills. Use when skills are modified, after the post-commit hook reminds you, or to batch-sync multiple projects.