with one click
refactor
Analyze code and suggest refactoring opportunities with rationale
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Analyze code and suggest refactoring opportunities with rationale
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Analyze recent changes and add test coverage for HEAD commit
Write failing unit tests for feature requirements (TDD style)
Deep analysis mode - thorough multi-phase investigation with expert consultation
Analyze test coverage gaps and report findings
Analyze service capacity, load patterns, and scaling requirements
Code review mode - comprehensive review with security, performance, and maintainability focus
| name | refactor |
| description | Analyze code and suggest refactoring opportunities with rationale |
Current Time: !date
Go Version: !go version
Analyze code and suggest refactoring opportunities with rationale. Documents findings to Obsidian for tracking and discussion.
Launch parallel investigation tracks:
Write to Obsidian via obsidian_append_content at:
$OBSIDIAN_PATH/Refactoring/YYYY-MM-DD-target-name.md
Note:
$OBSIDIAN_PATHmust be a vault-relative path (e.g.,Projects/myapp), set per-project via direnv. Theobsidian_append_contenttool expects paths relative to the vault root.
Use this template for the Obsidian document:
@~/.config/opencode/templates/refactor-analysis.md
obsidian_append_content with auto-generated filename: YYYY-MM-DD-target-name.md$ARGUMENTS