Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add vasilyu1983/AI-Agents-public --skill qa-refactoringgit clone --depth 1 https://github.com/vasilyu1983/AI-Agents-publicWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/vasilyu1983/ai-agents-public/qa-refactoring)<a href="https://agentmods.dev/skills/vasilyu1983/ai-agents-public/qa-refactoring"><img src="https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/qa-refactoring/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/vasilyu1983/ai-agents-public/qa-refactoring"><img src="https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/qa-refactoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 3 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Anti-Refusal · line 113 Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
- low Excessive Agency · line 142 Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
- low Excessive Agency · line 272 Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00036 | $0.05009 |
| Opus 5.5 | $0.00014 | $0.02004 |
| Sonnet 5.5 | $0.00007 | $0.01002 |
| Haiku 4.5 | $0.00004 | $0.00501 |
Grade A, and why
qa-refactoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.
QA Refactoring
Use this skill to refactor safely: preserve behavior, reduce risk, and keep CI green while improving maintainability and delivery speed.
Defaults: baseline first, smallest safe step next, and proof via tests/contracts/observability instead of intuition.
Quick Start (10 Minutes)
- If key context is missing, ask for: what must not change (invariants), risk level (money/auth/migrations/concurrency), deployment constraints, and the smallest boundary that can be protected by tests.
- Confirm the target branch is green; reproduce the behavior you must preserve.
- Choose a boundary: API surface, module boundary, DB boundary, request handler, or codemod blast radius.
- Add a safety net: characterization/contract/integration tests at that boundary.
- Refactor in micro-steps: one behavior-preserving change per commit/PR chunk.
- Prove: map each preserved behavior to an oracle and execution layer; where practical, show the oracle fails on the faulty or removed behavior, then passes on the refactor. Run the smallest relevant suite locally, then full CI; keep failures deterministic and artifact-rich.
Workflow
- Establish the safety net, boundaries, and rollback shape.
- Choose the refactoring strategy and smallest change slice.
- Make the change, verify behavior, and stop if the safety bar drops below acceptable risk.
- Capture the next slice instead of expanding scope mid-pass.
Core QA (Default)
Safe Refactor Loop (Behavior First)
- Establish baseline on the target branch and reproduce the behavior you must preserve.
- Define invariants: inputs/outputs, error modes, permissions, data shape, performance budgets.
- Add a safety net: write characterization/contract/integration tests around the boundary you will touch.
- Create seams: introduce injection points/adapters to isolate side effects and external dependencies.
- Refactor in micro-steps: one behavior-preserving change at a time; keep diffs reviewable.
- Prove: separate compile/type/static success from executed behavior and targeted regression success from release readiness. Record runtime or production-like checks still required for data, concurrency, timing, or rollout-sensitive paths.
- Ship safely: use canary, shadow mode, migration flags, or branch-by-abstraction when refactors touch production-critical paths.
What ships with it
22 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 326 B
- assets/process/code-review-quality.md 1015 B
- assets/process/refactoring-checklist.md 10 KB
- assets/quality-gates/javascript/eslint-config.js 3.1 KB runs code
- assets/quality-gates/platform-agnostic/sonarqube-setup.md 16 KB
- assets/tracking/tech-debt-register.md 11 KB
- data/sources.json 15 KB
- learnings.consolidated.md 590 B
- learnings.md 349 B
- references/automated-refactoring-tools.md 27 KB
- references/brownfield-agent-loop.md 14 KB
- references/characterization-testing.md 21 KB
- references/code-smells-guide.md 7.8 KB
- references/cross-language-rewrite.md 17 KB
- references/feature-flag-retirement.md 5.6 KB
- references/legacy-code-strategies.md 13 KB
- references/mikado-method.md 6.1 KB
- references/mutation-testing.md 11 KB
- references/operational-patterns.md 3.4 KB
- references/refactoring-catalog.md 4.0 KB
- references/strangler-fig-migration.md 26 KB
- references/tech-debt-management.md 15 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +4 lines c1b3d3f657b0
- 1mo ago Changed · -46 lines dd1ea2b77d9a
- 2mo ago Changed · -3 lines 339b4d777d5e
- 3mo ago First seen · 289 lines · 36 tokens per session scan A 97ceabfdd644
qa-refactoring is a skill published in the GitHub repository vasilyu1983/AI-Agents-public (101 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 5,009 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
qa-refactoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| qa-refactoringvasilyu1983/AI-Agents-public | Skill | 101 | 1mo ago | MIT | A | 36 | Claude Code, Codex |
| code-review-excellencewshobson/agents | Skill | 43k | 2d ago | MIT | A | 42 | Claude Code |
| multi-reviewer-patternswshobson/agents | Skill | 43k | 2d ago | MIT | A | 49 | Claude Code |
| babysitmichael-denyer/pstack-claude | Skill | 5.2k | today | MIT | A | 61 | Claude Code |
| make-pr-easy-to-reviewmichael-denyer/pstack-claude | Skill | 5.2k | today | MIT | A | 57 | Claude Code |
| thermo-nuclear-code-quality-reviewmichael-denyer/pstack-claude | Skill | 5.2k | today | MIT | A | 54 | Claude Code |
| no-commentsmichael-denyer/pstack-claude | Skill | 5.2k | today | MIT | A | 24 | Claude Code |