trim-session-leakage

trim-session-leakage is a skill for Claude Code, Codex from hamza-ali-shahjahan/hamzaish. It costs 95 tokens per session (1,256 once invoked), scanned A, original, MIT.

A documentation cleanup guide for removing wording that depends on a past coding conversation or unfinished work.

In plain words
What is it for?
Use it before publishing documentation or opening a pull request to remove stale references, change narration, reviewer asides, and broken links to planned work.
Why use it?
It makes repository text understandable to people who did not see the original discussion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it before publishing documentation or opening a pull request to remove stale references, change narration, reviewer asides, and broken links to planned work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hamza-ali-shahjahan/hamzaish/trim-session-leakage
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 hamza-ali-shahjahan/hamzaish --skill trim-session-leakage
Clone the repo
git clone --depth 1 https://github.com/hamza-ali-shahjahan/hamzaish

Made for: Claude Code, Codex.

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 trim-session-leakage

README.md
[![agentmods](https://agentmods.dev/badge/skills/hamza-ali-shahjahan/hamzaish/trim-session-leakage/github.svg)](https://agentmods.dev/skills/hamza-ali-shahjahan/hamzaish/trim-session-leakage)
Your own site
<a href="https://agentmods.dev/skills/hamza-ali-shahjahan/hamzaish/trim-session-leakage"><img src="https://agentmods.dev/badge/skills/hamza-ali-shahjahan/hamzaish/trim-session-leakage/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 trim-session-leakage

Your own site · 80×15
<a href="https://agentmods.dev/skills/hamza-ali-shahjahan/hamzaish/trim-session-leakage"><img src="https://agentmods.dev/badge/skills/hamza-ali-shahjahan/hamzaish/trim-session-leakage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,256 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.00095 $0.01256
Opus 5.5 $0.00038 $0.00502
Sonnet 5.5 $0.00019 $0.00251
Haiku 4.5 $0.00010 $0.00126

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

Security

Grade A, and why

trim-session-leakage 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 3mo 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.

factory/skills/trim-session-leakage/SKILL.md · 96 lines

How it starts

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

trim-session-leakage — write from the repo's vantage, not the session's

An agent writing prose has two vantages available and only one of them survives:

  • the session — what we just discussed, what the last attempt did, what a reviewer asked, what a later step will fix
  • the repo at HEAD — what a stranger can read, resolve, and verify today

Prose written from the first vantage reads fine in the session that produced it and becomes unresolvable a week later. That's session leakage, and it's the characteristic decay of an agent-written codebase.

The one test. For every sentence:

Could a reader at HEAD, with no access to any session transcript, PR thread, or uncommitted draft, resolve every reference and verify every claim?

If no, the sentence is written from the wrong vantage. Rewrite it to describe what is true now, or delete it.

Method studied 2026-08-16 in deepseek-ai/deepseek-harness (dsh-trim-cot-leakage), which applies the same test across 688 agent-authored records. It is the natural mechanical companion to this repo's invariant that conversations never enter a repo: that rule keeps transcripts out, this skill keeps the vantage out.

The four leak classes

1. Dead references. Pointers to things a reader cannot open.

  • ✗ as decided in the earlier analysis · per the approach we chose · (decision 3)
  • ✓ name the file, the record, or the rule — per CLAUDE.md rule #12
  • ✓ or state the fact directly and drop the citation

2. Change narration. Prose describing the edit rather than the state. The repo is not a diff; git already holds the history.

  • ✗ this used to call the old parser · no longer needs the flag · now correctly handles…
  • ✓ describe what it does: parses the frontmatter block
  • Exception that matters: a comment recording the causal chain of a real defect is not narration — it is the highest-value comment there is. Keep "returns null here because an empty ledger must not read as success." Cut "changed this to return null."

Read the full file on GitHub · 96 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. 3mo ago First seen · 96 lines · 95 tokens per session scan A 93a1a403ddcd

Subscribe to this mod's changes

trim-session-leakage is a skill published in the GitHub repository hamza-ali-shahjahan/hamzaish (11 stars, last pushed 1mo ago), licensed MIT. It adds 95 tokens to every session and 1,256 once invoked, about $0.0004 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-09-03.

Related

trim-session-leakage compared with skills from other repositories

trim-session-leakage next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
trim-session-leakagehamza-ali-shahjahan/hamzaishSkill111mo agoMITA95Claude Code, Codex
gingiris-launchGingiris/gingiris-launchSkill2157mo agoMITA326Claude Code, Codex
payments-polaralifanov/ai-garage-launchSkill23mo agoMITA53Claude Code
stack-referencealifanov/ai-garage-launchSkill23mo agoMITA67Claude Code
unit-economicsalifanov/ai-garage-launchSkill23mo agoMITA73Claude Code
make-playbooktamdogood/make-playbookSkill55mo agoMITA97Claude Code
traffic-channelsalifanov/ai-garage-launchSkill23mo agoMITA59Claude Code