code-cleanup-guardian
Safely refactor and clean up code without breaking existing functionality.
Skill by roborracle
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/roborracle-code-cleanup-guardian
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/code-cleanup-guardian
What's inside
- Skill name
code-cleanup-guardian- Description
- Safely refactor and clean up code without breaking existing functionality. Use when doing any code cleanup, refactoring, formatting, removing dead code, or restructuring files. Prevents regression by enforcing incremental changes and mandatory testing.
- License
- MIT
- Instructions
- 48 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Code Cleanup Guardian
Core safety protocol is in `~/.claude/rules/code-cleanup-safety.md`. This skill adds tactical guidance.
## Refactoring Assessment
Before starting, classify the cleanup scope:
| Scope | Risk | Approach |
|-------|------|----------|
| Formatting only | Low | Autoformat, single commit, verify no logic diff |
| Rename/move | Medium | Update all references, verify with grep, test |
| Extract function/module | Medium | Ensure identical behavior, compare outputs |
| Change data flow | High | Write characterization tests first, then refactor |
| Remove feature/code path | High | Prove zero references, check feature flags, test |
## Refactoring Workflows
### Extract & Split
1. Identify the boundary (function, class, module)
2. Copy to new location — do NOT cut yet
3. Redirect callers to new location one at a time
4. Test after each caller redirect
5. Remove original only after all callers migrated and tests pass
### Safe Rename
1. `grep -r "oldName" src/` — count all references
2. Rename with IDE refactor tool or find-and-replace
3. `grep -r "oldName" src/` — confirm zero references remain
4. Check string literals, config files, and dynamic references
5. Test
### Dead Code Removal
1. `grep -rn "targetName" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" --include="*.py" --include="*.php" .` (grep does not expand `{a,b}` braces inside `--include`)
2. Check for reflection, dynamic dispatch, or string-based references
3. Check test files — remove test coverage for dead code too
4. Remove in a dedicated commit with clear message
## Recovery Protocol
| Situation | Action |
|-----------|--------|
| Tests fail after one commit | `git revert HEAD` |
| Tests fail after multiple commits | `git log --oneline`, find last green, `git revert HEAD~N..HEAD` |
| Uncertain what broke | `git bisect start`, `git bisect bad`, `git bisect good <known-good>` |
| Everything is broken | Last resort, and only after the user confirms: it discards all local commits and uncommitted work. Show `git status` and `git log origin/main..HEAD` first, then `git reset --hard origin/main` |From roborracle/agent-workflow-kit, MIT.
More from roborracle/agent-workflow-kit
- 0.524score
devops-automator
roborracle
Set up CI/CD pipelines, configure cloud infrastructure, implement monitoring systems, and automate deployment processes.
SkillBFreshness: BClaude Code +9 - 0.524score
git-commit-helper
roborracle
Create properly formatted, detailed commit messages following Conventional Commits specification.
SkillBFreshness: BClaude Code +9 - 0.524score
github-issues-manager
roborracle
Automatically create GitHub issues for every quantifiable task during planning and development.
SkillBFreshness: BClaude Code +9 - 0.524score
handoff
roborracle
Use when ending, pausing, or wrapping up a working session, or when asked to write or update hand-off, continuity, or session-state docs (session end, hand…
SkillBFreshness: BClaude Code +9 - 0.524score
ai-engineer
roborracle
Build AI-powered applications with LLMs, embeddings, RAG systems, and AI agents.
SkillBFreshness: BClaude Code +9 - 0.521score
a11y-audit
roborracle
Audit frontend code for WCAG 2.1 AA accessibility compliance including semantic HTML, ARIA, keyboard navigation, and color contrast.
SkillBFreshness: BClaude Code +9 - 0.521score
api-client
roborracle
Integrate with third-party APIs and webhooks.
SkillBFreshness: BClaude Code +9 - 0.521score
code-reviewer
roborracle
Comprehensive code review from senior engineering perspective following OWASP standards and industry best practices.
SkillBFreshness: BClaude Code +9 - 0.521score
contract-test
roborracle
Detect breaking API changes before merge.
SkillBFreshness: BClaude Code +9 - 0.521score
db-migrate
roborracle
Design and execute safe database migrations.
SkillBFreshness: BClaude Code +9 - 0.521score
env-config
roborracle
Design and manage application configuration across environments.
SkillBFreshness: BClaude Code +9 - 0.521score
error-observability
roborracle
Implement structured error handling, logging, metrics, and observability.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 24, 2026 (1 month ago)
- Last release
- Aug 11, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/roborracle/agent-workflow-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from roborracle
- 0.524score
git-commit-helper
roborracle
Create properly formatted, detailed commit messages following Conventional Commits specification.
SkillBFreshness: BClaude Code +9 - 0.524score
handoff
roborracle
Use when ending, pausing, or wrapping up a working session, or when asked to write or update hand-off, continuity, or session-state docs (session end, hand…
SkillBFreshness: BClaude Code +9 - 0.524score
ai-engineer
roborracle
Build AI-powered applications with LLMs, embeddings, RAG systems, and AI agents.
SkillBFreshness: BClaude Code +9 - 0.524score
devops-automator
roborracle
Set up CI/CD pipelines, configure cloud infrastructure, implement monitoring systems, and automate deployment processes.
SkillBFreshness: BClaude Code +9 - 0.524score
github-issues-manager
roborracle
Automatically create GitHub issues for every quantifiable task during planning and development.
SkillBFreshness: BClaude Code +9 - 0.521score
git-protocol
roborracle
Audit git workflow compliance including branch architecture, commit standards, issue linkage, and production readiness (check git compliance, audit branches…
SkillBFreshness: BClaude Code +9
Cite this page
code-cleanup-guardian skill. Agent Mart. https://agentmart.dev/skills/roborracle-code-cleanup-guardian (last updated 2026-10-24)