review-and-refactor-code

review-and-refactor-code is a skill for Claude Code, Codex from cmdr-chara/codex-toolkit. It costs 97 tokens per session (1,841 once invoked), scanned A, original, MIT.

A workflow for reviewing code changes and planning or carrying out refactoring that preserves behavior.

In plain words
What is it for?
Reviewing diffs, commits, pull requests, or selected code areas; tracing affected users; and preparing incremental structural improvements.
Why use it?
It separates real defects and integration risks from optional cleanup, reducing the chance of making unapproved or unsafe changes.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/cmdr-chara/codex-toolkit/review-and-refactor-code
Any agent
npx skills add cmdr-chara/codex-toolkit --skill review-and-refactor-code
Clone the repo
git clone --depth 1 https://github.com/cmdr-chara/codex-toolkit

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 review-and-refactor-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/cmdr-chara/codex-toolkit/review-and-refactor-code.svg)](https://agentmods.dev/skills/cmdr-chara/codex-toolkit/review-and-refactor-code)
Your own site
<a href="https://agentmods.dev/skills/cmdr-chara/codex-toolkit/review-and-refactor-code"><img src="https://agentmods.dev/badge/skills/cmdr-chara/codex-toolkit/review-and-refactor-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,841 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00097 $0.01841
Opus 5 $0.00048 $0.00920
Sonnet 5 $0.00019 $0.00368
Haiku 4.5 $0.00010 $0.00184

Measured 3d ago against content hash 95ae1907b4fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

review-and-refactor-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 3d 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.

skills/review-and-refactor-code/SKILL.md · 185 lines

How it starts

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

Review and Refactor Code

Find defects that matter, distinguish them from optional design improvements, and change structure only after an approved proposal.

Trigger boundary

Use this skill for:

  • reviewing a branch, commit, pull request, working-tree diff, or bounded code area;
  • identifying defects introduced by a change and tracing affected consumers;
  • assessing whether a structural refactor is justified and feasible;
  • planning or performing behavior-preserving decomposition, deduplication, or boundary cleanup.

Do not trigger for:

  • broad architecture, ownership, or blast-radius mapping without a defined review/refactor decision - use repository-intelligence;
  • a concrete failure whose cause is unknown - use debugging-investigator;
  • dependency, framework, runtime, schema, or public API transitions - use codebase-evolution-controller;
  • security as the primary review decision - use the applicable security review workflow;
  • a platform-wide web or mobile production audit - use the relevant builder;
  • deciding whether an integrated candidate can ship - use verification-and-release.

Required inputs

Obtain or state:

  1. repository root and current working-tree state;
  2. review or refactor scope, including base/head refs when diff-driven;
  3. intended behavior, contracts, and acceptance criteria;
  4. generated, vendored, migration, or lockfile boundaries;
  5. relevant tests, build commands, and known baseline failures;
  6. compatibility, performance, security, and operational constraints;
  7. whether the user has approved a previously proposed edit batch.

If scope is too broad to support file-level evidence, select a bounded slice and explain the coverage limit.

Safety baseline

  • Inspect repository state before analysis. Preserve uncommitted and unrelated user work.
  • Do not checkout, reset, clean, stash, regenerate, reformat broadly, or install dependencies during review.
  • Treat review, refactor, cleanup, and improvement requests as analysis authorization only at first.
  • Do not edit repository files until the user separately approves a concrete proposal produced by this skill.
  • Limit approval to the named files, invariants, slices, and verification plan. Re-propose materially different work.
  • Never label style preference, hypothetical risk, or missing proof as a defect.
  • Do not remove pre-existing dead code unless it is inside the approved scope and its replacement is verified.

Read the full file on GitHub · 185 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. 3d ago First seen · 185 lines · 97 tokens per session scan A 95ae1907b4fb

Subscribe to this mod's changes

review-and-refactor-code is a skill published in the GitHub repository cmdr-chara/codex-toolkit (2 stars, last pushed 5d ago), licensed MIT. It adds 97 tokens to every session and 1,841 once invoked, about $0.0005 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