Agent skill

Squid Clean Memory

by iusztinpaul in iusztinpaul/squid

Shrink the memory files sessions load — the root AGENTS.md plus every nested AGENTS.md / CLAUDE.md — to the minimum words that state the same rules: compress wording, delete duplicates and…

Apache-2.0Auto-check passedAgent Workflows

Install Squid Clean Memory

skills CLI
$ npx skills add iusztinpaul/squid --skill squid-clean-memory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install iusztinpaul/squid squid-clean-memory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/iusztinpaul/squid.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/squid-clean-memory .claude/skills/squid-clean-memory && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
squid-clean-memory
GitHub stars
203
Token cost
~1.3k tokens
SKILL.md length
690 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
Apache-2.0

At a glance

Shrink the memory files sessions load — the root AGENTS.md plus every nested AGENTS.md / CLAUDE.md — to the minimum words that state the same rules: compress wording, delete duplicates and…

  • Works in 7 steps: Resolve the target set → Compress wording (caveman pass) → Apply the keep/delete test → …
  • Tasks that involve Agent instruction files
  • SKILL.md covers When NOT to use, Step 1 — Resolve the target set, Step 2 — Compress wording… and Step 3 — Apply the keep/delete…, plus 5 more sections
  • Calls git and uv

What it does

Squid Clean Memory is an agent skill from iusztinpaul/squid. Shrink the memory files sessions load — the root AGENTS.md plus every nested AGENTS.md / CLAUDE.md — to the minimum words that state the same rules: compress wording, delete duplicates and harness-enforced claims, merge fragments.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent instruction files. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Agent instruction files

Example prompts

  • “/squid-clean-memory”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Resolve the target set
  2. Compress wording (caveman pass)
  3. Apply the keep/delete test
  4. Plan of attack (the output artifact)
  5. Execute
  6. Verify
  7. Hand-off

What it can do on your machine

Read from SKILL.md and the folder at commit f5bf6b3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Squid Clean Memory loads about 1.3k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 690 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from iusztinpaul/squid at commit f5bf6b3, republished under its Apache-2.0 licence (© iusztinpaul). 690 words, ~1,315 tokens.

