doc-condenser
**DEPRECATED** — Modern Claude models condense and summarize technical documentation natively with comparable quality. The output…
Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust. Targets complexity, anti-patterns, readability debt. Triggers on: "simplify this code", "refactor for clarity", "reduce complexity", "make this more readable", "tech debt cleanup",
Claude Code
$ npx -y skills add Mathews-Tom/armory --skill code-refiner --agent claude-code
Codex
$ npx skills add Mathews-Tom/armory --skill code-refiner -a codex -y
Cursor
$ npx skills add Mathews-Tom/armory --skill code-refiner -a cursor -y
Gemini CLI
$ npx skills add Mathews-Tom/armory --skill code-refiner -a gemini-cli -y
GitHub Copilot
$ npx skills add Mathews-Tom/armory --skill code-refiner -a github-copilot -y
OpenCode
$ npx skills add Mathews-Tom/armory --skill code-refiner -a opencode -y
Windsurf
$ npx skills add Mathews-Tom/armory --skill code-refiner -a windsurf -y
name: code-refiner description: 'Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust. Targets complexity, anti-patterns, readability debt. Triggers on: "simplify this code", "refactor for clarity", "reduce complexity", "make this more readable", "tech debt cleanup", "too much nesting". NOT for deepening shallow modules or redesigning a module''s interface or seam, use module-deepening.' metadata: version: 1.1.2 category: review tags: [refactoring, code-quality, simplification, readability] difficulty: intermediate phase: review
A structured, multi-pass code refinement skill that transforms complex, verbose, or tangled code into clean, idiomatic, maintainable implementations — without changing what the code does.
The goal is **not** fewer lines. The goal is code that a tired engineer at 2am can read, understand, and safely modify. Every change must pass three tests:
1. **Behavioral equivalence** — identical inputs produce identical outputs, side effects, and errors 2. **Cognitive load reduction** — a reader unfamiliar with the code understands it faster after the change 3. **Maintenance leverage** — the change makes future modifications easier, not harder
When clarity and brevity conflict, clarity wins. When idiom and explicitness conflict, consider the team's experience level. When DRY and locality conflict, prefer locality for code read more than modified.
Follow this sequence. Each phase builds on the previous one. Do not skip phases, but adapt depth to the scope of the request (a single function gets a lighter pass than a full module).
Before touching anything, build a mental model:
1. **Identify scope** — What files/functions are in play? If the user hasn't specified, check recent git modifications: `git diff --name-only HEAD~5` or `git diff --staged --name-only` 2. **Detect language and ecosystem** — Read file extensions, imports, config files (package.json, pyproject.toml, go.mod, Cargo.toml). Load the appropriate language reference from `references/` if needed for idiom-specific guidance 3. **Read project conventions** — Check for CLAUDE.md, .editorconfig, linter configs (eslint, ruff, golangci-lint, clippy). These override generic idiom preferences 4. **Understand test coverage** — Locate test files. If tests exist, note the test runner so you can verify behavioral equivalence after changes 5. **Baseline complexity snapshot** — For each target function/method, mentally note:
Identify what's actually wrong before reaching for solutions. Categorize issues by severity:
**Critical** (always fix):
**High** (fix unless there's a clear reason not to):
**Medium** (fix when it improves clarity without adding risk):
**Low** (fix only in a dedicated cleanup pass):
Apply changes using these tactics, ordered by impact-to-risk ratio:
Remove before restructuring. Less code = less to think about.
Reduce nesting and cognitive load:
(or use language-appropriate constructs: list comprehensions, iterators, streams)
Make the code's intent visible:
Apply language-specific patterns (consult `references/<language>.md` for details):
Curated, production-grade skills, agents, hooks, rules, commands, utilities, and presets for AI coding agents. No magic, no demos — battle-tested workflows built for developers who use AI seriously.
**DEPRECATED** — Modern Claude models condense and summarize technical documentation natively with comparable quality. The output…
DEPRECATED: The Opus 4.7 migration scanner is retired from the active skill catalog. Retained for archival reference only; not…
**DEPRECATED** — Modern Claude models produce accurate, well-explained regex patterns with edge-case test suites natively,…
**DEPRECATED** — Opus 4.7 uses adaptive thinking (optional at each step) and Sonnet 4.6 handles structured chain-of-thought…
Generates Architecture Decision Records capturing context, rationale, alternatives, and consequences in numbered status-tracked…
Build AI agents and automate Claude Code programmatically via the Claude Agent SDK and headless CLI mode. Covers Python SDK,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.