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 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/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/weavatrix/weavatrix-refactor-js/skill"><img src="https://agentmods.dev/badge/skills/weavatrix/weavatrix-refactor-js/skill.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.00070 | $0.01492 |
| Opus 5.5 | $0.00028 | $0.00597 |
| Sonnet 5.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 1mo 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.
- 1mo 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 2mo ago), licensed MIT. It adds 70 tokens to every session and 1,492 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-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.
triage-contributor-pr
Triage open pull requests from external contributors to prisma/orm and produce a per-PR verdict with evidence. Use when a maintainer asks to triage, evaluate, assess, or review the queue of incoming contributor PRs, to decide whether a fork PR is safe to run CI on, to check whether a PR is in scope for its version…
review-implement-phase
Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.
review-triage-phase
Produces canonical review actions from fetched review state and renders action markdown. Use when the user wants only triage/action-planning for the review-framework workflow.
no-bare-casts
Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.
compiler-commit
Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits with the [compiler] or [rust-compiler] prefix.