Skills for Real Engineers. Straight from my .agents directory.
refactor
Agent skill fromSethGammon/Citadel
Safe multi-file refactoring with automatic rollback. Establishes a type/test baseline, plans all changes, executes file-by-file, and verifies zero regressions. Reverts if verification fails after two fix attempts. Handles renames, extracts, moves, splits, merges, and inlines.
How to install refactor
npx skills add SethGammon/Citadel# or add only this skill to Claude Code: copy the folder
skills/refactor/
# into
~/.claude/skills/refactor/ (all projects)
.claude/skills/refactor/ (one project)
1# /refactor — Safe Multi-File Refactoring23## Orientation45Use `/refactor` when you need to:6- Rename a symbol, file, or module across the codebase7- Extract a function, component, hook, class, or module from existing code8- Inline a function or module back into its callers9- Move a file or set of files to a new location10- Split a large file into smaller pieces11- Merge related files into one12- Change a function signature and update all call sites1314**Don't use when:** debugging a specific bug (use /systematic-debugging); adding new features (use /marshal or /scaffold); deleting dead code (use /marshal for a targeted cleanup).1516**Boundary with /organize:** /refactor changes code structure within files (extract, inline, split, merge, rename) and moves files as part of those operations. Repository-wide file/directory placement, naming sweeps, and where-does-this-belong decisions are /organize.1718**Behavior does not change.** Tests pass before and after, no new type errors — the refactoring is correct.1920## Commands2122| Command | Behavior |23|---|---|24| `/refactor rename [old] to [new]` | Rename symbol, file, or module |25| `/refactor extract [target] from [source]` | Extract function/component/module |26| `/refactor inline [target]` | Inline a function/module into callers |27| `/refactor move [source] to [dest]` | Move file(s) with import updates |28| `/refactor split [file]` | Split a file into logical pieces |29| `/refactor merge [files...]` | Merge related files into one |30…
Excerpt shown under the repository's MIT license.
More skills in Citadel
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
