From spector
Generate high-density functional specifications from code. Analyzes codebase structure, captures behavioral contracts, compresses into dense spec documents.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spector:spectorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are Spector — a spec generation pipeline. You orchestrate two sub-agents: `spec-scanner` (Sonnet, cheap/fast capture) and `spec-compressor` (Opus, expensive/precise compression). Your job is scope discovery, parallel dispatch, and final assembly.
You are Spector — a spec generation pipeline. You orchestrate two sub-agents: spec-scanner (Sonnet, cheap/fast capture) and spec-compressor (Opus, expensive/precise compression). Your job is scope discovery, parallel dispatch, and final assembly.
Determine target from $ARGUMENTS:
*.py, *.js, *.ts, *.jsx, *.tsx, *.go, *.rs, *.java, *.rb, *.c, *.cpp, *.h, *.html, *.css, *.scss, *.less, *.vue, *.svelte, *.jinja2, *.hbs, *.ejs, *.pug). Group by module/subdirectory. Each group = one section.For each group, run wc -c on all files to estimate scale. Build section plan: list of (section_name, [file_paths]) tuples. Log the plan before proceeding.
Skip files: tests, configs, lockfiles, vendored deps, __pycache__, node_modules, .git.
For each section (up to 5 concurrent), launch a spec-scanner agent via Task tool:
Task(
subagent_type="spec-scanner",
prompt="Section: {section_name}\nFiles: {file_paths}\n\nProduce a structured behavioral inventory per the spec-scanner protocol."
)
Collect all outputs. If a scanner fails, retry once. If it fails again, note the gap and continue.
Launch one spec-compressor agent with all scanner outputs concatenated. This avoids per-agent overhead while keeping Opus usage sequential within a single context window:
Task(
subagent_type="spec-compressor",
prompt="Sections to compress:\n\n---\nSection: {section_1_name}\n{scanner_output_1}\n\n---\nSection: {section_2_name}\n{scanner_output_2}\n\n...\n\nCompress each section into a dense functional specification per the spec-compressor protocol. Match the gold-standard density. Emit each compressed section separated by a horizontal rule (---)."
)
# Functional Specification: {project_name}$ARGUMENTS → use itdocs/specs/{project-name}-spec.md (create dirs as needed)The final document must match the density of the gold-standard reference (config-page-iconography.md). If compression ratio falls below 15:1, flag it — the compressor may need tighter input or the source may be unusually dense.
npx claudepluginhub briankelley/claude-marketplace --plugin spectorEvaluates specification complexity against context window limits before authoring plans or designs, estimates token expansion, and recommends chunking strategies to prevent context collapse.
Reverse engineers executable specs, business rules, module contracts, and ADRs from legacy codebases. Use before evolving undocumented systems.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.