behavior-preserving-cleanup

behavior-preserving-cleanup is a skill for Claude Code, Codex from hoanganhduc/ai-agents-skills. It costs 60 tokens per session (512 once invoked), scanned A, original, GPL-3.0.

A code-cleanup procedure that aims to improve clarity while keeping behavior unchanged. It can cover code, configuration, research scripts, or prose.

In plain words
What is it for?
Use it for renaming, simplifying, de-duplicating, or restructuring an existing file or project when compatibility must be preserved.
Why use it?
It reduces duplication and confusing structure without intentionally changing what the target does. It checks the target first and re-checks behavior after each change.

Skill for Claude CodeCodex

Which agent this was written for is unclear — body not stored (licence); the path alone says nothing.

Good fit Use it for renaming, simplifying, de-duplicating, or restructuring an existing file or project when compatibility must be preserved.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoanganhduc/ai-agents-skills/behavior-preserving-cleanup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hoanganhduc/ai-agents-skills --skill behavior-preserving-cleanup
Clone the repo
git clone --depth 1 https://github.com/hoanganhduc/ai-agents-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for behavior-preserving-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoanganhduc/ai-agents-skills/behavior-preserving-cleanup/github.svg)](https://agentmods.dev/skills/hoanganhduc/ai-agents-skills/behavior-preserving-cleanup)
Your own site
<a href="https://agentmods.dev/skills/hoanganhduc/ai-agents-skills/behavior-preserving-cleanup"><img src="https://agentmods.dev/badge/skills/hoanganhduc/ai-agents-skills/behavior-preserving-cleanup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for behavior-preserving-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoanganhduc/ai-agents-skills/behavior-preserving-cleanup"><img src="https://agentmods.dev/badge/skills/hoanganhduc/ai-agents-skills/behavior-preserving-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 512 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.00512
Opus 5 $0.00030 $0.00256
Sonnet 5 $0.00012 $0.00102
Haiku 4.5 $0.00006 $0.00051

Measured 11d ago against content hash e56da4405b33, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

behavior-preserving-cleanup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

canonical/skills/behavior-preserving-cleanup/SKILL.md · 49 lines

The source is not reproduced here

Licensed GPL-3.0

The repository is licensed GPL-3.0, which this catalogue does not treat as permission to reproduce the file. Read it at the source.

Read it on GitHub

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 49 lines · 60 tokens per session scan A e56da4405b33

Subscribe to this mod's changes

behavior-preserving-cleanup is a skill published in the GitHub repository hoanganhduc/ai-agents-skills (2 stars, last pushed yesterday), licensed GPL-3.0. It adds 60 tokens to every session and 512 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

gh-pr-review

Automated Cherry Studio review for local branches, PRs, commits, files, architecture docs, and repository skills. Use for code or documentation reviews that need project-specific naming, main/renderer/shared placement and dependency rules, IpcApi and DataApi boundaries, lifecycle/service ownership, renderer hooks…

CherryHQ/cherry-studio · 147 tokens

superpowers-receiving-code-review

Got review feedback? Load BEFORE changing anything — verify each point, push back if wrong.

christopherarter/superpowers-reasonix · 26 tokens

agent-watchdog

Use when asked to watch, babysit, audit, review, compare, or fix another agent's work from a Codex session ID, Claude Code session/transcript, chat/thread link, PR, branch, log, or pasted run summary. Monitor until the other agent is done or blocked, reconstruct what the user asked, independently investigate the same…

BuilderIO/skills · 115 tokens

comet-verify

Comet Phase 4: Verify and Close. Invoke with /comet-verify. Verify implementation matches design, handle development branch.

rpamis/comet · 32 tokens

cherry-electron-dev

Develop, fix, and profile Cherry Studio in a tracked Electron instance. Use for everyday implementation, UI and interaction work, bug fixing, runtime debugging, DevTools inspection, lag or jank investigation, CPU and memory monitoring, leak checks, and startup-performance analysis; reuse a verified workspace instance…

CherryHQ/cherry-studio · 75 tokens

issue-reporter

A tool for submitting a GitHub Issue, Bug Report, or Feature Request when the user explicitly asks for one. A GitHub Issue is a tracked report or request in a software project.

CherryHQ/cherry-studio · 73 tokens