oma-academic-writing
Draft and revise academic prose against a rubric, evidence, and
Restructure existing code while preserving observable behavior. Use
Claude Code
$ npx -y skills add first-fluke/oh-my-agent --skill oma-refactor --agent claude-code
Codex
$ npx skills add first-fluke/oh-my-agent --skill oma-refactor -a codex -y
Cursor
$ npx skills add first-fluke/oh-my-agent --skill oma-refactor -a cursor -y
Gemini CLI
$ npx skills add first-fluke/oh-my-agent --skill oma-refactor -a gemini-cli -y
GitHub Copilot
$ npx skills add first-fluke/oh-my-agent --skill oma-refactor -a github-copilot -y
OpenCode
$ npx skills add first-fluke/oh-my-agent --skill oma-refactor -a opencode -y
Windsurf
$ npx skills add first-fluke/oh-my-agent --skill oma-refactor -a windsurf -y
name: oma-refactor description: Restructure existing code while preserving observable behavior. Use for targeted technical debt or hotspot work with characterization tests.
Improve internal code structure - readability first - without changing observable behavior, through small verified transformations, each gated by a safety net (tests / tooling / types) and committed separately from any behavior change.
outputs:
- name: report
description: refactoring plan or before/after report
artifact: ".agents/results/refactor/*.md"
required: falseStandalone runs write plan / before-after reports under `.agents/results/refactor/`; orchestrated runs (via the `refactor-engineer` agent) write `.agents/results/result-refactor[-{sessionId}].md` per the agent execution protocol.
1. Classify the requested outcome against the actual target code, not the word "refactor" alone. Behavior-preserving restructuring stays here. Implementation or bug fixing already included in the request continues under the appropriate existing implementation skill or `oma-debug`, within existing authorization and without renewed approval. For mixed requests, separate behavior changes from restructuring and apply this skill only to the latter. 2. For the refactoring scope, establish its motivation and diagnose the safety net: coverage of changed lines, test determinism (flakiness), mutation strength if measurable. 3. Identify the destination form: the language idiom and codebase convention the result must match.
Missing or stub code does not itself authorize new behavior. A pure refactor with no implementation to restructure reports the missing target rather than inventing one. If a contract fact needed for correctness remains unknown after checking available task and project evidence, ask for that specific fact under the shared execution policy and clarification protocol. Distinguish missing information from missing authorization: retain existing permission, pause only dependent work, and continue independent authorized work.
1. **PREPARE**: Within the refactoring scope, classify greenfield (safety net exists) vs brownfield (build net first); check size gates and hotspot rank; confirm two-hats scope (no feature/bug work mixed in). 2. **ACQUIRE**: Read target code via symbol tools; collect metrics (complexity, size, coupling) and git signals (churn, ownership); read the coding guide for conventions. 3. **REASON**: Decompose the goal into a sequence of named atomic transformations; for stateful targets plan expand-contract; verify
Draft and revise academic prose against a rubric, evidence, and
Evaluate system boundaries and architectural tradeoffs. Use for
Implement server APIs, authentication, and application data access.
Explore goals, constraints, and alternative approaches before
Coordinate assigned specialist tasks and handoffs manually. Use
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.