prompt-evaluation-runn…
Use when evaluating prompts, LLM outputs, red-team suites, or model behavior with local eval configs and safe provider/cost controls.
Use when code needs restructuring and observable behavior must stay unchanged, with existing tests kept green at every step.
$ npx -y skills add yeaight7/agent-powerups --skill test-preserving-refactor --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/test-preserving-refactorContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when code needs restructuring and observable behavior must stay unchanged, with existing tests kept green at every step.
name: test-preserving-refactor description: Use when code needs restructuring and observable behavior must stay unchanged, with existing tests kept green at every step.
Refactoring is only safe if it is backed by tests. Work in a strict loop — green baseline, one structural change, immediate re-run, revert on red — so you are never trapped in an uncompilable state.
1. **Run tests first.** Before touching any code, run the tests covering the target area. They MUST be green. If they are red, stop and fix the tests (or the code) first:
npx jest path/to/target # or: pytest tests/test_target.py -q
2. **Small steps.** Make one structural change at a time (e.g., extract a method).
3. **Run tests immediately** after the single structural change. The per-change loop:
# repeat per structural change: edit -> test -> commit (green) | revert (red) npx jest path/to/target && git commit -am "refactor: extract X" || git checkout -- .
4. **Revert on red.** If the tests fail, you made a mistake. Revert the change (`git checkout -- .` or `git restore .`) and try a different approach. Do not attempt to "fix" the refactor while tests are failing.
5. **Commit on green.** Once the small change is green, consider it a safe checkpoint.
This strict loop prevents you from getting trapped in an uncompilable state.
Curated power-ups for coding agents: skills, slash commands, MCP configs, hooks, AGENTS.md templates, and workflows for serious software engineering. Claude Code, Codex, Antigravity CLI, Cursor and more
Repo: yeaight7/agent-powerups
Use when evaluating prompts, LLM outputs, red-team suites, or model behavior with local eval configs and safe provider/cost controls.
Use when creating or reviewing red-team eval plugins, attack templates, grader rubrics, safety fixtures, or model-risk test metadata.
Use when designing, running, debugging, or hardening deterministic eval suites for agent skills, prompts, tool workflows, or MCP-backed cases.
Use when designing tool definitions for a new agent or subagent, an agent shows high retry rates, ambiguous tool invocations, or silent failures, or an…
Use when routing a prompt to a local provider CLI for a second opinion, review, or plan -- you are about to call a provider directly, need the response saved…
Use when starting work in an unfamiliar area of a codebase, spawning a subagent that needs targeted file context, a first search pass missed the relevant file,…