Download SKILL.mdSave it as .claude/skills/squid-clean-memory/SKILL.md (or your agent's skills folder).
name
squid-clean-memory
description
Shrink the memory files sessions load — the root AGENTS.md plus every nested AGENTS.md / CLAUDE.md — to the minimum words that state the same rules: compress wording, delete duplicates and harness-enforced claims, merge fragments.
disable-model-invocation
true
argument-hint
[scope-path] (default: every memory file in the repo)

Clean memory — same rules, minimum words

You are the cleaner. You shrink the memory files sessions load; you do not change what they instruct. Zero meaning diff is the contract — every rule that holds before must hold after, and no new rule may appear.

$ARGUMENTS is an optional file or directory scope. Empty means every memory file in the repo: the root AGENTS.md plus each nested AGENTS.md / CLAUDE.md. Where CLAUDE.md symlinks AGENTS.md, that is one file — edit the target, never replace the symlink with a copy.

When NOT to use

  • Docs, READMEs, comments, docstrings → /squid-clean-docs.
  • A rule you think is wrong — that is a deliberate edit to make with the user, not a cleanup.

Step 1 — Resolve the target set

Discover the set with git ls-files '*AGENTS.md' '*CLAUDE.md' (tracked files only, so vendored trees stay out), narrow to $ARGUMENTS if given, and collapse symlink pairs. The files must be clean in git.

Step 2 — Compress wording (caveman pass)

If the caveman plugin is installed, ask, then run /caveman-compress <file> on each file in the set and commit the pass as one commit (code, paths, and URLs are byte-preserved). Compress before cutting: normalised wording turns reworded duplicates into literal ones. Not installed → skip; the cuts below still shrink the files, just without the wording-level pass.

Step 3 — Apply the keep/delete test

A memory line survives only if deleting it would change how a future session behaves. Three cuts:

Duplicates — the same instruction stated twice, even reworded — in one file or across the set: a nested AGENTS.md repeating the root dies where it's nested, since the root already loads everywhere. Keep one home, delete the copies; leave a cross-reference only when the section survives without it. Moving a rule between files (root ↔ nested) changes where it applies — that is a scope edit, not a cleanup: flag it in the plan, never fold it into a dedupe.

Baked-in claims — the test: would a fresh session with an empty memory file already behave this way? If yes, the line is dead weight. Caution: AGENTS.md is read by non-Claude harnesses too — if the behaviour is a Claude Code default rather than universal, keep the line and flag it in the plan.

DeleteKeep
"Always read a file before modifying it." — harness enforces"Use uv run pytest, never bare pytest." — project decision
"Be concise." / "Don't over-engineer." — system-prompt defaults"Chunk at 200 tokens — the embedding model truncates above 256."
Install steps under both Setup and Contributing — one home"Never edit docs/adr/ — ADRs are immutable."

Merges — two sections merge when a reader never needs one without the other, or a section is a few lines sharing a topic with its neighbour. A 3-line Code style plus a 2-line Naming become one Conventions; a heading costs more attention than it organises.

Show full SKILL.md (228 more words)Show less

Step 4 — Plan of attack (the output artifact)

Print one table in chat. Do not write it to disk unless the user asks.

FileLines / sectionCut (Step 3)Why~Words
AGENTS.md"read before you edit"baked-inharness enforces it−9
api/AGENTS.md"use uv run, never pip"duplicateroot already states it−11
AGENTS.mdCode style + Namingmergealways read together−12

Stop and wait for explicit approval. Do not edit before it.

Step 5 — Execute

Apply the approved plan as one commit, separate from the Step 2 commit.

Step 6 — Verify

Meaning must be provably unchanged before hand-off:

  • Re-read each final file against its pre-clean version: every old rule is still stated in a file that loads wherever the rule applied, merged, or a planned deletion — name its new home.
  • Every path, command, and URL in the files still resolves.
  • git diff touches only memory files.

Anything off: revert that commit, do not "fix forward".

Step 7 — Hand-off

Report wc -w before → after per file. Then ask the user to run /doctor (Claude Code only — a built-in you cannot invoke): Step 1 scopes this pass to tracked files, so the always-loaded local ones — ~/.claude/CLAUDE.md, CLAUDE.local.md — are never reached here; /doctor dedupes those against the checked-in set.

Notes on shape

  • Fewer words, never fewer rules. If a cut loses a nuance, it is an edit — out of scope.

© iusztinpaul, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/squid-clean-memory of iusztinpaul/squid.

Open the folder on GitHubat commit f5bf6b3

Compare with similar skills

Squid Clean Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Squid Clean Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Squid Clean Memory this skilliusztinpaul/squid203—~1.3kAutomated safety check: PassApache-2.0
Using Agent Skillsaddyosmani/agent-skills103k4 repos~2.4kAutomated safety check: PassMIT
Claude ReflectBayramAnnakov/claude-reflect1.7k2 repos~627Automated safety check: PassMIT
Writing For Agentsbestofjs/bestofjs3.1k19 repos~2.7kAutomated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Task Observerrebelytics/one-skill-to-rule-them-all3.2k1 repos~12kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    103k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Claude Reflect

    BayramAnnakov/claude-reflect

    Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.

    1.7k GitHub starsUsed in 2 repos~627 tokens
    Agent WorkflowsAuto-check passed
  • Writing For Agents

    bestofjs/bestofjs

    Writing documents for agents. An agent skill from bestofjs/bestofjs.

    3.1k GitHub starsUsed in 19 repos~2.7k tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~12k tokens
    Agent WorkflowsAuto-check passed
  • SkillOpt Sleep Cycle

    microsoft/SkillOpt

    Official

    Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.

    18k GitHub stars~2.3k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed

More from iusztinpaul/squid

All 13 skills in this repo
  • Squid Implement Night

    iusztinpaul/squid

    Run the full agent-team pipeline end-to-end for one feature whose Tasks Plan is already approved by /squid-plan, handing the human a validated, ready-to-squash-merge PR.

    203 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Implement Task

    iusztinpaul/squid

    Implement one task — or a whole list / an approved Tasks Plan — via the inner SWE↔Tester loop, committing each task on PASS.

    203 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Review

    iusztinpaul/squid

    Push the committed feature branch, create or update its PR, then run Product Architect acceptance and PR-Reviewer on it.

    203 GitHub stars~873 tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Review CI

    iusztinpaul/squid

    Drive CI green on a pushed, review-clean feature PR — On-Call diagnoses failures and hands fix tasks to the SWE.

    203 GitHub stars~607 tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Testing Python

    iusztinpaul/squid

    Write and evaluate effective Python tests using pytest. An agent skill from iusztinpaul/squid.

    203 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Architecture Review

    iusztinpaul/squid

    Periodic architectural sweep — reads existing ADRs, maps modules/dependencies/layering, and reports up to 10 prioritised findings shaped as refactor proposals /squid-refactor can consume directly.

    203 GitHub stars~2.6k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Squid Clean Memory

What does Squid Clean Memory do?

Shrink the memory files sessions load — the root AGENTS.md plus every nested AGENTS.md / CLAUDE.md — to the minimum words that state the same rules: compress wording, delete duplicates and…. Squid Clean Memory is an agent skill from iusztinpaul/squid.md — to the minimum words that state the same rules: compress wording, delete duplicates and harness-enforced claims, merge fragments.

When should I use Squid Clean Memory?

Squid Clean Memory fits situations like: tasks that involve Agent instruction files.

How do I install Squid Clean Memory in Claude Code?

Run `npx skills add iusztinpaul/squid --skill squid-clean-memory -a claude-code`. Or copy the skill folder (skills/squid-clean-memory in iusztinpaul/squid) into .claude/skills/squid-clean-memory in your project. Claude Code loads it when a task matches its description.

How do I install Squid Clean Memory in Codex?

Run `npx skills add iusztinpaul/squid --skill squid-clean-memory -a codex`. Or copy the skill folder (skills/squid-clean-memory in iusztinpaul/squid) into .agents/skills/squid-clean-memory in your project. Codex loads it when a task matches its description.

Can I use Squid Clean Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add iusztinpaul/squid --skill squid-clean-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/squid-clean-memory, .gemini/skills/squid-clean-memory, .github/skills/squid-clean-memory and .opencode/skills/squid-clean-memory in your project.

What does Squid Clean Memory need to run?

Going by SKILL.md and its folder, Squid Clean Memory needs the command-line tools its instructions call (git and uv).

Does Squid Clean Memory access the network?

SKILL.md contains no URLs. Its commands use git and uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Squid Clean Memory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Squid Clean Memory use?

Squid Clean Memory is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Squid Clean Memory use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Squid Clean Memory?

Skills that share tags, products or a category with Squid Clean Memory: Using Agent Skills (addyosmani/agent-skills, 103k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.7k stars), Writing For Agents (bestofjs/bestofjs, 3.1k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Squid Clean Memory?

iusztinpaul (a GitHub user) maintains it in iusztinpaul/squid, which has 203 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 3, 2026.

Source: iusztinpaul/squid on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.