purify skill
✓ VerifiedRemoves AI-generated code slop from git diffs by eliminating unnecessary comments, abnormal defensive checks, and deep nesting without changing behavior.
- GitHub stars
- 113
- Files
- 1
- Last commit
- Nov 1, 2026
- License
- MIT
- Allowed tools
- —
What does the purify skill do?
purify removes AI-generated code slop from git diffs by eliminating unnecessary comments, abnormal defensive checks, and deep nesting without changing behavior.
Summary generated from the skill's SKILL.md.
About the purify skill
Cleaning up AI-generated code clutter from git diffs is the primary function of this tool. Developers use it to strip away unnecessary comments, abnormal defensive checks, and deep nesting from their branch changes before committing code. It works by comparing the current branch diff against a base branch, which defaults to main, and targets only the lines modified by the branch to ensure the original behavior remains untouched.
An agent should load this skill when a user requests to deslop, clean up a diff, or remove AI slop. The tool identifies specific patterns like casts to any used to bypass type errors or excessive try/catch blocks that do not belong in trusted code paths. While it focuses on removing impurities, it prioritizes minimal and focused edits over broad rewrites to maintain the integrity of the existing codebase.
What an agent can do with it
- 1Remove unnecessary code commentsClean up a git diff by removing comments that are inconsistent with the local file style.
- 2Flatten deeply nested logicRefactor code to reduce deep nesting by implementing early returns.
- 3Eliminate improper type castsIdentify and remove casts to any that were used solely to bypass type errors.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the purify skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the purify skill in Plugin
/plugin marketplace add tmcfarlane/team-avatar /plugin install team-avatar@team-avatar
Install the purify skill in Claude Code
~/.claude/skills/purify/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/purify ~/.claude/skills/purifyInstall the purify skill in Claude Code (project)
.claude/skills/purify/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/purify .claude/skills/purifyInstall the purify skill in Codex
~/.agents/skills/purify/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/purify ~/.agents/skills/purifyInstall the purify skill in Gemini CLI
~/.gemini/skills/purify/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/purify ~/.gemini/skills/purifyInstall the purify skill in Claude.ai
npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/purify purify && zip -r purify.zip purify # claude.ai → Customize → Skills → + → Create skill → Upload a skill → purify.zip
Automated checks
Ran Nov 16, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachabletmcfarlane/team-avatar/plugins/team-avatar/skills/purify is public and reachablegithub.com/tmcfarlane/team-avatar/tree/HEAD/plugins/team-ava ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-01github.com/tmcfarlane/team-avatar/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/tmcfarlane/team-avatar/blob/HEAD/plugins/team-ava ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/tmcfarlane/team-avatar/blob/HEAD/plugins/team-ava ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 31 linesgithub.com/tmcfarlane/team-avatar/blob/HEAD/plugins/team-ava ↗Pass
SKILL.md
View on GitHubKatara purifies the water
A waterbender can pull silt, salt, and poison out of water and leave the water itself untouched. Purify does that to a diff. It draws out what an agent added that does not belong, and keeps every drop of behavior.
Scope
Check the diff against the base branch (default main, including the working tree) and remove the AI-generated slop the branch introduced. Touch only lines the branch changed.
What to draw out
- Extra comments that are unnecessary or inconsistent with the file's local style. For a full comment pass, run
clear-water. - Defensive checks or
try/catchblocks that are abnormal for a trusted code path. Guards belong at system boundaries (Boundary Discipline, Earth infour-elements). - Casts to
anyused only to get past a type error. Fix the type instead (seetypescript-forms). - Deeply nested code that early returns would flatten.
- Any other pattern inconsistent with the file and the code around it.
Rules
- Keep behavior unchanged unless you are fixing a clear bug.
- Prefer minimal, focused edits over broad rewrites.
- Run the nearby tests after the pass. Purify that breaks a test has poisoned the water.
Reply
One to three sentences on what you removed.
Files in this skill
1purify skill questions
How do I install the purify skill in Claude Code?
Run npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/purify ~/.claude/skills/purify. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the purify skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What kind of code slop does purify remove?
It removes unnecessary comments, abnormal defensive checks or try/catch blocks, casts to any, and deeply nested code.
Does purifying code change the application's behavior?
No, the tool is designed to remove impurities while keeping the original behavior unchanged.
How does the tool determine what to clean?
It checks the current branch diff against the base branch, which defaults to main.