refine-code

refine-code is a skill for Claude Code from tomoking2004/claude-plugins. It costs 102 tokens per session (721 once invoked), scanned A, original, MIT.

A code-cleanup workflow for reviewing scripts, configuration, and other source code while keeping its public behavior unchanged. It checks naming, identifiers, allowed values, style, and consistency across the project.

In plain words
What is it for?
Use it to refine code, scripts, and configuration across a project, including Python code and code written in other languages.
Why use it?
It addresses code that works but is difficult to maintain or has inconsistent names and structures, while requiring tests or execution checks after changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the refine plugin — 2 skills shipped together

Good fit Use it to refine code, scripts, and configuration across a project, including Python code and code written in other languages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tomoking2004/claude-plugins/refine-code
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 tomoking2004/claude-plugins --skill refine-code
Clone the repo
git clone --depth 1 https://github.com/tomoking2004/claude-plugins

Made for: Claude Code.

Or install refine, the plugin that ships this one along with the rest of its 2 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tomoking2004/claude-plugins/refine-code"><img src="https://agentmods.dev/badge/skills/tomoking2004/claude-plugins/refine-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 721 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.00102 $0.00721
Opus 5.5 $0.00041 $0.00288
Sonnet 5.5 $0.00020 $0.00144
Haiku 4.5 $0.00010 $0.00072

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

Security

Grade A, and why

refine-code 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.

plugins/refine/skills/refine-code/SKILL.md · 28 lines

What it actually says

対象:指定された範囲のコード;無指定ならプロジェクト全コード(生成物のみ除く;.gitignore 対象も走査し,私的なメモ等は変えてよいかを先に問う).

まず BEAUTY.md を読み,美の6条と走査の規律に従う.

媒体の正典

  • Python:PEP 8・PEP 20・PEP 257.公開 API は型ヒントと Docstring を持つ.
  • その他の言語:その言語の公式スタイルガイド;無ければ既存ファイルの多数派.

固有の走査

  • 名前鎖:公開名・改名は定義→呼び出し→引数→直列化キー→テンプレート→Docstring まで追跡し,全箇所を一致させる.
  • 識別子族:同義語群・動詞族・接頭辞/接尾辞の規約をコード全域で列挙し,揺れを潰す.
  • 列挙値:enum・状態・設定値は取りうる値を一箇所に定義し,判定の軸を一つにする(定義の違う値を同じ列に混ぜない).

制約

公開挙動は保つ——変更のたびにテスト・実行で確かめ,バグ修正で変わるなら明示する.構造を移す変更は,中身が変わらないことを差分(正規化して同一)で示す.git は読み込みのみ.スクリプトで一括編集するときは,編集箇所を一意な文字列で指定し,想定する一致件数をスクリプトに検査させ,結果を読み直して完了とする.判断の割れる箇所は推測せず問う.問い方:調べて届くことは調べ尽くし,ユーザーにしか分からないことだけを最初にまとめて問う.問いには調べた範囲・対象の原文・問う理由・答えで変わることを書き,未確認の前提で選ばせない.対象が一通りに読めるなら問わずにその読みで進め,採った読みを報告に1行載せる.ユーザーの発話が問いの形なら,依頼と読まず問いとして答える.

失敗時

/heal:heal-skill を呼ぶ.

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 · 28 lines · 102 tokens per session scan A 8e26aa84ceda

Subscribe to this mod's changes

refine-code is a skill published in the GitHub repository tomoking2004/claude-plugins (3 stars, last pushed 2d ago), licensed MIT. It adds 102 tokens to every session and 721 once invoked, about $0.0004 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-11-21.

Related

refine-code compared with skills from other repositories

refine-code next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
refine-codetomoking2004/claude-pluginsSkill32d agoMITA102Claude Code
phpunit-test-team-reviewingshopwareLabs/ai-coding-toolsSkill482d agoMITA52Claude Code
phpunit-test-reconcilingshopwareLabs/ai-coding-toolsSkill482d agoMITA32Claude Code
issue-analyzingshopwareLabs/ai-coding-toolsSkill482d agoMITA51Claude Code
pr-analyzingshopwareLabs/ai-coding-toolsSkill482d agoMITA56Claude Code
codexmelodic-software/claude-code-pluginsSkill34todayMITA75Claude Code
code-reviewmelodic-software/claude-code-pluginsSkill34todayMITA63Claude Code