tfmcp: Skill for Claude Code

.claude/skills/refactor/SKILL.md

refactor is a skill for Claude Code from nwiizo/tfmcp. It costs 24 tokens per session (327 once invoked), scanned A, original, MIT.

A Rust refactoring skill for tfmcp that proposes or implements behavior-preserving changes when code is tightly coupled or duplicated. It checks callers and existing responsibilities before changing structure.

In plain words
What is it for?
Use it to plan or make scoped Rust refactors, move behavior to the right owner, remove confirmed duplication, and verify affected tests and checks.
Why use it?
It helps simplify code without changing MCP interfaces, Terraform safety, credential ownership, error handling, or redaction. It also requires relevant checks after implementation.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is nwiizo/tfmcp's own configuration. It tells Claude Code how to work on tfmcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tfmcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nwiizo/tfmcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nwiizo/tfmcp/main/.claude/skills/refactor/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/nwiizo/tfmcp

Made for: Claude Code.

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 refactor

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/nwiizo/tfmcp/refactor"><img src="https://agentmods.dev/badge/skills/nwiizo/tfmcp/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 327 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.00024 $0.00327
Opus 5.5 $0.00010 $0.00131
Sonnet 5.5 $0.00005 $0.00065
Haiku 4.5 $0.00002 $0.00033

Measured 26d ago against content hash c3f6559e4dc0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 26d 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.

.claude/skills/refactor/SKILL.md · 32 lines

What it actually says

Refactor tfmcp

Start from the user's finding or a current analysis. Confirm the responsibility and its callers before selecting a change. Follow development guidelines and signal integrity.

Run cargo coupling and similarity-rs before changing Rust structure, using the repository commands. Reuse current results. Prefer moving behavior to its existing domain owner, a named operation mode, or a conversion beside its destination type. Extract shared policy only when the responsibilities agree; do not add pass-through layers to improve a metric.

Preserve MCP tool names and schemas, protocol versus tool error distinctions, saved-plan and state safety, operation gates, credential boundaries, and output redaction. Verify callers of shared code, including intentional differences.

For a proposal, explain the problem, recommended change, and verification plan. For implementation, carry out the authorized change and verify affected behavior with real implementations. Follow E2E guidance when the change crosses a transport or Terraform execution boundary.

Compare diagnostics with the same settings and history. Run relevant tests and the required repository checks, including the full release gate required by the development guidelines for refactoring. Report actual results and limitations. Commit or push only when requested.

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. 26d ago First seen · 32 lines · 24 tokens per session scan A c3f6559e4dc0

Subscribe to this mod's changes

refactor is a skill published in the GitHub repository nwiizo/tfmcp (372 stars, last pushed 7d ago), licensed MIT. It adds 24 tokens to every session and 327 once invoked, about $0.0001 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-10-03.

Related

Other skills, from other repositories

m15-anti-pattern

Use when reviewing code for anti-patterns. Keywords: anti-pattern, common mistake, pitfall, code smell, bad practice, code review, is this an anti-pattern, better way to do this, common mistake to avoid, why is this bad, idiomatic way, beginner mistake, fighting borrow checker, clone everywhere, unwrap in production…

moeru-ai/auv · 101 tokens

architecture-audit

Systematic architecture audit and refactoring methodology for Rust + TypeScript codebases. Use when performing refactoring, cleanup, unification, code review, dead code removal, module reorganization, or tech debt elimination. Ensures no naming confusion, semantic overloading, hidden defaults, duplicate logic, or…

org2AI/ORG2 · 70 tokens

python-design-pattern

Python design patterns and anti-patterns. Use when designing new components, refactoring, reviewing code for common mistakes, choosing abstractions, or evaluating pull requests for structural issues like tight coupling, leaking internal types, or error handling problems.

AI-Riksarkivet/ra-mcp · 51 tokens

frama-c-proofreader

Verify and proofread C code with ACSL using this repository's Frama-C MCP workflow, Frama-C WP static proof, EVA alarms, and optional E-ACSL runtime checks. Use when asked to run Frama-C, check ACSL contracts, explain WP goals, inspect EVA alarms, validate C annotations, or state what a C proof does and does not…

sysprog21/frama-c-mcp · 82 tokens

writing-rust

Idiomatic Rust development. Use when writing Rust code, Cargo crates/workspaces, Rust tests, or rustfmt/clippy/cargo workflows. Emphasizes ownership, Result errors, small APIs, stdlib-first dependencies, fast cargo feedback, and behavior tests. NOT for Go, Python, TypeScript, shell scripts, or infra-only work.

alexei-led/cc-thingz · 73 tokens

pond

Recall and analyze past AI agent sessions (Claude Code, Codex, opencode, and more). Find prior work and decisions, read/review/summarize a past session transcript, or run SQL analytics over session history. Use whenever the user references past sessions, prior work, "check pond", or asks what was done or decided…

tenequm/pond · 71 tokens