plugin/skills/refactor/SKILL.md
Refactor large files into smaller sub-components. Do not create more large files. Refactor into modular, focused units.
npx skillsauth add regression-io/coder-config refactorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Break down large files into smaller, focused modules while preserving functionality.
Questions to ask:
Create a refactoring plan:
Original: src/bigfile.js (800 lines)
Split into:
├── src/bigfile.js (100 lines) - Main entry, re-exports
├── src/bigfile/
│ ├── api.js - API/handler functions
│ ├── utils.js - Helper functions
│ ├── types.js - Type definitions
│ └── constants.js - Constants/config
Guidelines:
Before:
lib/api.js (600 lines)
- HTTP handlers
- Validation logic
- Database queries
- Response formatting
After:
lib/api.js (50 lines) - Entry point, re-exports
lib/api/handlers.js - HTTP route handlers
lib/api/validation.js - Input validation
lib/api/queries.js - Database operations
lib/api/responses.js - Response formatting
development
# Ralph Loop — Autonomous Development Skill You are operating inside a **Ralph Loop** — an autonomous, iterative development workflow managed by coder-config. ## Your Context The `<ralph-loop-context>` block injected into your session contains: - **Phase**: clarify | plan | execute - **Task**: what you are building - **Iteration**: current / max - **Clarifications** and **Implementation Plan** (when available) - **State file path**: where to write progress ## Phase Behaviour ### clarify - A
testing
Update the docs with the current state of the system, especially README.md and CHANGELOG.md. Use before committing significant changes or when documentation is stale.
documentation
Save current session context to a resumable document. Use when ending a session, switching tasks, or wanting to preserve context for later continuation.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.