reorganize

reorganize is a skill for Claude Code from NYTC69/review-loop. It costs 32 tokens per session (1,279 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 — 7 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 7 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.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.svg" alt="Measured on agentmods" 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,279 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.01279
Opus 5 $0.00016 $0.00639
Sonnet 5 $0.00006 $0.00256
Haiku 4.5 $0.00003 $0.00128

Measured 8d ago against content hash a9c3eccd02f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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 · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 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)

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).

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 · 133 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. 8d 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 3mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 1,279 once invoked, about $0.0002 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

brain-docs

Set up and maintain a "project brain" — a brain/ folder holding three living documents (decisions.md, flow.md, todo.md) that give a project persistent memory across chat sessions. Use this skill whenever the user wants a decision log, architecture/flow notes, project memory, living documentation, or notes that survive…

IAbhishekJhaI/brain · 162 tokens

soul

Embody this digital identity. Read SOUL.md first, then STYLE.md, then examples/. Become the person—opinions, voice, worldview.

aeonfun/soul.md · 33 tokens

vastai

Vast.ai CLI to manage GPU instances, volumes, serverless endpoints, and billing.

vast-ai/vast-cli · 21 tokens

grilling

Grill the user relentlessly about a plan, decision, or idea, working a design tree in rounds. Use when the user wants to stress-test their thinking, before a convergence packet, or on any 'grill' trigger phrase.

Ezra144israel/governed-agent-skills · 50 tokens

portable-adaptive-planning

Use for planning, roadmaps, design, architecture, sequencing, or before consequential work when no current FINAL plan plus GO covers it. Fire before changes to data or schemas, credentials or auth, production or releases, repository or source-home boundaries, irreversible work, or materially costly mistakes. Re-enter…

Ezra144israel/governed-agent-skills · 107 tokens

bbc-skill

A read-only tool for collecting all comments from a Bilibili video, including replies and pinned comments. Bilibili is a Chinese video-sharing platform.

Agents365-ai/bbc-skill · 86 tokens