engineering-refactor/SKILL.md
Use this skill to clean up, refactor, and prepare an existing codebase for mature delivery-grade engineering standards.
npx skillsauth add subjadeites/skills engineering-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.
Use this skill to bring an existing codebase closer to mature, delivery-grade engineering quality.
The goal is not to make the project merely work. The goal is to make the codebase clean, consistent, maintainable, reviewable, and aligned with the language, framework, runtime, and project conventions already in use.
This is an execution-oriented skill. You should inspect the project, make focused improvements, run available validation commands, and report what changed.
All changes should support long-term maintainability and production-quality delivery.
Prioritize:
Remove:
Before making changes, inspect the project’s existing patterns:
Do not introduce a new style or architecture that conflicts with the existing project.
Do not rewrite stable code just to match personal preference.
Do not perform unrelated formatting changes unless they are produced by the project’s formatter.
Prefer existing internal tools and project dependencies over new implementations.
Before adding code, search for existing:
If a mature dependency already exists in the project, prefer it.
Add a new dependency only when it is clearly justified. Consider maintenance cost, bundle size, security risk, license risk, and whether the same result can be achieved through existing project code.
Do not add heavy dependencies for simple local logic.
Do not bypass project wrappers unless they are clearly unsuitable.
Follow the idiomatic practices of the current language, framework, build system, and runtime.
Avoid:
any, unsafe casts, reflection, or dynamic access used only to bypass checks.Prefer:
Do not add fallback logic just to make the code appear more defensive.
Avoid patterns such as:
catch blocks.catch { return null }.value || defaultValue when valid falsy values may exist.Fail fast for clear invalid states.
Validate external input at system boundaries.
Represent internal invariants with types, assertions, explicit errors, or clear module boundaries.
Do not convert invalid states into apparently usable results.
Before editing, review:
Do not rewrite code before understanding the project’s conventions.
Look for:
When editing:
Do not add unit tests by default.
Before adding any unit test, decide whether the test is warranted.
Ask:
If the test does not have clear value, do not write it.
Remove or rewrite tests that:
Keep or add tests for:
Tests should verify behavior, not the current implementation shape.
Allowed:
Use caution when changing:
Do not:
Run the project’s existing validation commands when available, such as:
Do not invent commands that are not present in the project.
If a command cannot run, report the real reason.
Do not fabricate passing results.
After completing the work, provide a concise delivery report.
Include:
Describe:
Describe whether the changes:
If tests were added, removed, or modified, explain:
List the actual commands run and their results.
Example:
npm run lint: passednpm run typecheck: passednpm test: passednpm run build: passedIf a command failed or could not run, explain why.
Do not claim success for commands that were not executed.
List only real risks, unverified areas, or business decisions that require human confirmation.
Do not add generic filler.
tools
Codeflow streams coding agent sessions (Claude Code, Codex, Gemini CLI, etc.) to Discord or Telegram in real-time. Use when invoking coding agents and wanting transparent, observable dev sessions — no black box. Parses Claude Code's stream-json output into clean formatted messages showing tool calls, file writes, bash commands, and results with zero AI token burn. Use when asked to "stream to Discord", "stream to Telegram", "relay agent output", or "make dev sessions visible".
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.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.