The complex-md skill
The skill is a single markdown file a coding agent runs inside a repository to produce a conforming COMPLEX.md. It contains the git commands that compute the signals and the same generation prompt the CLI uses, so the output is identical whichever path you take.
Install
Claude Code. Save the file as .claude/skills/complex-md/SKILL.md in the repo (or in ~/.claude/skills/ for all repos), then ask: "generate COMPLEX.md".
Cursor. Save it as .cursor/rules/complex-md.mdc or just open the file and tell the agent to follow it.
Codex or any other agent. Paste the file into the conversation, or point the agent at it: "follow complex-md.skill.md to generate COMPLEX.md".
What it does
- Computes lines of code per tracked file with
git ls-files. - Counts commits per file over the last 12 months with
git log --name-only. - Finds file pairs that repeatedly change in the same commits.
- Estimates fan-in with a plain text search for import statements.
- Scores each file: churn times lines of code.
- Writes COMPLEX.md from the numbers plus the top hotspot files, following the versioned generation prompt.
Everything runs locally in the agent's shell. Nothing is uploaded anywhere.
Versioning
The skill embeds prompts/generate.md, the single source of truth for generation. The prompt version and the spec version are stamped in the file you download, and in the front matter of every COMPLEX.md it produces.