code-analysis
Skill4 starsChanged 4 months agoMITView on GitHub
Builds an understanding of a whole codebase or subsystem — what it does, how it is structured, where the risk and complexity concentrate, and reports it as a map someone can act on. Use this whenever the user is new to a repo, inherits unfamiliar code, asks how something works end to end, wants an architecture overview or health assessment, or is deciding whether to refactor, extend, or replace. For reviewing a specific change, use code-review.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- qingyun1/agentskillstheir own version, first seen Jul 10, 2026
- Dqz00116/skill-libtheir own version, first seen Apr 19, 2026
- bejranonda/LLM-Autonomous-Agent-Plugin-for-Claudetheir own version, first seen Apr 1, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- bejranonda/LLM-Autonomous-Agent-Plugin-for-Claude★ 28same name
- Dqz00116/skill-lib★ 22same name
- qingyun1/agentskills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository61 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-deploymentSkill
- agent-designSkill
- agent-evaluationSkill
- agent-hardeningSkill
- agent-implementationSkill
- agent-observabilitySkill
- agent-scopingSkill
- api-designSkill
- code-templatingSkill
- dependency-upgradeSkill
- error-handlingSkill
- feature-implementationSkill
- project-scaffoldingSkill
- refactoringSkill
- data-analysisSkill
- data-migrationSkill
- data-modelingSkill
- sql-queriesSkill
- ci-pipelinesSkill
- containerizationSkill
- deployment-strategiesSkill
- infrastructure-as-codeSkill
- debuggingSkill
- issue-investigationSkill
- issue-triageSkill
- log-analysisSkill
- network-troubleshootingSkill
- performance-profilingSkill
- api-documentationSkill
- commit-messagesSkill
- diagrammingSkill
- markdown-docsSkill
- plain-languageSkill
- pr-descriptionsSkill
- release-notesSkill
- browser-testingSkill
- integration-testingSkill
- load-testingSkill
- test-dataSkill
- test-driven-developmentSkill
- unit-testingSkill
- deep-researchSkill
- feed-digestSkill
- summarizationSkill
- accessibility-reviewSkill
- code-lintingSkill
- code-reviewSkill
- auth-designSkill
- dependency-auditSkill
- secrets-managementSkill
- security-analysisSkill
- threat-modelingSkill
- capacity-planningSkill
- disaster-recoverySkill
- incident-responseSkill
- monitoring-setupSkill
- root-cause-analysisSkill
- runbooksSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Before opening source files, read what the project says about itself and what it demonstrably does: README, entry points, public API or …
- Distinctive: line 28
Every codebase has a small number of paths that carry most of the value.
- Distinctive: line 31
Follow it end to end before branching.
- Very specific: line 95
Use path/to/file.py:120 references throughout.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code analysis
The output is a map: what exists, how it fits together, and where the danger is. A map is judged by whether someone can navigate with it, not by how much of the territory it mentions.
Analysis fails by exhaustiveness — describing every module at equal depth produces a document with the same information density as the source, and no reason to read it. Depth must be unequal, concentrated where the risk and the change is.
1. Read the outside before the inside
Before opening source files, read what the project says about itself and what it demonstrably does: README, entry points, public API or route definitions, configuration, CI pipeline, dependency manifest, and the shape of the test suite.
This gives you the intended architecture. The gap between it and the real one is a finding.
Done when: you can state what the system does, who calls it, and what it calls.
2. Find the spine
Every codebase has a small number of paths that carry most of the value. Trace one all the way through — a request from entry to response, a job from trigger to side effect.
Follow it end to end before branching. The spine teaches you the project's real conventions, its layering, and where its abstractions leak, far faster than reading modules in isolation.
Done when: you can narrate one complete path through the system, naming each hop.
3. Let the repository tell you where the risk is
History is evidence and costs almost nothing to gather. Where change concentrates, risk concentrates.
git log --format=%H --since="1 year ago" | wc -l
git log --name-only --format= --since="1 year ago" | sort | uniq -c | sort -rn | head -20Cross-reference the churn list against size and test coverage. The intersection — large, frequently changed, poorly tested — is where incidents come from, and it is the most valuable paragraph in your report.
Also worth a look: files changed by many different authors (shared, so conventions drift), and files changed by exactly one author who has left.
Done when: you have a ranked list of hotspots grounded in history, not impression.
4. Assess structure honestly
- Layering: is there one, is it enforced, and where is it violated? A single import that crosses layers is a defect; a hundred means the layering is aspirational and should be described as such.
- Coupling: what would you have to touch to change one behaviour? Concepts defined in more than one place are where bugs get half-fixed.
- Boundaries: where does the system talk to the outside? Those are the places that fail, and the places that constrain change.
- Dead code: unreferenced modules, unreachable branches, flags permanently on. Note it; deleting it is the cheapest available improvement.
- Tests: what do they actually cover? Look at what they assert, not the coverage number. A suite that exercises everything and asserts nothing is worse than none, because it is trusted.
Done when: each dimension has a stated finding, including "fine, no action".
5. Report as a map with a recommendation
# <System> — analysis
**What it does:** one paragraph, no jargon
**Shape:** the 4–6 components that matter and how they connect
## The spine
The main path, hop by hop, with file references.
## Hotspots
| Area | Churn | Size | Tests | Why it matters |
## Structural findings
Ranked. Each: what it is, what it costs today, what it will cost later.
## If you change one thing
The single highest-value change, and why it beats the alternatives.
## Not covered
What was out of scope, and what remains unknown.Use path/to/file.py:120 references throughout. A map without coordinates is an essay.
The "not covered" section is mandatory. An analysis that does not state its own limits gets read as complete, and its silence gets read as approval.
Rules
- Depth follows risk. The hot, untested, load-bearing module deserves ten times the words of a stable utility. Equal depth is a failure of analysis, not a sign of thoroughness.
- Separate observation from judgment. "Auth logic appears in three modules" is observation. "This should be consolidated" is judgment, and the reader is entitled to weigh them apart.
- Report what you did not read. Nobody reads a large codebase completely. Which parts you skipped changes how much the reader should trust the conclusions.
- Do not recommend a rewrite casually. It is almost always the wrong answer, and proposing it costs you credibility on the recommendations that would actually help.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

