qa-refactoring

qa-refactoring is a skill for Codex from vasilyu1983/AI-Agents-public. It costs 36 tokens per session (5,340 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 Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Claude Code; mentions Codex.

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: Codex.

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,340 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.05340
Opus 5 $0.00018 $0.02670
Sonnet 5 $0.00007 $0.01068
Haiku 4.5 $0.00004 $0.00534

Measured 6d ago against content hash 97ceabfdd644, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 6d 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.

frameworks/shared-skills/skills/qa-refactoring/SKILL.md · 289 lines

How it starts

The opening of the file, as written. The whole thing — 289 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 baseline: main 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: 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: get main green; 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: run the smallest relevant suite locally, then full CI; keep failures debuggable and deterministic.
  • Ship safely: use canary, shadow mode, migration flags, or branch-by-abstraction when refactors touch production-critical paths.

Read the full file on GitHub · 289 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. 6d 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 (87 stars, last pushed 8d ago), licensed MIT. It adds 36 tokens to every session and 5,340 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories

g-review

Run the review gate on the current branch diff. Runs the test suite, captures the diff, and dispatches code-lead, which verifies done conditions and reviews the diff itself. Issues MERGE READY or HOLD.

onlygian/G-Forge · 46 tokens

g-audit

Full-codebase or targeted code quality audit. Detects SOLID violations, code smells, architectural drift, dead code, and test coverage gaps. Targeted scope produces an inline report. Whole-codebase scope produces a prioritised roadmap milestone.

onlygian/G-Forge · 52 tokens

g-refactor

Guided refactor workflow — identify target, pre-analyse, spec, approve, execute, review. Accepts a scope path, an audit milestone file, or runs interactively. Safe-by-default: checks test coverage before execution and runs the full review gate after.

onlygian/G-Forge · 0 tokens

Pair Programming

AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with…

shyftlabs/continuum · 61 tokens

screen-reader-testing

Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues, or ensuring assistive technology support.

wshobson/agents · 39 tokens

temporal-python-testing

Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.

wshobson/agents · 45 tokens