code-simplify

code-simplify is a skill for Claude Code, Codex from hmj1026/dhpk. It costs 62 tokens per session (1,350 once invoked), scanned A, original, MIT.

A behavior-preserving review for making changed code simpler, more reusable, or more efficient without changing what it does. It reports proposed and applied changes together with baseline and final test results.

In plain words
What is it for?
Use it to review a file, directory, pull request, branch, or commit for unnecessary complexity and apply safe improvements within that scope.
Why use it?
It keeps cleanup focused on the requested change instead of turning into a redesign or correctness review. Tests provide evidence that the cleanup did not introduce a regression.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: $skill-name invocation.

Part of the dhpk plugin — 39 skills, 1 command, 1 agent, 3 hooks shipped together

Good fit Use it to review a file, directory, pull request, branch, or commit for unnecessary complexity and apply safe improvements within that scope.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hmj1026/dhpk/code-simplify
View source ↗ hmj1026/dhpk
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 hmj1026/dhpk --skill code-simplify
Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk

Made for: Claude Code, Codex.

Or install dhpk, the plugin that ships this one along with the rest of its 39 skills, 1 command, 1 agent, 3 hooks.

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 code-simplify

README.md
[![agentmods](https://agentmods.dev/badge/skills/hmj1026/dhpk/code-simplify/github.svg)](https://agentmods.dev/skills/hmj1026/dhpk/code-simplify)
Your own site
<a href="https://agentmods.dev/skills/hmj1026/dhpk/code-simplify"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/code-simplify/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 code-simplify

Your own site · 80×15
<a href="https://agentmods.dev/skills/hmj1026/dhpk/code-simplify"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/code-simplify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,350 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 original 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.00062 $0.01350
Opus 5.5 $0.00025 $0.00540
Sonnet 5.5 $0.00012 $0.00270
Haiku 4.5 $0.00006 $0.00135

Measured yesterday against content hash 7ee1e6e8a55b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-simplify 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 yesterday.

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.

generated/claude-marketplace/package/skills/flow-drive/references/code-simplify/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code simplification

This is a behavior-preserving quality pass over the resolved change scope. Use $ARGUMENTS when a target is explicit; otherwise review the current change. Keep fixes inside that scope and leave correctness verdicts to a read-only review workflow such as $change-verdict --mode code.

When NOT to Use

  • A bug, security issue, or correctness concern needs judging: use the relevant review or diagnosis workflow first.
  • The requested change is a feature or architecture redesign rather than a cleanup of existing changes.
  • The target cannot be resolved, has no changes, or its baseline test fails without explicit acceptance of that known failure.

Workflow

  1. Resolve the scope. An explicit target always wins:

    • Existing file/directory: review its full contents and run git diff HEAD -- "$ARGUMENTS"; keep the path quoted after --.
    • Pull request number, URL, or #number: verify it and gather gh pr diff "$ARGUMENTS".
    • Branch or commit ref: verify it, identify its upstream or repository default branch, compute git merge-base <target> <base>, then gather the target diff with git diff <merge-base>...<target>.
    • Anything else is BLOCKED; never fall back to the current branch for an invalid explicit target.

    Without an explicit target, try git diff @{upstream}...HEAD, then git diff main...HEAD, then git diff HEAD~1. If the worktree is dirty or the range is empty, also include git diff HEAD. Stop with nothing to simplify when the resolved scope has no changes.

  2. Establish the baseline. Resolve the repository’s relevant test command, run it before editing, and record the exact command and result. Stop when it fails unless the caller explicitly accepts that known failure.

  3. Review four angles. If the host can fan out registered read-only workers, dispatch four independent workers concurrently with the same scope and exactly one angle each. If fan-out is unavailable, the current worker is nested, or one reviewer fails, perform only the missing angles inline and mark the result degraded. Each finding records file, line, a one-line summary, and its concrete cost.

Read the full file on GitHub · 130 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday Changed · +8 lines 7ee1e6e8a55b
  2. 23d ago First seen · 122 lines · 62 tokens per session scan A 60e0d0ae296a

Subscribe to this mod's changes

code-simplify is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 62 tokens to every session and 1,350 once invoked, about $0.0002 per session on Opus 5.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-09-24.

Related

Other skills, from other repositories

evaluator-review-contract

Internal Auto-Harness evaluator skill for sprint contract review before implementation. Use only inside the Evaluator subagent during review mode.

redker56/auto-harness · 30 tokens

genshijin-review

A compact pull-request review format that writes one actionable finding per line in Japanese or English.

InterfaceX-co-jp/genshijin · 78 tokens

triage

Triages a PR comment — from a bot (Copilot, CI) or a human reviewer. Routes to the triagehelper.py helper for identity checks, thread snapshotting, isolated-worktree fixes, and publish/reply/resolve mechanics; you classify the finding and apply a justified fix. --dry-run is fully read-only (investigation and a printed…

nitinjain999/platform-skills · 109 tokens

audit-project

Run an iterative multi-agent code audit until critical and high findings are resolved. Use when the user says "audit my code", "find all the bugs", "deep code audit", "iterative review", or "review until clean".

OutlineDriven/odin-claude-plugin · 50 tokens

codex-review

Get an independent code review from OpenAI Codex (GPT-5) on uncommitted changes, a branch diff, a PR, or a specific module — returns findings grouped by severity with file:line references. Use when the user says "review this", "review my changes", "check this PR", "what did I miss", or before they commit or merge…

Sateezg/codex-bridge · 78 tokens

github-pr-creation

Creates GitHub Pull Requests with automated validation and task tracking. Use when user wants to create PR, open pull request, submit for review, or check if ready for PR. Analyzes commits, validates task completion, generates Conventional Commits title and description, suggests labels. NOTE - for merging existing…

fvadicamo/dev-agent-skills · 75 tokens