Agent skill

Organize

by SethGammon in SethGammon/Citadel

Repository structure only: directory layout, file placement, naming conventions, and where-does-this-belong decisions.

MITAuto-check passedDevelopment

Install Organize

skills CLI
$ npx skills add SethGammon/Citadel --skill organize -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SethGammon/Citadel organize --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SethGammon/Citadel.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/organize .claude/skills/organize && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
organize
GitHub stars
922
Token cost
~1.7k tokens
SKILL.md length
685 words
Files
2
Skills in repo
48
Repo updated
First seen
Licence
MIT

At a glance

Repository structure only: directory layout, file placement, naming conventions, and where-does-this-belong decisions.

  • Works in 6 steps: CHECK → DETECT → AUDIT → …
  • Tasks that involve Refactoring
  • SKILL.md covers Orientation, Boundary with /refactor, Commands and Protocol, plus 4 more sections
  • Calls git

What it does

Organize is an agent skill from SethGammon/Citadel. Repository structure only: directory layout, file placement, naming conventions, and where-does-this-belong decisions. Detects the project's convention, audits files against it, and executes move plans with import-path updates. Never changes code inside files beyond the import updates a move forces; in-file restructuring is /refactor.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `__benchmarks__/misplaced-files-move-plan.md`).

It sits in Development, covering Refactoring. The repository describes itself as: The operating layer for Claude Code + OpenAI Codex: persistent project memory, intent routing, safety hooks, cost telemetry, and parallel agent fleets. The licence is MIT.

When your agent uses it

  • Tasks that involve Refactoring

Example prompts

  • “/organize”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. CHECK
  2. DETECT
  3. AUDIT
  4. PLAN
  5. APPLY
  6. CONFIGURE

What it can do on your machine

Read from SKILL.md and the folder at commit e41ff1d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Organize loads about 1.7k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 685 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SethGammon/Citadel at commit e41ff1d, republished under its MIT licence (© SethGammon). 685 words, ~1,691 tokens.

Download SKILL.mdSave it as .claude/skills/organize/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
organize
description
Repository structure only: directory layout, file placement, naming conventions, and where-does-this-belong decisions. Detects the project's convention, audits files against it, and executes move plans with import-path updates. Never changes code inside files beyond the import updates a move forces; in-file restructuring is /refactor.
license
MIT
user-invocable
true
auto-trigger
false
trigger_keywords
organize, directory structure, folder structure, project structure, file organization, organize directories, organize files, cleanup directories, directory…
last-updated
2026-06-11

/organize -- Repository Structure

Orientation

Use when: Deciding where a file belongs, auditing file placement against the project's conventions, running a naming-convention sweep, or moving files so the tree matches the declared layout.

Don't use when: You want a structural map of code relationships (use /map), you want to change code inside files (use /refactor), you need disk or artifact cleanup (use /houseclean), or you need a single known move executed (use /refactor move).

Boundary with /refactor

/organize changes where files live and what they are named. Changing code structure within files (extract, inline, split functions or components, rename symbols) is /refactor. The only in-file edits /organize makes are import-path updates forced by a move or rename. If an audit reveals a file that should be split or merged, recommend /refactor; do not do it here.

Commands

CommandBehavior
/organizeDetect convention, audit placement, propose and execute a move plan
/organize --auditCheck current files against the manifest, report violations only
/organize --showDisplay the current organization manifest
/organize --lockSet locked: true so the enforcement hook blocks violations
/organize --unlockSet locked: false so enforcement is advisory
/organize where does {file} goSingle placement decision, no full audit

Protocol

Step 1: CHECK

Read .claude/harness.json, Citadel's shared config path for all runtimes including Codex. If an organization key exists, use its convention and placement rules; on bare /organize, ask whether to audit, adjust the rules, or reconfigure. If no key exists, continue to Step 2.

Step 2: DETECT

Use the Glob tool (not find or Get-ChildItem) to discover directories. Filter out node_modules, .git, .planning, .citadel, .claude, dist, build, __pycache__, .next, target, .venv, venv. Cap at 200 directories; if larger, scan only the top 3 levels.

Convention signals:

  • src/components/, src/hooks/, src/utils/ -> layer-based
  • src/features/auth/, src/features/dashboard/ -> feature-based
  • src/auth/components/, src/auth/hooks/ -> hybrid
  • Flat src/ with no subdirectories -> flat
  • Mixed signals -> custom (ask the user which convention to adopt)

Record: convention, confidence (high/medium/low), roots with purposes, anomalies.

Step 3: AUDIT

Check every source file against the placement rules (manifest if present, detected convention otherwise). Also check naming: files or directories that break the dominant casing or suffix pattern of their siblings.

=== Structure Audit: {project} ===
Convention: {convention} ({confidence})
Compliant: {N}/{M} source files
Violations:
  {current_path} -> {expected_path} ({rule broken})
Naming:
  {path}: {issue}
Step 4: PLAN

For each violation, build a move plan before touching anything: source path -> destination path, every importer whose import path must change, and barrel/index files that need re-exports updated. Moves and renames only; never delete files with content. Present the plan and wait for confirmation.

Show full SKILL.md (284 more words)Show less
Step 5: APPLY

Execute confirmed moves, update all import paths referencing moved files, update barrels, then run the project's typecheck command (from harness.json). Zero new errors allowed. If a move fails typecheck for reasons beyond import paths, revert that single move and flag the file instead of editing its code.

Step 6: CONFIGURE

On first run or reconfigure, write the organization key to harness.json. Read-modify-write: preserve all other keys, and preserve any existing dynamic/cleanupPolicy entries this skill no longer manages.

