santosomar/general-secure-coding-agent-skills/legacy-code-summarizer
- community
Checking that the SKILL.md file is still in the repository.
Summarizes undocumented legacy code by inferring intent from structure, naming, data flow, and calling context — explicitly flagging what's inferred vs. what's certain. Use when onboarding to inherited code, when documentation is missing or wrong, or when deciding whether legacy code is safe to change.
Install
npx vskill@latest install santosomar/general-secure-coding-agent-skills/legacy-code-summarizerSKILL.md
Legacy Code Summarizer
Legacy code has no docs, misleading names, and commit history that says fix. The summary you produce is archaeology — reconstructing intent from artifacts. Be honest about what's deduction vs. what's guesswork.
Differs from → code-summarizer: that one assumes the code is readable. This one assumes it isn't.
Evidence sources — in order of reliability
| Source | Reliability | What it tells you | |
|---|---|---|---|
| What the code does (dataflow) | High | Actual behavior. Can't lie. | |
| How it's called (grep callers) | High | What callers pass in, what they do with the result | |
| Tests (if any) | High | Someone wrote down an expectation | |
| Variable/function names | Medium | Might be right. Might be copy-pasted from elsewhere. | |
| Comments | Low | Often stale. Trust the code over the comment. | |
| Commit messages | Low | "fix bug", "wip", "asdf" |
Step 1 — Trace the data, not the names
Start from inputs, follow to outputs. Ignore what things are called; watch what happens to them.
Data trace: counts 0x1F bytes in buf[0..n], returns count + 1. That's "count fields in a unit-separator-delimited record." The +1 is fence-post: N separators → N+1 fields. Now you know what proc_rec means: "process record" → actually "count fields in record."
Step 2 — Look at callers
Caller uses the result to size an allocation for split_on with the same delimiter. Confirms: proc_rec is pre-counting fields so the split can allocate exactly. The abstraction is "two-pass field split: count pass, then split pass."
Step 3 — Mark confidence explicitly
Every claim in the summary gets a confidence tag:
- [observed] — this is what the code does, period.
- [inferred] — this is probably why, based on callers/structure.
- [guess] — name/comment suggests this, unverified.
- [unknown] — can't tell. Flag for a human who knows the history.
Worked example output
Code: 400 lines of Perl, sub munge_data, no comments, written 2009.
Summary:
Archaeology tools
| Question | Command | |
|---|---|---|
| Who calls this? | rg -w funcname across the repo | |
| When was this line last touched? | git blame -w <file> | |
| What did it look like before? | git log -p --follow -- <file> | |
| Who wrote it originally? | git log --diff-filter=A -- <file> (first commit adding) | |
| Was there ever a comment here? | git log -p -L <line>,<line>:<file> | |
| What else changed in the same commit? | git show <sha> — context for why |
Do not
- Do not trust names over behavior.
validate()might mutate.get_x()might have side effects. Read the body. - Do not write a summary that sounds confident about guesses. "This function validates input" [guess] is very different from "[observed]." Tag it.
- Do not summarize in isolation. The callers are half the story — they tell you which inputs actually occur and what's done with outputs.
- Do not clean up the code while summarizing. Understand first, change later. Changing what you don't understand is how legacy code gets worse.
Output format
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/code-analysis/legacy-code-summarizer/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/santosomar/general-secure-coding-agent-skills/legacy-code-summarizer)