extract-skill
Reverse-engineer design systems, tokens, and components from live products or screenshots
Use when a PR or feature needs both specification and code-quality review
$ npx -y skills add nyldn/claude-octopus --skill skill-staged-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/skill-staged-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when a PR or feature needs both specification and code-quality review
name: skill-staged-review description: "Use when a PR or feature needs both specification and code-quality review" disable-model-invocation: true
> **Host: Codex CLI** — This skill was designed for Claude Code and adapted for Codex. > Cross-reference commands use installed skill names in Codex rather than `/octo:*` slash commands. > Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it. > For host tool equivalents, see `skills/blocks/codex-host-adapter.md`.
This generated Codex skill preserves an enforced workflow contract from the source skill.
**PROHIBITED:**
Separates **spec compliance** (did you build the right thing?) from **code quality** (did you build it right?). Stage 1 must pass before Stage 2 runs.
Validates the implementation against the intent contract.
PLAN_STORAGE="${CLAUDE_PLUGIN_ROOT:-${HOME}/.claude-octopus/plugin}/scripts/plan-storage.sh"
OCTO_PLAN_DIR="$("$PLAN_STORAGE" current "$PWD" 2>/dev/null || true)"
INTENT_FILE="${OCTO_PLAN_DIR:+${OCTO_PLAN_DIR}/session-intent.md}"
if [[ -f "$INTENT_FILE" ]]; then
echo "Intent contract found: $INTENT_FILE"
cat "$INTENT_FILE"
else
echo "WARNING: No current resolved intent contract found for this workspace"
echo "Skipping Stage 1 — proceeding to Stage 2 (code quality) only."
fi**If no intent contract exists:** Warn the user and skip to Stage 2. Do NOT fabricate success criteria — the contract must exist from a prior workflow.
For each success criterion in the intent contract:
1. **Read the criterion** from the `## Success Criteria` section 2. **Find evidence** in the codebase that the criterion is met 3. **Mark status:**
Present results:
## Stage 1: Spec Compliance ### Success Criteria Check #### Good Enough Criteria - [PASS] Criterion 1: <how it was met> - [FAIL] Criterion 2: <why not met, what's missing> #### Exceptional Criteria - [PARTIAL] Criterion 1: <what's done, what's remaining>
For each boundary in the intent contract:
1. **Read the boundary** from the `## Boundaries` section 2. **Check for violations** in the implementation 3. **Mark status:**
### Boundary Check - [RESPECTED] Boundary 1: <confirmation> - [VIOLATED] Boundary 2: <what violated it>
| Result | Action | |--------|--------| | All criteria PASS + all boundaries RESPECTED | Proceed to Stage 2 | | Any criterion FAIL | Report failures. Ask user: fix now or proceed anyway? | | Any boundary VIOLATED | Report violations. Ask user: fix now or proceed anyway? |
**If user chooses to fix:** Stop review, list specific fixes needed. **If user chooses to proceed:** Note the overrides and continue to Stage 2.
Runs stub detection and full code quality review.
Run 5 checks on all changed files:
# Get changed files
if git diff --cached --name-only 2>/dev/null | head -1 > /dev/null; then
changed_files=$(git diff --cached --name-only)
elif git diff --name-only HEAD~1..HEAD 2>/dev/null | head -1 > /dev/null; then
changed_files=$(git diff --name-only HEAD~1..HEAD)
else
changed_files=$(git diff --name-only)
fi
# Filter source files
source_files=$(echo "$changed_files" | grep -E "\.(ts|tsx|js|jsx|py|go|rs|sh)$" || true)
STUB_ISSUES=0
for file in $source_files; do
[[ -f "$file" ]] || continue
# Check 1: TODO/FIXME/PLACEHOLDER markers
todo_count=$(grep -cE "(TODO|FIXME|PLACEHOLDER|XXX)" "$file" 2>/dev/null || echo "0")
if [[ "$todo_count" -gt 0 ]]; then
echo "WARNING: $file has $todo_count TODO/FIXME markers"
STUB_ISSUES=$((STUB_ISSUES + 1))
fi
# Check 2: Empty function bodies
empty_fn=$(grep -cE "function.*\{\s*\}|=>\s*\{\s*\}" "$file" 2>/dev/null || echo "0")
if [[ "$empty_fn" -gt 0 ]]; then
echo "ERROR: $file has $empty_fn empty functions"
STUB_ISSUES=$((STUB_ISSUES + 1))
fi
# Check 3: Suspicious null/undefined returns
null_ret=$(grep -cE "return (null|undefined);" "$file" 2>/dev/null || echo "0")
if [[ "$null_ret" -gt 0 ]]; then
echo "WARNING: $file has $null_ret null/undefined returns — verify intentional"
STUB_ISSUES=$((STUB_ISSUES + 1))
fi
# Check 4: Substantive line count
subst_lines=$(grep -cvE "^\s*(//|/\*|\*|#|import|export|$)" "$file" 2>/dev/null || echo "0")
if [[ "$subst_lines" -lt 5 ]]; then
echo "WARNING: $file has only $subst_lines substantive lines"
STUB_ISSUES=$((STUB_ISSUES + 1))
fi
# Check 5: Mock/test data in production code
mock_count=$(grep -cE "const.*(mock|test|dummy|fake).*=" "$file" 2>/dev/null || echo "0")
if [[ "$mock_count" -gt 0 ]]; then
echo "WARNING: $file has $mock_count mock/test data references"
STUB_ISSUES=$((STUB_ISSUES + 1))
fi
done
echo "Stub detection complete: $STUB_ISSUES issues found"**After stub detection, dispatch code to multiple providers for parallel quality review.** A Claude-only review pipeline misses what external models catch — Codex excels at logic errors and correctness, while Antigravi
Every AI model has blind spots. Claude Octopus supports twelve external provider integrations — Codex, Antigravity CLI, Copilot, Qwen, Ollama, Perplexity, OpenRouter, OrcaRouter, OpenCode, Cursor CLI, Grok, and Kimi Code — alongside the built-in Claude Code
Repo: nyldn/claude-octopus
Reverse-engineer design systems, tokens, and components from live products or screenshots
Multi-AI requirements scoping using available external providers (Double Diamond Define phase). Priority triggers: octo define, octo scope, co-define,…
Multi-AI validation, scoring, and review using available external providers (Double Diamond Deliver phase)
Multi-AI implementation using available external providers (Double Diamond Develop phase). DO NOT use for simple code edits, reading/reviewing code, built-in…
Multi-AI research using available external providers (Double Diamond Discover phase)
Decompose and execute large changes, migrations, or multi-issue fixes in parallel with quality gates