json
{
  "organization": {
    "convention": "layer",
    "roots": { "src": { "purpose": "application source" } },
    "placement": [
      { "glob": "*.test.{ts,tsx}", "rule": "colocated", "target": null, "reason": "tests live next to source" }
    ],
    "locked": false
  }
}

Rule types: colocated, sibling-dir, root-dir, within-root. Set locked: false initially; /organize --lock turns on blocking enforcement via the organize-enforce hook.

Fringe Cases

  • No directories found / empty project: suggest flat convention; nothing to audit.
  • Monorepo (multiple package.json): scan each package root separately; ask whether rules are per-package or repo-wide.
  • harness.json missing: audit in advisory mode from the detected convention; offer to create the manifest.
  • User changes convention: warn with the number of files that would move. Never mass-move without explicit confirmation.
  • Conflict with protectedFiles: if protected files conflict with placement rules, warn and ask which takes precedence.

Contextual Gates

Disclosure: "Auditing repository structure. Moves execute only after you confirm the plan." Reversibility: amber -- file moves and import-path updates; undo with git checkout -- . before commit or git revert after. Trust gates: Any: detect and audit. Familiar (5+ sessions): confirmed move plans execute autonomously.

Quality Gates

  • Convention detected or read from the manifest before any audit verdicts
  • Every violation lists current path, expected path, and the rule it breaks
  • Move plan presented and confirmed before any file moves
  • No in-file code edits beyond import-path updates; split/extract needs are deferred to /refactor
  • Typecheck clean after moves (zero new errors)
  • harness.json write preserves all keys outside organization

Exit Protocol

---HANDOFF---
- Structure: {convention}; {compliant}/{total} files compliant after changes
- Moves: {N} files moved, {M} import paths updated, 0 in-file refactors
- Deferred to /refactor: {split/extract recommendations, or "none"}
- Enforcement: {"advisory (unlocked)" | "blocking (locked)"}
- Reversibility: amber -- undo moves with git checkout/revert
---

© SethGammon, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/organize of SethGammon/Citadel.

  • SKILL.md
  • __benchmarks__/misplaced-files-move-plan.md

Open the folder on GitHubat commit e41ff1d

Compare with similar skills

Organize next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Organize compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Organize this skillSethGammon/Citadel922—~1.7kAutomated safety check: PassMIT
Guidelinesakash-network/node1.1k22 repos~577Automated safety check: PassMIT
Component Refactoringlangflow-ai/langflow156k—~3.5kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT
Codexskills-directory/skill-codex1.5k3 repos~1.8kAutomated safety check: PassMIT

Similar skills

  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 22 repos~577 tokens
    DevelopmentAuto-check passed
  • Component Refactoring

    langflow-ai/langflow

    Refactor high-complexity React components in Langflow frontend.

    156k GitHub stars~3.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Codex

    skills-directory/skill-codex

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    1.5k GitHub starsUsed in 3 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Ponytail

    DavidObando/gsharp

    Forces the laziest solution that actually works, simplest, shortest, most minimal.

    565 GitHub starsUsed in 8 repos~1.7k tokens
    DevelopmentAuto-check passed

More from SethGammon/Citadel

All 48 skills in this repo
  • Create Skill

    SethGammon/Citadel

    Creates new skills from the user's repeating patterns. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.9k tokensUpdated 7 days ago
    Auto-check passed
  • Houseclean

    SethGammon/Citadel

    Cross-drive storage audit and cleanup. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.2k tokensUpdated 7 days ago
    Auto-check passed
  • Loop

    SethGammon/Citadel

    Bounded foreground repetition for the current session. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed
  • Triage

    SethGammon/Citadel

    GitHub issue and PR investigator. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.7k tokensUpdated 7 days ago
    Auto-check passed
  • Watch

    SethGammon/Citadel

    File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills.

    922 GitHub stars~2.9k tokensUpdated 7 days ago
    Auto-check passed
  • Archon

    SethGammon/Citadel

    Autonomous multi-session campaign agent. An agent skill from SethGammon/Citadel.

    922 GitHub stars~5.4k tokensUpdated 7 days ago
    Auto-check passed

Categories

Questions about Organize

What does Organize do?

Repository structure only: directory layout, file placement, naming conventions, and where-does-this-belong decisions. Organize is an agent skill from SethGammon/Citadel. Repository structure only: directory layout, file placement, naming conventions, and where-does-this-belong decisions.

When should I use Organize?

Organize fits situations like: tasks that involve Refactoring.

How do I install Organize in Claude Code?

Run `npx skills add SethGammon/Citadel --skill organize -a claude-code`. Or copy the skill folder (skills/organize in SethGammon/Citadel) into .claude/skills/organize in your project. Claude Code loads it when a task matches its description.

How do I install Organize in Codex?

Run `npx skills add SethGammon/Citadel --skill organize -a codex`. Or copy the skill folder (skills/organize in SethGammon/Citadel) into .agents/skills/organize in your project. Codex loads it when a task matches its description.

Can I use Organize in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SethGammon/Citadel --skill organize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/organize, .gemini/skills/organize, .github/skills/organize and .opencode/skills/organize in your project.

What does Organize need to run?

Going by SKILL.md and its folder, Organize needs the command-line tools its instructions call (git).

Does Organize access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Organize safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Organize use?

Organize is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Organize use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Organize?

Skills that share tags, products or a category with Organize: Guidelines (akash-network/node, 1.1k stars), Component Refactoring (langflow-ai/langflow, 156k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars) and Systematic Code Refactoring (luongnv89/claude-howto, 42k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Organize?

SethGammon (a GitHub user) maintains it in SethGammon/Citadel, which has 922 GitHub stars. The repository holds 48 skills in this directory. The repository was last updated on October 1, 2026.

Source: SethGammon/Citadel on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.