qa-refactoring

qa-refactoring is a skill for Claude Code, Codex from vasilyu1983/AI-Agents-public. It costs 36 tokens per session (5,009 once invoked), scanned A, original, MIT.

A guide to changing code structure while keeping its existing behavior unchanged.

In plain words
What is it for?
Use it for safe refactors, automated code migrations, API or module changes, and stronger CI checks.
Why use it?
It reduces technical debt without relying on guesswork, by protecting important behavior with tests and small, reversible changes.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions Claude Code; mentions Codex.

Part of the ai-agents plugin — 144 skills shipped together

Good fit Use it for safe refactors, automated code migrations, API or module changes, and stronger CI checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vasilyu1983/ai-agents-public/qa-refactoring
Install

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.

Any agent
npx skills add vasilyu1983/AI-Agents-public --skill qa-refactoring
Clone the repo
git clone --depth 1 https://github.com/vasilyu1983/AI-Agents-public

Made for: Claude Code, Codex.

Or install ai-agents, the plugin that ships this one along with the rest of its 144 skills.

Wrote 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.

agentmods badge for qa-refactoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/qa-refactoring/github.svg)](https://agentmods.dev/skills/vasilyu1983/ai-agents-public/qa-refactoring)
Your own site
<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.

agentmods 80×15 button for qa-refactoring

Your own site · 80×15
<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>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,009 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
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.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash c1b3d3f657b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/quality-gates/javascript/eslint-config.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/universal/qa-refactoring/SKILL.md · 244 lines

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

  1. Establish the safety net, boundaries, and rollback shape.
  2. Choose the refactoring strategy and smallest change slice.
  3. Make the change, verify behavior, and stop if the safety bar drops below acceptable risk.
  4. 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.

Read the full file on GitHub · 244 lines

Changes

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.

  1. 1mo ago Changed · +4 lines c1b3d3f657b0
  2. 1mo ago Changed · -46 lines dd1ea2b77d9a
  3. 2mo ago Changed · -3 lines 339b4d777d5e
  4. 3mo ago First seen · 289 lines · 36 tokens per session scan A 97ceabfdd644

Subscribe to this mod's changes

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.

Related

qa-refactoring compared with skills from other repositories

qa-refactoring next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
qa-refactoringvasilyu1983/AI-Agents-publicSkill1011mo agoMITA36Claude Code, Codex
code-review-excellencewshobson/agentsSkill43k2d agoMITA42Claude Code
multi-reviewer-patternswshobson/agentsSkill43k2d agoMITA49Claude Code
babysitmichael-denyer/pstack-claudeSkill5.2ktodayMITA61Claude Code
make-pr-easy-to-reviewmichael-denyer/pstack-claudeSkill5.2ktodayMITA57Claude Code
thermo-nuclear-code-quality-reviewmichael-denyer/pstack-claudeSkill5.2ktodayMITA54Claude Code
no-commentsmichael-denyer/pstack-claudeSkill5.2ktodayMITA24Claude Code