code-cleanup
Targeted cleanup skills — dead code, error handling, types, function extraction.
Skill by dmoskov
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/dmoskov-code-cleanup
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
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
What's inside
- Skill name
code-cleanup- Description
- Targeted cleanup skills — dead code, error handling, types, function extraction. Run one or all.
- License
- MIT
- Instructions
- 59 lines in SKILL.md · view on GitHub
Files (6)
- README.md
- SKILL.md
- dead-code.md · prompts/
- error-handling.md · prompts/
- extract-functions.md · prompts/
- type-annotations.md · prompts/
SKILL.md (first lines)
# Code Cleanup Skill A set of focused cleanup skills. Each targets exactly one concern and produces a diagnostic summary before making any changes. Based on the "cleanup waves" pattern. ## Sub-Skills | Sub-Skill | What It Does | |-----------|--------------| | `dead-code` | Remove unused imports, unreachable code, unused functions | | `error-handling` | Find bare except/catch, missing error handling, silent failures | | `type-annotations` | Add missing type annotations (Python: mypy, TS: strict mode) | | `extract-functions` | Find functions >50 lines and extract logical units | ## Usage Run all sub-skills sequentially: ``` /code-cleanup ``` Or run a specific sub-skill by mentioning it: ``` "clean up dead code" "audit error handling" "add type annotations" "extract long functions" ``` ## Workflow Each sub-skill follows the same pattern: 1. **Scan** — Search the codebase for the target pattern 2. **Diagnose** — Produce a summary table of findings with file paths and line numbers 3. **Confirm** — Present findings to the user before making changes 4. **Fix** — Apply targeted fixes, one file at a time 5. **Verify** — Run lint/tests to confirm nothing broke ## Prompts Each sub-skill has its own prompt in `prompts/`: - `prompts/dead-code.md` — Unused imports, unreachable code, dead functions - `prompts/error-handling.md` — Bare except, silent failures, missing handlers - `prompts/type-annotations.md` — Missing types for Python (mypy) and TypeScript (strict) - `prompts/extract-functions.md` — Long functions, logical extraction points ## Running All Sub-Skills When triggered with the generic "code cleanup" command, run each sub-skill in order: 1. Dead code (safest — only removes, never adds) 2. Error handling (adds safety, rarely breaks things) 3. Type annotations (additive, improves tooling) 4. Extract functions (structural change — do last) Commit after each sub-skill completes so changes are atomic and reviewable.
From dmoskov/sharedskills, MIT.
More from dmoskov/sharedskills
- 0.554score
environmental-scan
dmoskov
Scan the external environment for threats and opportunities affecting this project — CVEs in your dependencies, API/SDK changes, notable releases and research
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
security-audit
dmoskov
Run a comprehensive security audit on any codebase, checking for OWASP Top 10 and common vulnerability patterns
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
self-critique
dmoskov
Post-task self-critique using an independent Gemini reviewer to identify errors or improvements
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
task-decomposition
dmoskov
Break a large or vague task into file-level Asana subtasks with custom fields from your workspace config
SkillBFreshness: B★ 2Claude Code +9 - 0.546score
claudemd-generator
dmoskov
Generate a comprehensive CLAUDE.md for any project by scanning the codebase
SkillBFreshness: B★ 2Claude Code +9 - 0.507score
brand-identity
dmoskov
Create a distinctive logo mark and a token-based theme for a project, using the "Asphodel method" — one reusable SVG path composed by rotation, plus a…
SkillCFreshness: C★ 2Claude Code +9 - 0.448score
rlm
dmoskov
Use when processing very long contexts, large documents, or extensive codebases that exceed practical context window limits.
SkillDFreshness: D★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Aug 21, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/dmoskov/sharedskills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from dmoskov
- 0.554score
environmental-scan
dmoskov
Scan the external environment for threats and opportunities affecting this project — CVEs in your dependencies, API/SDK changes, notable releases and research
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
security-audit
dmoskov
Run a comprehensive security audit on any codebase, checking for OWASP Top 10 and common vulnerability patterns
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
self-critique
dmoskov
Post-task self-critique using an independent Gemini reviewer to identify errors or improvements
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
task-decomposition
dmoskov
Break a large or vague task into file-level Asana subtasks with custom fields from your workspace config
SkillBFreshness: B★ 2Claude Code +9 - 0.546score
claudemd-generator
dmoskov
Generate a comprehensive CLAUDE.md for any project by scanning the codebase
SkillBFreshness: B★ 2Claude Code +9 - 0.507score
brand-identity
dmoskov
Create a distinctive logo mark and a token-based theme for a project, using the "Asphodel method" — one reusable SVG path composed by rotation, plus a…
SkillCFreshness: C★ 2Claude Code +9
Cite this page
code-cleanup skill. Agent Mart. https://agentmart.dev/skills/dmoskov-code-cleanup (last updated 2026-10-24)