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 boshu2/agentops --skill refactorgit clone --depth 1 https://github.com/boshu2/agentopsWrote 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/boshu2/agentops/refactor)<a href="https://agentmods.dev/skills/boshu2/agentops/refactor"><img src="https://agentmods.dev/badge/skills/boshu2/agentops/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/boshu2/agentops/refactor"><img src="https://agentmods.dev/badge/skills/boshu2/agentops/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00040 | $0.01706 |
| Opus 5.5 | $0.00016 | $0.00682 |
| Sonnet 5.5 | $0.00008 | $0.00341 |
| Haiku 4.5 | $0.00004 | $0.00171 |
Grade A, and why
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 19d 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 — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor — one structural experiment
Refactor changes structure while preserving observable behavior. It performs one caller-selected transformation and reports the result. "Behavior-preserving" is a claim to prove with before/after checks, never to assert. A user sees it worked when the report shows the same checks run before and after with identical results, and any suspected bug listed unfixed.
What counts as behavior
Unless the caller explicitly excluded a surface, all of these must survive:
- Messages and exit codes. Error and output text compares byte-for-byte; exit codes, error types and which input raises which error stay the same. Scripts and callers parse them. Preserve an inconsistent message and report it; normalizing it is a behavior change.
- Differences between near-duplicates. When merging duplicated branches, carry every difference (constants, comparisons, messages, extra steps) as a parameter or a branch. Do not unify a difference the caller has not declared accidental.
- Interfaces. Public signatures, defaults, return types, persisted field names, protocol values and CLI flags. Renaming one is a compatibility change unless the accepted scope provides for it.
- Order and coverage. Branch priority, default handling, evaluation count, side-effect order, and the set of tests that run. A pre-existing red that vanishes, or a test that stops running, is a behavior change.
- Protective checks. Trust-boundary validation, data-loss guards, security controls and accessibility affordances stay, even when another layer, upstream or downstream, duplicates one or no test reaches it. The neutrality gates cannot see their removal, so looking redundant is no reason to delete one.
Procedure
- Name the preserved behavior, the focused acceptance surface and the concrete structural problem for its callers, in the caller's domain terms.
- Run the focused check and the smallest regression check the changed surface justifies, error paths included, and record that honest baseline, including reproducible ambient failures. Add any characterization test the transformation needs now, before the edit, so it is part of the baseline. For output-producing surfaces (generators, serializers, formatters, reports), hash the output over fixed inputs. When the caller's evaluation compares the built program before and after the change, pin the starting source, build its baseline before edits and keep that binary and the comparison inputs.
- Apply one bounded transformation: extract, move, rename, inline, simplify a conditional, reduce parameters, encapsulate, substitute existing code, or delete dead code; the refactoring catalog holds per-pattern safety checks. Judge it by what callers must understand and where a domain rule must change, not by file size.
- A bug or suspicious inconsistency found on the way is reported separately (location, why it looks wrong) and left unfixed. Fixing it inside the refactor hides a behavior change the caller did not authorize.
- Rerun exactly the step-2 checks over the same inputs and compare any output hashes byte-for-byte.
- Report, then stop. A red result is evidence for the caller; this skill does not revert, narrow, retry, commit, validate, or route subsequent work.
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.
- 19d ago Changed · +11 lines f428d6b41a79
- 29d ago Changed · +3 lines 91abe2a02ce9
- 1mo ago Changed · -22 lines 0024a2e5dcab
- 1mo ago Changed · +20 lines 07726aaa28c9
- 1mo ago Changed · +42 lines · +9 tokens per session a44d65da917d
- 2mo ago Changed · -27 lines 4733d437e97b
- 2mo ago Changed · +19 lines · +2 tokens per session 7bf047eef937
- 2mo ago Changed · +4 lines e63c6c33fb01
- 2mo ago Changed · +13 lines 515d71efb7d1
- 3mo ago First seen · 87 lines · 29 tokens per session scan A 30c934734b38
refactor is a skill published in the GitHub repository boshu2/agentops (464 stars, last pushed yesterday), licensed Apache-2.0. It adds 40 tokens to every session and 1,706 once invoked, about $0.0002 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-08-30.
refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactorboshu2/agentops | Skill | 464 | yesterday | Apache-2.0 | A | 40 | Claude Code |
| brainstormOutlineDriven/odin-claude-plugin | Skill | 40 | 2mo ago | Apache-2.0 | A | 85 | Claude Code, Codex |
| audit-projectOutlineDriven/odin-claude-plugin | Skill | 40 | 2mo ago | Apache-2.0 | A | 50 | Claude Code, Codex |
| commit-push-prOutlineDriven/odin-claude-plugin | Skill | 40 | 2mo ago | Apache-2.0 | A | 46 | Claude Code, Codex |
| commitOutlineDriven/odin-claude-plugin | Skill | 40 | 2mo ago | Apache-2.0 | A | 46 | Claude Code, Codex |
| duetOutlineDriven/odin-claude-plugin | Skill | 40 | 2mo ago | Apache-2.0 | A | 28 | Claude Code, Codex |
| prototypeOutlineDriven/odin-claude-plugin | Skill | 40 | 2mo ago | Apache-2.0 | A | 36 | Claude Code, Codex |