context-bankruptcy

context-bankruptcy is a cursor rule for Cursor from mohitagw15856/pm-claude-skills. It costs 104 tokens per session (1,306 once invoked), scanned A, original, MIT.

A process for cleaning up an AI agent's stored beliefs and memories. It checks which facts, preferences, procedures, and relationships are still true, then records what is kept, corrected, or removed.

In plain words
What is it for?
Use it to audit an agent after organisational changes, cancelled projects, changed preferences, or repeated mistakes, and create a current reference for future sessions.
Why use it?
Long-running agents can rely on outdated or incorrect information and contradict themselves. This gives you a deliberate reset without losing useful knowledge or hiding what was forgotten.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to audit an agent after organisational changes, cancelled projects, changed preferences, or repeated mistakes, and create a current reference for future sessions.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mohitagw15856/pm-claude-skills/context-bankruptcy
About the project

PM Skills is a collection of plain-Markdown instructions that teach AI assistants structured methods for handling professional, personal, and life-admin tasks. People use it with Claude, ChatGPT, Gemini, Cursor, Codex, and other supported agents for work such as writing product requirements, reviewing documents, or planning difficult situations.

mohitagw15856/pm-claude-skills · 1,352 stars · on GitHub · mohitagw15856.github.io

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.

Clone the repo
git clone --depth 1 https://github.com/mohitagw15856/pm-claude-skills

Made for: Cursor.

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 context-bankruptcy

README.md
[![agentmods](https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/context-bankruptcy/github.svg)](https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/context-bankruptcy)
Your own site
<a href="https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/context-bankruptcy"><img src="https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/context-bankruptcy/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 context-bankruptcy

Your own site · 80×15
<a href="https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/context-bankruptcy"><img src="https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/context-bankruptcy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,306 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.00104 $0.01306
Opus 5 $0.00052 $0.00653
Sonnet 5 $0.00021 $0.00261
Haiku 4.5 $0.00010 $0.00131

Measured 11d ago against content hash b301faf4f9db, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

context-bankruptcy 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 11d 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.

exports/cursor/pm-2027/context-bankruptcy/context-bankruptcy.mdc · 111 lines

How it starts

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

Context Bankruptcy Skill

Every long-lived agent slowly fills with sediment: the org chart from two reorgs ago, the project that got cancelled but still shapes its suggestions, the preference you expressed once, sarcastically, in March. Deleting everything loses the genuinely valuable judgment it accumulated; deleting nothing means arguing with a colleague who lives in the past. Bankruptcy is the middle path with discipline: audit the beliefs, keep what's true, correct what drifted, purge what's wrong or expired — and write down what was lost, because silent memory loss is how the same wrong belief gets re-learned from the same stale sources next month.

What This Skill Produces

  • A belief audit: what the agent currently holds, organized into facts / preferences / procedures / relationships, each dated and sourced where possible
  • A keep / correct / purge ledger with a reason per entry — the artifact that makes the bankruptcy deliberate instead of a rage-wipe
  • A restated ground-truth file: the clean, current worldview to reload, written to survive the next drift longer (dated claims, expiry hints)
  • A bankruptcy record: what was purged and why, plus the re-learn guards — which stale sources fed the bad beliefs and how to stop them refeeding

Required Inputs

Ask for (if not already provided):

  • The agent's memory contents, exported or pasted (memory files, saved context, custom instructions, whatever the platform exposes) — the audit works on what it can see, and says so
  • The symptoms: what it keeps getting wrong, where it contradicts itself
  • What changed in reality (reorg, pivot, new stack, new owner) and when
  • What the agent is good at that must survive — the reason this is bankruptcy, not deletion

Process

  1. Extract beliefs, not text. Convert the memory dump into discrete claims: "believes the platform team owns billing" · "believes user prefers terse answers" · "believes deploys happen Fridays". Tag each: fact / preference / procedure / relationship, with best-guess age. Unstated-but-acted-on beliefs (visible in the symptoms) go in too, marked inferred.
  2. Sort against current reality. With the user, mark each claim KEEP (true, valuable) · CORRECT (right shape, wrong details — write the fix) · PURGE (wrong, expired, or toxic — including preferences the user no longer holds). Rule for ties: a belief that can silently misdirect output is PURGE-by-default; a belief that's merely unused can stay.
  3. Find the feeders. For each purged belief worth the trouble: where did it come from, and does that source still exist (an old doc it can read, a stale instruction file, a pinned message)? Purging the belief but not the feeder schedules the relapse.
  4. Restate ground truth to age well. Write the reload file with dated claims ("as of Jul 2026, billing is owned by…"), explicit preferences in the user's own words, and expiry hints ("re-verify org facts quarterly"). Load order matters on most platforms: ground truth in the durable slot (instructions/memory), not a chat message that scrolls away.
  5. Record the bankruptcy. What was purged, why, date, and the guards added. Schedule the next audit — sediment accumulates at a knowable rate; quarterly is the sane default for daily-driver agents.

Read the full file on GitHub · 111 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. 11d ago First seen · 111 lines · 104 tokens per session scan A b301faf4f9db

Subscribe to this mod's changes

context-bankruptcy is a cursor rule published in the GitHub repository mohitagw15856/pm-claude-skills (1,352 stars, last pushed 3d ago), licensed MIT. It adds 104 tokens to every session and 1,306 once invoked, about $0.0005 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.