squid-refactor

squid-refactor is a skill for Claude Code, Codex from iusztinpaul/squid. It costs 47 tokens per session (2,877 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/iusztinpaul/squid/squid-refactor
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, Codex.

Or install squid, the plugin that ships this one along with the rest of its 16 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.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.svg" alt="Measured on agentmods" 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,877 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00047 $0.02877
Opus 5 $0.00023 $0.01438
Sonnet 5 $0.00009 $0.00575
Haiku 4.5 $0.00005 $0.00288

Measured 5d ago against content hash fdf8ff7ff2e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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 · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 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. Its acceptance criteria are structural ("module X no longer imports module Y", "the public API of foo() is unchanged but the implementation is now split across N files") and its safety net is "the test suite is green at every commit." The Product Architect's normal feature-grooming flow doesn't fit because there's no user-visible behaviour to acceptance-test.

This skill produces a Tasks Plan whose tasks are commit-grain (each one keeps main shippable) and whose AC speak the refactor's actual concerns: imports, types, signatures, dependency direction, public surface, test coverage. 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 to use

  • Structural changes with no user-visible behaviour change: extractions, renames, dependency-inversion, layer-cleanup, dead-code removal, performance refactors that preserve semantics.
  • Migration-shaped work where every step must keep main green (e.g., gradual library swap with parallel old/new paths).
  • Anything you'd otherwise be tempted to ship as one giant PR.

When NOT to use

  • A feature with new user-visible behaviour — use /squid-plan (PA grooming) instead.
  • 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.
  • Refactors where the test suite is too thin to anchor "green at every step." First task in that case is expand test coverage, then come back here. The skill will surface this gap in Step 2.

Read the full file on GitHub · 194 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. 5d 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 (184 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 47 tokens to every session and 2,877 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

ai-assist-prototype

Build self-contained, double-click-to-open HTML prototypes so the user can vet an interface before it gets built. One file holds several structurally different variants of a page, app screen, component, flow, or terminal/TUI layout (rendered in-browser), plus a draggable Design Deck for flipping between variants…

jparkerweb/ai-assist-skills · 311 tokens

ai-assist-git-pr-review

Perform a standards-based code review on a GitHub Pull Request, then post the findings as inline review comments and mark the PR as 'Requested changes'. Reads all of the agents files that exist in the repository under review (AGENTS.md, .agents-docs/, CLAUDE.md on the PR's base branch) — the repo's full documented…

jparkerweb/ai-assist-skills · 221 tokens

ai-assist-git-pr

Adaptive GitHub PR lifecycle skill — create PRs, write/update descriptions, investigate review comments (Copilot + human) with research and batch approval, and check merge readiness. Triggers on: create PR, open PR, describe PR, update description, PR body, check comments, copilot feedback, review comments, address…

jparkerweb/ai-assist-skills · 87 tokens

ai-assist-design-creator

Reverse-engineer a website's visual design system from a URL and produce a fully spec-compliant DESIGN.md file (https://github.com/google-labs-code/design.md). The output includes both machine-readable YAML design tokens (colors, typography, spacing, rounded corners, components) and human-readable markdown rationale…

jparkerweb/ai-assist-skills · 182 tokens

ai-assist-dockerize-website

Guide the user through containerizing and serving a simple website or documentation folder with Docker — inspects the project to detect what to serve (ready-to-serve static HTML, a buildable site that emits static output, or a raw markdown/docs folder that needs rendering), generates a Dockerfile, .dockerignore…

jparkerweb/ai-assist-skills · 164 tokens

ai-assist-changelog-bump

Validate and fix the CHANGELOG.md version number before opening a PR, commiting, or pushing changes, and keep package.json's version aligned with it. Reads main branch to determine the current latest version, classifies changes on the current branch, and proposes the correct next semver. Use this skill when the user…

jparkerweb/ai-assist-skills · 133 tokens