- Installs
- 354
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/gjalla/engineering --skill gjalla-cleanup-audit- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads gjalla-cleanup-audit automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Cleanup Audit
Find the code that is costing us in maintenance costs, causing confusion to agents and humans who onboard. Usually this is due to being unused, duplicated, or overengineered.
You must prove something is dead before deleting it. Grep does not see every reference, and removing code with a full confidence verification will result in production incidents.
Process
Phase 1: Orient
Establish your boundary. Within the repo is great, make sure that you consider cross-repo interoperability when assessing impact. gjalla can help you with this. Briefly review recent changes to give you an idea of hotspots, though no areas should be ignored. Check architecture, rules, learnings, and system evolution in gjalla.
Phase 2: Investigate
Find dead code, duplicated logic (or very similar but drifted), overengineering, code that doesn't follow intended architectural patterns (therefore causing spaghetti code), additions that are chaotic, etc.
Phase 3: Verify
For every candidate, enumerate references across the whole boundary, including ways that references can hide from grep. For example, be especially careful with public API endpoints because you cannot see all callers.
Phase 4: Classify
| Tier | Description | Action |
|---|---|---|
| Tier 1 | Provably dead: zero references after full enumeration, no dynamic or external reach | Delete, with its tests |
| Tier 2 | Dead in code but leaves data behind (orphaned rows, columns) | Delete code now; decide on data separately and deliberately |
| Tier 3 | Duplication with a clear owner | Consolidate to one implementation, keep the best-tested one |
| Tier 4 | Suspicious but unproven, or reachable from outside the boundary | Report, do not delete. Name what would settle it |
| Stale claims | Comments, docs, specs asserting things that aren't true | Correct immediately — cheapest and highest-value fix in the audit |
Phase 5: Remove in waves
Leaf-first, so nothing breaks midway: tests, then callers, then the implementation, then the data file or module. Run the relevant suite between waves. Keep each wave independently revertible, and don't mix a deletion wave with a refactor.
Output
- Tier 1 deletions: file paths, line counts, and the enumeration that proves each is dead.
- Tier 3 consolidations: which copies exist, which survives, what test pins the behavior.
- Tier 4 unproven: what you suspect and what evidence would settle it.
- Stale claims corrected: what was asserted, what is actually true.
- Impact: what gets simpler, what risk you accepted, what you deliberately left alone.
Principles
- Proof, not confidence. "I couldn't find a caller" and "there is no caller" are different claims. Report which one you have.
- Deletion is the best refactor. Code that doesn't exist has no bugs, needs no tests, and confuses nobody.
- Don't delete data on a code audit. Rows outlive the code that wrote them and may have been edited since. Removing the writer is a code decision; removing what it wrote is a product decision, and it belongs to a human.
- Fix the misleading thing first. A stale comment or a spec claiming finished work will cause a wrong decision faster than dead code will.
- One concern per change. A cleanup that also "improves things while in there" is impossible to review and impossible to revert cleanly.
FAQ
What does the gjalla-cleanup-audit skill do?
Audit a codebase for dead code, unreachable branches, duplicated logic, and vestigial abstractions, then remove them safely with proof. Use to reduce sprawl, pay down tech debt, or clean up after a feature is retired or migrated.
How do I install gjalla-cleanup-audit?
Run npx skills add https://github.com/gjalla/engineering --skill gjalla-cleanup-audit in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/gjalla-cleanup-audit/ (personal) or .claude/skills/gjalla-cleanup-audit/ (project).
Which AI agents can use gjalla-cleanup-audit?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is gjalla-cleanup-audit safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains gjalla-cleanup-audit?
It is published by gjalla in gjalla/engineering. It has 354 recorded installs.
More from gjalla/engineering
gjalla-spec-review
gjalla/engineering
Full review of a plan or spec to be sure there are no surprises, gaps, or mistakes. Use to harden a spec before implementation.
gjalla-test-audit
gjalla/engineering
Audit a test suite to find tests that give false confidence — tests that encode bugs, duplicate coverage, or are so heavily mocked they can't catch real regressions. Use to improve robustness, audit coverage, or harden a risky area.
gjalla-code-review
gjalla/engineering
Review a code change (diff or PR) for ship-readiness before merge. Use when reviewing your own or someone else's changes prior to committing/merging/etc.
gjalla-prepare-and-commit
gjalla/engineering
Make sure your code is ready to commit, then stage changes into clean, atomic commit. Use before committing.
gjalla-spec
gjalla/engineering
Create a well-thought-out plan covering problem statement, goals, technical approach, and verification criteria. Use while planning / before implementing any non-trivial feature.
gjalla-breakdown
gjalla/engineering
Break a feature spec into intentional waves and bite-sized tasks grouped by dependency. Use after a spec is written to prepare for easy-to-track implementation.
Popular security skills
azure-compliance
microsoft/azure-skills
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
minimal-run-and-audit
lllllllama/rigorpilot-skills
Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.
seo-audit
coreyhaines31/marketingskills
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.
firebase-security-rules-auditor
firebase/agent-skills
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.
audit
pbakaus/impeccable
Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
competitors
coreyhaines31/marketingskills
When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.
