reorganize

reorganize is a skill for Claude Code from NYTC69/review-loop. It costs 32 tokens per session (1,300 once invoked), scanned A, original, Apache-2.0.

A code-organization procedure for rearranging existing files and modules while keeping their behavior unchanged. It can also extract shared code, remove duplication, and add section comments.

In plain words
What is it for?
Use it to reorganize one file, a directory of code files, or all uncommitted changes, while excluding vendor, dependency, and generated files.
Why use it?
It makes difficult-to-navigate code easier to read and reduces repeated logic without intentionally changing what the program does.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the review-loop plugin — 6 skills, 12 agents shipped together

Good fit Use it to reorganize one file, a directory of code files, or all uncommitted changes, while excluding vendor, dependency, and generated files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nytc69/review-loop/reorganize
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 NYTC69/review-loop --skill reorganize
Clone the repo
git clone --depth 1 https://github.com/NYTC69/review-loop

Made for: Claude Code.

Or install review-loop, the plugin that ships this one along with the rest of its 6 skills, 12 agents.

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 reorganize

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/nytc69/review-loop/reorganize"><img src="https://agentmods.dev/badge/skills/nytc69/review-loop/reorganize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,300 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.00032 $0.01300
Opus 5.5 $0.00013 $0.00520
Sonnet 5.5 $0.00006 $0.00260
Haiku 4.5 $0.00003 $0.00130

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

Security

Grade A, and why

reorganize 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 15d 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/reorganize/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 File Reorganization

Restructure the specified code files: rearrange module layout, reorder logically, extract shared logic, remove redundancy, add section separators and comments. Must not change any functionality or logic.

Target Scope

$ARGUMENTS specifies the target:

  • File path: /reorganize src/engine.go — reorganize a single file
  • Directory path: /reorganize src/core/ — reorganize all code files in the directory
  • diff: /reorganize diff — reorganize all uncommitted files (via git diff --name-only --diff-filter=d HEAD, plus untracked files from git ls-files --others --exclude-standard)

If no argument is provided, prompt the user to specify a target.

Execution Flow

Step 1: Determine File List

Resolve the file list from $ARGUMENTS. For directories, recursively collect all code files (excluding vendor, node_modules, generated files, etc.). For diff, collect all uncommitted modified files (staged + unstaged) and the untracked, non-ignored files.

Output:

REORGANIZE
  Target:    {file/dir/diff}
  Files:     {N} files
  {file list}

Step 2: Analyze and Reorganize Each File

Process files one at a time. Complete each file before moving to the next.

2.1 Read and Analyze Current Structure

Read the entire file and analyze:

  • All type definitions, constants, variables, functions/methods present
  • Dependencies and relationships between sections
  • Duplicate or reusable logic patterns within this file
  • Whether the file couples multiple unrelated functional modules
2.2 Decide Whether to Split the File

Split into multiple files when the file couples multiple clearly distinct functional modules, making it hard to read and maintain:

  • The decision is based on module coupling, not line count
  • Each resulting file should have focused, single responsibility

When splitting:

  • Name new files clearly to reflect their purpose (e.g., engine.go -> engine.go + engine_strategies.go + engine_signals.go)
  • Keep the same package/module, ensure compilation passes
  • Place shared type definitions in the most logical file, or a separate types file

Read the full file on GitHub · 130 lines

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. 15d ago Changed 73edd56986ed
  2. 28d ago Changed · -3 lines 8fc184e67cff
  3. 1mo ago First seen · 133 lines · 32 tokens per session scan A a9c3eccd02f4

Subscribe to this mod's changes

reorganize is a skill published in the GitHub repository NYTC69/review-loop (3 stars, last pushed today), licensed Apache-2.0. It adds 32 tokens to every session and 1,300 once invoked, about $0.0001 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-08-31.

Related

Other skills, from other repositories

ship-it-or-fix-it

Oracle-frozen Builder and independent-Judge convergence cycle. Load ONLY when the operator explicitly sets Governance Dial G2 for the task, or explicitly names this skill or an active work unit already running it. Never auto-activate on task class, such as security, auth, or payments. If a task seems to warrant G2 and…

Ezra144israel/governed-agent-skills · 98 tokens

test-verification

Requires behavioral, failure-path, and durable-seam evidence for tests and review. Use when writing tests, reviewing test coverage, assessing behavioral test quality, or accepting high-risk behavior on test evidence.

Ezra144israel/governed-agent-skills · 43 tokens

socratic-review

Socratic code review and refactoring session — whether it's your own code, a teammate's PR, or something you inherited. Leads you to see the issues through questions, names smells and moves precisely, then closes with a concrete plan.

thoughtbot/rails-consultant · 51 tokens

simplify

Reduce the complexity of existing code without changing behavior - deep nesting, long functions, dead code, unclear names, the wrong abstraction. Use after a feature works but reads heavier than it should, or to clean up code written under time pressure. Pass --aggressive to reshape a working feature into the form it…

vanducng/skills · 127 tokens

prior-art

Discover how a codebase already handles a specific concern — search broadly, find every instance, and assess consistency. The "how does this app do X?" tool.

thoughtbot/rails-consultant · 36 tokens

code-review

Review code with a sharp, encouraging voice - inline GitHub PR comments + a tight summary. Supports PR (default), pending changes, commit hash, and codebase modes. Encodes an opinionated review style: severity-prefixed, concise, actionable, no fluff. Pass --refactor for the local reuse/slop lens (never posts). For the…

vanducng/skills · 99 tokens