gpsaggese/helpers / .claude/skills/git.delete
git.delete
VerifiedRemove a function, file, or directory from the repo and clean up all references
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.8 KB |
SKILL.md
View on GitHub---
description: Remove a function, file, or directory from the repo and clean up all references
model: haiku
---
# Goal
- Given a target `<SRC>` (function, file, or directory), remove it cleanly, with no
dangling references or dead code
- Identify what `<SRC>` is before proceeding
# If `<SRC>` Is a Function
- **Remove the function definition** from its source file
- **Find all callers** across the codebase and remove or refactor them
- **Remove orphaned helpers**: recursively remove functions now called only by
`<SRC>` (or each other)
- **Remove tests** that exclusively test `<SRC>` or its orphaned helpers
- **Clean up imports** that were only needed by the deleted code
# If `<SRC>` Is a File or Directory
- **Remove the file/directory** from the repo
- **Find all references**: any `import`, `from ... import`, `require`, or path
string pointing to `<SRC>`
- **Remove or refactor each reference**: delete the import and any dependent code,
or replace it with a substitute if one exists
- **Remove related tests** that exclusively test the removed file/directory
- **Update configs** (e.g. `pyproject.toml`, `setup.py`, `__init__.py`,
`MANIFEST.in`) that reference `<SRC>`
# After Removal (all Cases)
- Summarize the changes
- Do not commit any change
# Verification
- [ ] Run the test suite to confirm nothing is broken
- [ ] Run a final grep for the removed name to catch remaining references
- [ ] The file `plan.md` says that it was generated by
`.claude/skills/git.delete/SKILL.md`
# Ask for Help If Unsure How to Do
- If the task is not perfectly clear, you MUST not perform it, but ask for
clarifications
- For a complex task, create a `plan.md` with 5 bullet points explaining the plan
- Say in `plan.md` how it was generated, with this line as the first bullet:
```markdown
- Generated by `.claude/skills/git.delete/SKILL.md`
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |