harness/plugins/common/claude/skills/codebase-analyzer/SKILL.md
Router skill for codebase analysis. Launches one implementation analyzer subagent and produces one evidence-backed report with file:line references.
npx skillsauth add popoffvg/dotfiles codebase-analyzerInstall 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.
This skill is an orchestrator. Do not do a single-pass analysis directly.
Use this skill only for analysis/audit requests ("analyze", "map", "understand", "what does this do").
Do not use this skill for operational/edit requests (for example: permissions, tool permission updates, AGENTS/agent guide edits, git hooks, CI failures, installs, "fix it", "make it executable"). In those cases, do the requested edit workflow directly (read target file, edit, validate) or use the appropriate skill.
If the user request is ambiguous (e.g. "fix it" without an explicit analysis goal), ask one clarifying question instead of launching subagents.
Produce one combined analysis that covers:
All claims must be backed by absolute/path:line references.
Run one subagent only for the target:
codebase-analyzer-implementationDo not use parallel execution.
Use this exact shape when calling the subagent tool:
{
"agent": "codebase-analyzer-implementation",
"task": "Analyze target: <TARGET>. Return Implementation, Domain Terms/Relations, and Constraints with absolute path:line citations."
}
Execution rules:
context: "fresh" unless prior context is explicitly required.needs verification.continue, resume using the last unresolved analysis target.Use cocoindex and fff MCP servers for code discovery and evidence collection.
When executing this skill, allow only the tools required for analysis output:
mcp (must use only cocoindex and fff servers)readwrite (only for _notes/analysis-<target>.md)After the subagent returns:
Always write final result to:
_notes/analysis-<target>.md
Use short kebab-case <target>.
## Analysis: <Target>
### Overview
- 2-4 bullets summarizing behavior, domain model, and key limits.
### Implementation (Current Behavior)
- Evidence-backed explanation of entry points, flow, transformations, side effects.
### Domain Terms (DDD)
#### Terms
- **Term** — definition (`/abs/path/file.ext:line`)
#### Relations
- **TermA -> TermB**: relation description (`/abs/path/file.ext:line`)
### Constraints
Express constraints as **TypeScript-style pseudocode** inside a component namespace.
Use `throw` for hard constraints and comments for soft constraints.
```ts
namespace <Target>Component {
export function validateConstraints(input: <InputType>): void {
// hard constraints (must hold)
if (!(<invariant description>)) {
throw new Error("<constraint name>") // /abs/path/file.ext:line
}
if (!(<invariant description>)) {
throw new Error("<constraint name>") // /abs/path/file.ext:line
}
// soft constraints (warn/operational limits)
// WARN: <soft limit description> // /abs/path/file.ext:line
}
export function describeConstraintInteractions(): void {
// <ConstraintA> + <ConstraintB> => <combined effect> // /abs/path/file.ext:line
}
}
Express flow as TypeScript-style pseudocode with a namespaced state model. Only include if a concrete execution flow exists.
namespace <Target>Component {
export type State = "<stateA>" | "<stateB>" | "<stateC>"
export function transition(state: State, trigger: string): State {
if (state === "<stateA>" && trigger === "<trigger>") {
return "<stateB>" // /abs/path/file.ext:line
}
if (state === "<stateA>" && trigger === "<trigger>") {
return "<stateC>" // /abs/path/file.ext:line
}
return state
}
export function assertStateInvariants(state: State): void {
if (!(<state-level invariant>)) {
throw new Error("State invariant failed") // /abs/path/file.ext:line
}
}
}
function flow() {
<TargetComponent>.transision(/*params*/)
<TargetComponent>.assertStateInvairants(/*params*/)
}
## Non-goals
- No recommendations
- No refactors
- No bug hunting
- No quality critique
- No speculative architecture
Describe only what exists now.
testing
Use when the user asks to create test sets, enumerate scenarios, generate edge cases, or draft a coverage matrix before implementation.
testing
Use when the user asks to review, audit, score, or validate test sets for missed cases before execution or merge.
tools
Test harness plugins in isolation using tmux panes. Runs MCP servers, unit tests, typecheck, and Claude plugin loading. Use when user says "test plugin", "check plugin", "run plugin tests", "validate plugin", or names a specific plugin to test.
development
Guide for designing integration and e2e tests using BDD (Behavior-Driven Development) methodology with Cucumber-style Given/When/Then scenarios. Use when writing or reviewing tests for any service, API, or component. Language-agnostic — covers scenario structure, step notation, assertion principles, async patterns, and common anti-patterns.