cleanup-dead-code
Dead Code Cleanup for Python (using Vulture)
- License 许可
- MIT
- 最近更新
- 2026-09-24
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- cleanup-dead-code
- description
- Dead Code Cleanup for Python (using Vulture)
03 SKILL.md 正文
Vulture is installed in the project venv (not globally).
-
Run
python -m vulture . --min-confidence 60 --sort-by-size --exclude "venv,.venv,__pycache__,.git,build,dist"and present the report:- Group by file, show confidence levels and size impact
- Breakdown by type (functions, classes, variables, imports, modules), largest first
- Flag potential false positives (entry points, CLI commands, tests, dynamic usage)
- Suggest
--excludeor.vulture_whitelist.pyentries if patterns emerge
-
After I approve, remove dead code automatically (no per-edit confirmation):
- Work file-by-file in small batches
- Show clear diffs for each edit
- Preserve formatting, comments, docstrings, and structure
- Skip anything below 80% confidence unless obviously safe
-
Run
ruff check --fix --select F401,Ito clean up remaining unused imports
Safety rules:
- Never break public APIs, framework conventions, or tests
- Account for implicit/dynamic usage
- Suggest
git stashbefore large changes
04 同仓库更多 Skills
example-skill
Replace this with your skill description
example-skill
Replace this with your skill description
publish-polish
Final audit and polish workflow for converting a personal Python project into a publication-ready open-source GitHub repository. Checks security and privacy (including git history), code quality, documentation, packaging metadata, and repo hygiene, then produces a structured readiness report with prioritized findings. Invoke before making a private repo public or before a first release.
optimize-repo-skills
Audits a repository's harness skills against the actual codebase, proposes conservative skill updates, and after explicit approval updates, creates, or removes repo-specific skills.
merge-conflict-resolver
Resolves merge conflicts inside a temporary integration worktree created by the workflow script, preserves approved plan intent and latest base behavior, and writes a conflict-resolution summary without committing.
implement-worktree
Implements an approved Markdown plan inside the current script-created git worktree, verifies the result, commits the implementation, and writes a handoff summary for audit.