Back home

Repository Hygiene

AI Agent Codebase Cleanup & Scratch File Pruning Skill

Cleans up agent debris: scratch scripts, unused imports, orphan test outputs, and temporary benchmark files before finishing tasks.

Install Codebase Cleanup Skill

$ bunx skills add NaveenGumaste/keyskills/codebase-cleanup

Guaranteed Outcomes

Why install Codebase Cleanup?

01

Zero Agent Residue

Eliminates scratch.py, test.tmp, curl scripts, and debug logs left behind by autonomous agents.

02

Dead Dependency Purge

Identifies and removes packages added during experimentation that are no longer imported in production code.

03

Compiler & Linter Verification

Ensures the codebase builds and passes typechecking clean after pruning so no broken references remain.

SKILL.md Directives

What the agent enforces

When installed, your autonomous agent loads these strict directives into memory before executing code generation or repo initialization:

.agents/skills/codebase-cleanup/SKILL.md
Markdown
# Codebase Cleanup Directives
- Delete temporary test scripts, curls, and scratch files.
- Run linter and tree-shaker to eliminate unused imports.
- Maintain a lean repository directory structure.

Questions & Answers

Frequently asked questions

What files does the Codebase Cleanup skill remove?

It targets temporary benchmark files, ad-hoc test scripts (e.g., test-script.js, scratch.ts), orphan curl logs, and unused mock data created during problem solving.

Will it accidentally delete my project source code?

No. The rules explicitly instruct the agent to run typechecks and test builds to verify that all deletions are strictly unreferenced residue.

README Badge Generator

Badge your repository

Show contributors your repo uses high-agency agent skills.

Preview:Built with KeySkills
[![Built with KeySkills](https://img.shields.io/badge/skills-KeySkills-ff6b00?style=flat-square&logo=github)](https://keyskills.ngxlabs.tech)

More portable agent skills