squid-refactor

squid-refactor is a skill for Claude Code from iusztinpaul/squid. It costs 47 tokens per session (2,469 once invoked), scanned A, original, Apache-2.0.

A planning tool for reorganising code without changing what the software does. It breaks the work into small, ordered tasks that can be committed safely and checked with tests after each step.

In plain words
What is it for?
Use it to split modules, change dependency direction, rename code across a repository, or replace an internal implementation while keeping the public interface unchanged.
Why use it?
It makes large structural changes easier to review and reduces the risk of accidentally changing existing behaviour.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: names the AskUserQuestion tool; mentions AGENTS.md.

Part of the squid plugin — 15 skills, 5 agents shipped together

Good fit Use it to split modules, change dependency direction, rename code across a repository, or replace an internal implementation while keeping the public interface unchanged.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iusztinpaul/squid/squid-refactor
Install

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.

Any agent
npx skills add iusztinpaul/squid --skill squid-refactor
Clone the repo
git clone --depth 1 https://github.com/iusztinpaul/squid

Made for: Claude Code.

Or install squid, the plugin that ships this one along with the rest of its 15 skills, 5 agents.

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 squid-refactor

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/iusztinpaul/squid/squid-refactor"><img src="https://agentmods.dev/badge/skills/iusztinpaul/squid/squid-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,469 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00047 $0.02469
Opus 5.5 $0.00019 $0.00988
Sonnet 5.5 $0.00009 $0.00494
Haiku 4.5 $0.00005 $0.00247

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

Security

Grade A, and why

squid-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 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.

skills/squid-refactor/SKILL.md · 177 lines

How it starts

The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Refactor — plan a no-behaviour-change structural improvement

A refactor is not a feature and not a bug, so the Product Architect's feature-grooming flow doesn't fit. This skill produces a Tasks Plan whose tasks are commit-grain (each one keeps main shippable, suite green at every commit) and whose AC are structural: imports, types, signatures, dependency direction, public surface, test coverage ("module X no longer imports module Y"). The output feeds /squid-implement-night directly.

You are the planner — you may delegate exploration but do NOT write code, do NOT execute steps. Your output is the plan file plus a hand-off message.

$ARGUMENTS is one of:

  • A free-form refactor goal ("extract auth.session into its own package", "replace ad-hoc retries with tenacity", "rename User.id to User.uid repo-wide").
  • A path to a markdown spec.
  • A tracker reference.

If empty, ask the user for one.

Read AGENTS.md first to confirm the active tracker mode (file or gh) and the pipeline map this plan plugs into.

When NOT to use

  • A feature with new user-visible behaviour — use /squid-plan (PA grooming) instead.
  • A rewrite — it's a feature whose user-visible behaviour is "the new system, but the same"; don't smuggle it in here.
  • A bug fix — use /squid-triage-issue, then /squid-implement-task or /squid-implement-night.
  • A one-file rename you can finish in five minutes — just do it; don't ceremony.

Step 1 — Resolve and frame the refactor

Identify what to refactor from $ARGUMENTS (same resolution rules as /squid-triage-issue's Step 1).

Capture three things explicitly — ask the user via AskUserQuestion if any are missing, one round of questions max:

  1. Goal — one sentence, structural. ("Move all auth code out of core/ and into auth/.")
  2. Definition of done — concrete, testable structural invariants. ("grep -r 'from core.auth' src/ returns nothing"; "auth/ has no imports from core/ except types"). At least 2.
  3. Hard constraints — what must not change. ("Public API of core.session.Session unchanged"; "no DB schema changes"; "feature flag X stays toggleable throughout").

Read the full file on GitHub · 177 lines

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. 1mo ago Changed · -17 lines e85f5dfa9338
  2. 1mo ago First seen · 194 lines · 47 tokens per session scan A fdf8ff7ff2e0

Subscribe to this mod's changes

squid-refactor is a skill published in the GitHub repository iusztinpaul/squid (210 stars, last pushed yesterday), licensed Apache-2.0. It adds 47 tokens to every session and 2,469 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.