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 byx-darwin/gitflow-cli --skill gf-refactorgit clone --depth 1 https://github.com/byx-darwin/gitflow-cliWrote 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/byx-darwin/gitflow-cli/gf-refactor)<a href="https://agentmods.dev/skills/byx-darwin/gitflow-cli/gf-refactor"><img src="https://agentmods.dev/badge/skills/byx-darwin/gitflow-cli/gf-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.
<a href="https://agentmods.dev/skills/byx-darwin/gitflow-cli/gf-refactor"><img src="https://agentmods.dev/badge/skills/byx-darwin/gitflow-cli/gf-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00100 | $0.04504 |
| Opus 5.5 | $0.00040 | $0.01802 |
| Sonnet 5.5 | $0.00020 | $0.00901 |
| Haiku 4.5 | $0.00010 | $0.00450 |
Grade A, and why
gf-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.
How it starts
The opening of the file, as written. The whole thing — 321 lines — stays where its author put it; the contents beside it link to each section on GitHub.
gf-refactor — Fowler Catalog-Driven Behavior-Preserving Refactoring
Executes RED→GREEN→REFACTOR's third stage: applies Fowler's refactoring
catalog to code that already has test coverage, one technique at a time,
verifying build and tests after every step. Downstream of /gf-smell
(finds problems) — this skill fixes them structurally, never behaviorally.
Preconditions
- Target code has test coverage; if not, do not refactor it — see When NOT to Refactor
- Language layer's build/test tooling installed — see
references/<lang>.md - Clean working tree before starting (uncommitted changes make the Safety Protocol's revert step ambiguous)
When to Use
| English | 中文 | Context |
|---|---|---|
| refactor this function | 重构这个函数 | apply a technique, not rewrite |
| extract function / method | 提炼函数 | reduce size/complexity |
| replace conditional with polymorphism | 以多态取代条件表达式 | eliminate type-code branching |
| clean up while keeping tests green | 边清理边保绿 | TDD REFACTOR stage |
| is this refactor safe | 这个重构安全吗 | semantic risk question |
When NOT to Use
| Scenario | Why Not | Use Instead |
|---|---|---|
| Finding smells/candidates in the first place | This skill acts on candidates, it does not hunt for them | /gf-smell |
| Pre-delivery quality gate | This skill changes structure, not gate pass/fail | /gf-quality |
| Any change to observable behavior is wanted | Not a refactor by definition | Regular TDD RED→GREEN change, separate commit |
When NOT to Refactor
| Scenario | Why Not |
|---|---|
| Code path has 无测试覆盖 | Nothing verifies behavior was preserved; write the test first, or refuse |
| The technique is tagged 条件等价/可能变更 and its precondition is unverified | Downgrade to suggestion per Semantic Safety Boundary — do not touch the code |
| A behavior change is also wanted alongside | Split into two changes; refactor first (green), then the behavior change as its own commit |
| Code is about to be deleted | No return on refactoring investment |
What ships with it
1 file 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.
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.
- 2mo ago Changed · +1 lines 2595be74d11b
- 2mo ago First seen · 320 lines · 100 tokens per session scan A b7b7dc4495a3
gf-refactor is a skill published in the GitHub repository byx-darwin/gitflow-cli (3 stars, last pushed 2mo ago), licensed MIT. It adds 100 tokens to every session and 4,504 once invoked, about $0.0004 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-19.
gf-refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| gf-refactorbyx-darwin/gitflow-cli | Skill | 3 | 2mo ago | MIT | A | 100 | Claude Code |
| adk-go-self-reviewgoogle/adk-go | Skill | 9.0k | today | Apache-2.0 | A | 87 | Claude Code, Codex |
| nw-fp-usable-designnWave-ai/nWave | Skill | 636 | 12d ago | MIT | A | 20 | Claude Code |
| software-code-refactoringstencila/stencila | Skill | 916 | today | Apache-2.0 | A | 102 | Claude Code |
| nw-sa-critique-dimensionsnWave-ai/nWave | Skill | 636 | 12d ago | MIT | A | 33 | Claude Code |
| nw-review-workflownWave-ai/nWave | Skill | 636 | 12d ago | MIT | A | 21 | Claude Code |
| review-checklistwesammustafa/Claude-Code-Everything-You-Need-to-Know | Skill | 3.7k | 2d ago | none | A | 25 | Claude Code, Codex |