skill-refactor

skill-refactor is a skill for Codex from jscraik/Agent-Skills. It costs 81 tokens per session (2,552 once invoked), scanned A, original, Apache-2.0.

A review guide that examines coding-agent skill usage and session history for failures, repeated patterns, and missing coverage.

In plain words
What is it for?
Use it to monitor skill health and decide which skills to install, improve, combine, or remove.
Why use it?
It replaces guesswork about skill maintenance with recommendations based on observed evidence.

Skill for Codex

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

Good fit Use it to monitor skill health and decide which skills to install, improve, combine, or remove.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jscraik/agent-skills/skill-refactor
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 jscraik/Agent-Skills --skill skill-refactor
Clone the repo
git clone --depth 1 https://github.com/jscraik/Agent-Skills

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 skill-refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/jscraik/agent-skills/skill-refactor/github.svg)](https://agentmods.dev/skills/jscraik/agent-skills/skill-refactor)
Your own site
<a href="https://agentmods.dev/skills/jscraik/agent-skills/skill-refactor"><img src="https://agentmods.dev/badge/skills/jscraik/agent-skills/skill-refactor/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 skill-refactor

Your own site · 80×15
<a href="https://agentmods.dev/skills/jscraik/agent-skills/skill-refactor"><img src="https://agentmods.dev/badge/skills/jscraik/agent-skills/skill-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,552 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.
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.00081 $0.02552
Opus 5.5 $0.00032 $0.01021
Sonnet 5.5 $0.00016 $0.00510
Haiku 4.5 $0.00008 $0.00255

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

Security

Grade A, and why

skill-refactor 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 2mo 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.

Plugins/skill-factory/skills/data_fetch_analysis/skill-refactor/SKILL.md · 230 lines

How it starts

The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill Refactor

Analyze bounded evidence about skill reliability and turn it into a lifecycle decision or a repair handoff.

Philosophy

Decide from bounded evidence; prefer narrow, reversible lifecycle moves.

First-Principles Gate

  • Desired outcome: classify skill reliability evidence and route to keep, observe, improve, capture, merge/fold with approval, or retire with approval without mutating source prematurely.
  • User-specific constraints: use bounded evidence, preserve approval boundaries, route improvements through Skill Factory hardening, and map eval disagreement to SDK gates.
  • Rejected copied assumption: a failing skill should immediately be rewritten or retired.
  • Fundamental constraints: evidence strength controls scope; lifecycle decisions need approval when destructive; weak evidence cannot justify broad canonical changes.
  • Smallest effective mechanism: produce a lifecycle decision and concrete repair handoff items before edits.
  • Artifact decision: IMPROVE_EXISTING.
  • Rejected alternatives: retiring from weak evidence, merging without approval, or patching source before classifying root cause.
  • Evidence required: evidence anchors, root-cause labels, and repair items with expected SDK gate.
  • Validation proof: each finding cites one source and one owning gate.
  • Stop or pivot condition: if evidence is missing or untrusted, ask for bounded evidence instead of recommending a lifecycle move.

When To Use

  • The user asks which skill is failing, why a skill keeps producing bad outcomes, or whether a skill should be kept, improved, merged, split, retired, or observed.
  • Evidence exists from session collector, Tessl review, Plugin Eval, validation logs, evals, CodeRabbit/Codex findings, or review artifacts.
  • The expected output is analysis and routing, not direct source edits.

Do Not Use When

  • New skill creation -> skillify or skill-creator.
  • Hardening a known existing skill -> Skill Factory hardening workflow.
  • Install, sync, publish, or runtime projection mutation.
  • Evidence is missing, untrusted, too broad, or requires external/destructive action.

Read the full file on GitHub · 230 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. 2mo ago Changed · +217 lines · +37 tokens per session 20552717da7d
  2. 2mo ago First seen · 13 lines · 44 tokens per session scan A f7b9134bc16d

Subscribe to this mod's changes

skill-refactor is a skill published in the GitHub repository jscraik/Agent-Skills (10 stars, last pushed 6d ago), licensed Apache-2.0. It adds 81 tokens to every session and 2,552 once invoked, about $0.0003 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

skill-refactor compared with skills from other repositories

skill-refactor next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
skill-refactorjscraik/Agent-SkillsSkill106d agoApache-2.0A81Codex
agent-code-analyzerruvnet/rufloSkill83ktodayMITA19Claude Code
worker-integrationruvnet/rufloSkill83ktodayMITA14Claude Code
agui-dotnet-streaming-chatag-ui-protocol/ag-uiSkill22k3d agoMITA223Claude Code
agui-dotnet-protobufag-ui-protocol/ag-uiSkill22k3d agoMITA162Claude Code
revdiff-planumputun/revdiffSkill9742d agoMITA84Claude Code
moai-ref-ui-polishmodu-ai/moai-adkSkill1.3ktodayApache-2.0A98Claude Code