dsa-codebase-audit
Skill2 starsChanged 2 months agoMITView on GitHub
Run an application-wide, read-only audit for materially useful simplifications in data structures, state representation, control flow, algorithms, lifecycle, and ownership. Use when the user asks for a DSA codebase audit, state-model or organizing-model audit, structural simplification review, complete subsystem audit, or explicitly invokes the dsa-codebase-audit skill. Do not use for security audits, ordinary bug hunts, style reviews, performance-only profiling, or implementation work.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- scottwater/skillsedited, first seen Sep 4, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- scottwater/skills★ 215% same
Wrote their own version · 0
None found.
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 repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- diagnose-crashSkill
- dns-cloudflareSkill
- email-best-practicesSkill
- resend-cliSkill
- resendSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 13 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Treat the target repository as read-only.
- Distinctive: line 13
Do not edit files, run tests, build, format, generate code, install dependencies, commit, push, or invoke commands that can write caches or …
- Distinctive: line 14
Use only read-only inspection commands.
- Distinctive: line 15
Keep working notes in the task context.
- Distinctive: line 20
If the repository cannot be identified safely from the current context, ask the user for its path before starting.
- Very specific: line 46
Treat the inventory as the coverage contract.
- Distinctive: line 50
When subagents are available, act as coordinator and delegate distinct, non-overlapping subsystem boundaries in bounded waves.
- Distinctive: line 57
Do not modify the repository or execute tests and write-producing commands.
- Distinctive: line 72
remove meaningful duplicated branching or competing sources of truth.
- Distinctive: line 77
Do not recommend changes solely for:
- Distinctive: line 87
Prefer clear local code when it is already the simplest honest representation.
- Distinctive: line 118
Before finishing, perform fresh coordinator passes for:
- Distinctive: line 126
If the coverage pass finds a real omission, add an explicit subsystem row and review it.
- Distinctive: line 132
Write the final report in English.
- Very specific: line 141
If no opportunity survives independent validation, say so plainly.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
DSA Codebase Audit
Audit the complete target repository without changing it. Favor concrete simplifications that eliminate invalid state, duplicated decision logic, unnecessary repeated work, or unclear ownership. Do not manufacture findings.
Preserve the repository
- Treat the target repository as read-only.
- Do not edit files, run tests, build, format, generate code, install dependencies, commit, push, or invoke commands that can write caches or runtime state.
- Use only read-only inspection commands.
- Keep working notes in the task context. If a persistent report is requested, write it only outside the target repository to a user-approved or app-designated output location.
- Record the current commit, branch, and exact
git status --shortoutput before reviewing. A dirty worktree is allowed; never clean or alter it. - Repeat the repository-state checks at the end. Disclose any difference and do not attribute an externally produced change to the audit.
- Inspect existing tests, but do not execute them. Describe additional validation that a later implementation would require.
If the repository cannot be identified safely from the current context, ask the user for its path before starting.
1. Establish the coverage contract
Inspect the repository topology, manifests, entry points, and package boundaries. Inventory every identifiable subsystem before opening detailed review lanes.
Give each subsystem:
- a stable ID and descriptive name;
- an exact, non-overlapping ownership boundary;
- key implementation files;
- relevant public interfaces, major call sites, and tests;
- a status:
queued,in review,recommend, orskip.
Include frontend, backend, shared infrastructure, platform bridges, generated-contract ownership, persistence boundaries, background processing, and test/tooling infrastructure where materially relevant. Do not use broad catch-all rows as proof of coverage.
Maintain one canonical audit record in the task context containing:
- the subsystem inventory;
- confirmed opportunities;
- explicit skip decisions;
- cross-cutting patterns;
- duplicates and superseded findings;
- final priorities and dependencies;
- a concise audit log.
Treat the inventory as the coverage contract. Continue until every row reaches recommend or skip.
2. Run bounded subsystem reviews
When subagents are available, act as coordinator and delegate distinct, non-overlapping subsystem boundaries in bounded waves. Never exceed the number of lanes that can be actively coordinated. Use a consolidated wait, let productive reviewers finish, and harvest their results before reusing a lane.
Give each reviewer this brief:
- Stay inside the assigned ownership boundary. Inspect its implementation, public interfaces, major call sites, and existing tests.
- Return at most two materially useful opportunities. Return
skipwhen none clearly meets the threshold. - Mention cross-subsystem concerns without expanding the assigned scope.
- Do not modify the repository or execute tests and write-producing commands.
Look for:
- scattered booleans or nullable fields that permit invalid combinations and should become a state machine, enum, or discriminated union;
- repeated assumptions about object shape that require one shared typed model or contract;
- duplicated decision structures that a small map, registry, reducer, or command model would materially simplify;
- unclear state or behavior ownership that a small module boundary would clarify;
- repeated scans, transformations, or lookups where a more appropriate collection or index would simplify behavior or complexity;
- lifecycle, concurrency, or asynchronous states whose representation permits stale or contradictory state;
- control flow whose complexity comes from the representation rather than the underlying domain.
Require a material benefit. A recommendation must credibly achieve at least one of these:
- make an important invalid state unrepresentable;
- remove meaningful duplicated branching or competing sources of truth;
- reduce repeated algorithmic work on a relevant path;
- establish one clear owner for a lifecycle or business invariant;
- materially simplify a public interface or its callers.
Do not recommend changes solely for:
- stylistic consistency or renaming;
- speculative extensibility;
- minor line-count reduction;
- generic deduplication with no behavioral benefit;
- hiding existing branching behind a new type;
- introducing a pattern, layer, service, DTO, or abstraction because it is fashionable;
- security, generic performance, dead-code, or UI/UX concerns outside this audit's structural scope.
Prefer clear local code when it is already the simplest honest representation.
For every proposed opportunity, require:
- Verdict:
recommendorskip. - Evidence with exact file and line references.
- Current complexity, duplicated decisions, or representable invalid states.
- Proposed representation and why it is simpler.
- Smallest credible implementation scope, including affected files and interfaces.
- Regression risks and migration concerns.
- Existing validation and additional validation required.
- Confidence:
high,medium, orlow.
3. Validate and synthesize
Independently verify every candidate against the current repository before accepting it. Read the cited source, relevant interfaces, callers, and tests.
Reject, narrow, merge, or demote recommendations that:
- are vague or lack line-level evidence;
- duplicate another finding;
- misunderstand intentional semantics;
- cross the stated ownership boundary without proof;
- merely relocate complexity;
- increase abstraction without eliminating a concrete problem;
- describe a bug, security issue, or performance concern that belongs to another audit.
Record reviewer skips as completed coverage. Deduplicate overlapping findings and assign every accepted recommendation to one authoritative subsystem.
4. Audit the audit
Before finishing, perform fresh coordinator passes for:
- repository coverage and missing subsystem boundaries;
- duplicate findings and ownership overlap;
- materiality and over-abstraction;
- completeness of every required finding field;
- dependency-aware priority ranking.
If the coverage pass finds a real omission, add an explicit subsystem row and review it. Do not hide the omission by broadening a completed boundary.
Rank accepted recommendations by concrete impact, confidence, implementation effort, blast radius, prerequisites, and the value of the smallest first slice.
5. Deliver the report
Write the final report in English. Lead with the most important accepted findings, then provide:
- Repository snapshot: path, commit, branch, initial worktree state, and audit boundaries.
- Ranked accepted recommendations with the complete eight-field schema.
- Coverage matrix showing every subsystem and its
recommendorskipoutcome. - Cross-cutting observations, duplicates removed, dependencies, and suggested implementation order.
- Validation limitations: tests inspected but not run, plus the validation each later change requires.
- Final repository-state comparison and an explicit statement of whether the repository remained unchanged.
If no opportunity survives independent validation, say so plainly. A complete audit with all subsystems marked skip is a valid successful result.
The audit is complete only when every identifiable subsystem has been reviewed, every row has a recommendation or explicit skip, every accepted finding has complete evidence and risk fields, duplicates and weak abstractions have been removed, priorities and dependencies are consistent, and repository state has been checked again.
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.

