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 agentmods add skills/weavatrix/weavatrix-refactor-js/skillnpx skills add Weavatrix/weavatrix-refactor-js --skill skillgit clone --depth 1 https://github.com/Weavatrix/weavatrix-refactor-jsWrote 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/weavatrix/weavatrix-refactor-js/skill)<a href="https://agentmods.dev/skills/weavatrix/weavatrix-refactor-js/skill"><img src="https://agentmods.dev/badge/skills/weavatrix/weavatrix-refactor-js/skill.svg" alt="Measured on agentmods" 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 | $0.00070 | $0.01492 |
| Opus 5 | $0.00035 | $0.00746 |
| Sonnet 5 | $0.00014 | $0.00298 |
| Haiku 4.5 | $0.00007 | $0.00149 |
Grade A, and why
weavatrix-refactor-js 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 3d 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 — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
weavatrix-refactor-js MCP
The write-side layer of the Weavatrix stack. The MIT weavatrix-js core is safe by design: its
published artifact contains no source-writing paths. This package's read-only plan producers
compute and prove a refactoring against the core's weavatrix-js/analysis-kit surface, and its
apply tools are the only thing in the family that writes — applying only plans it computed,
proved, and hashed, never inventing edits of its own.
Step 0 — if the tools are missing
Tools are named mcp__weavatrix__… (one merged catalog: core tools plus this extension). If
apply_edit_plan is absent, either this package is not installed, its refactor profile is not
selected, or the write gate is closed. Register with:
claude mcp add -s user weavatrix -- npx -y weavatrix-refactor-js <repoRoot>
(the bin defaults to the refactor profile: all seven offline core capabilities plus edit).
The write gates
Writing source needs the first two gates for either tool; apply_edit_plan adds the third:
- This package is installed and the
refactorprofile (or a custom list namingedit) is selected. - The server environment has
WEAVATRIX_ALLOW_SOURCE_EDITS=1. - For
apply_edit_plan(mode="apply") only: a valid, unexpiredconfirm_tokenbound to the exact file hashes of the plan (5-minute TTL, issued by apply_edit_plan's own preview step, stored outside the repository).rollback_last_applytakes no token.
A missing gate is a normal state, not an error to work around: fall back to applying the plan's
edits with your own editor, then run verified_change phase=verify as usual.
Tools
apply_edit_plan plan=<envelope> [mode] [confirm_token]— two modes over the same plan.mode="preview"(default) re-verifies every planned file's sha256 and the exactbeforetext and, on a clean match, issues a single-useconfirm_token.mode="apply" confirm_token=<token>consumes it under the core file lock, writes a rollback bundle, applies edits bottom-up, and reportsAPPLIED/STALE(hash drift — nothing written) /ROLLED_BACK(mid-apply failure — originals restored). It never applies a subset silently.rollback_last_apply— restores the pre-apply state from the most recent rollback bundle.
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.
- 3d ago First seen · 90 lines · 70 tokens per session scan A d692ea40d38d
weavatrix-refactor-js is a skill published in the GitHub repository Weavatrix/weavatrix-refactor-js (0 stars, last pushed 10d ago), licensed MIT. It adds 70 tokens to every session and 1,492 once invoked, about $0.0003 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-08-31.
Other skills, from other repositories
weavatrix-js
Use the Weavatrix MCP as a reusable local repository-intelligence layer: understand unfamiliar applications with a bounded code graph, reduce repeated context, review Health, dead code, duplicates and history, trace endpoints and blast radius, enforce target architecture, and verify changes before a PR.
weavatrix-refactor
Use Weavatrix Refactor only when the user explicitly requests repository source changes that benefit from a proven refactor workflow: symbol rename, coordinated rename, signature change, symbol edit, selected replacement, import cleanup, file or symbol move planning, deletion readiness, exact plan application, or…
weavatrix-refactor
Use Weavatrix Refactor only when the user explicitly requests repository source changes that benefit from a proven refactor workflow: symbol rename, coordinated rename, signature change, symbol edit, selected replacement, import cleanup, file or symbol move planning, deletion readiness, exact plan application, or…
lint-js
Lint JS/TS code only. Use before opening a PR when only JavaScript or TypeScript files were changed (no Rust).
git-cleanup
Clean up local git branches and remotes accumulated from PR reviews. Use when the user asks to clean branches, remove stale remotes, or tidy up the local git state.
Shade dropdown surface contract
DropdownMenu, Select, and Popover share one visual recipe (bg-surface-elevated-2 + border-border/60 dark:border-border/30 + shadow-md). Change them together. Trigger when editing any of those three Shade files.