pstack is a collection of plain Agent Skills and engineering principles that guide AI-assisted software development across coding agents such as Claude Code, Codex, Pi, Cursor, and OpenCode. It is for developers who want reusable practices for tasks including testing, technical writing, debugging, review, and coordinating agent work. The catalogue entries are the project's skills, agents, and plugin.
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.
npx skills add backnotprop/pstack --skill principle-guard-the-context-windowgit clone --depth 1 https://github.com/backnotprop/pstackWrote 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.
[](https://agentmods.dev/skills/backnotprop/pstack/principle-guard-the-context-window)<a href="https://agentmods.dev/skills/backnotprop/pstack/principle-guard-the-context-window"><img src="https://agentmods.dev/badge/skills/backnotprop/pstack/principle-guard-the-context-window/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.
<a href="https://agentmods.dev/skills/backnotprop/pstack/principle-guard-the-context-window"><img src="https://agentmods.dev/badge/skills/backnotprop/pstack/principle-guard-the-context-window.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.00112 |
| Opus 5.5 | $0.00018 | $0.00045 |
| Sonnet 5.5 | $0.00009 | $0.00022 |
| Haiku 4.5 | $0.00005 | $0.00011 |
Grade A, and why
principle-guard-the-context-window 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 13d 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.
This is a copy
95% identical to principle-guard-the-context-window — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
Guard the Context Window
Why: Context overflow degrades reasoning quality, creates compression artifacts, and halts progress.
Pattern:
- Size phases and cap scope. Limit files per phase, set turn budgets, account for mechanism costs.
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.
- 13d ago Changed · -4 lines af0b9dd70b43
- 21d ago Changed · -1 lines d2cef1478625
- 1mo ago Changed 9f60e2c79b35
- 1mo ago First seen · 18 lines · 46 tokens per session scan A 291d0125125e
principle-guard-the-context-window is a skill published in the GitHub repository backnotprop/pstack (2,800 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 112 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to principle-guard-the-context-window, differing in 2 lines, and is treated as a copy.
Other skills, from other repositories
coordinate-reasoning
AI internal coordination using stigmergic signals — managing information freshness in context and memory, decay rates for assumption staleness, and emergent coherent behavior from simple local protocols. Use during complex tasks where multiple sub-tasks must coordinate, when context has grown long and information…
bootstrap-agent-identity
Consistent agent behavior after restart — progressive identity loading, working context reconstruction from persistent artifacts, fresh-vs-continuation detection, calibration through centering and attunement, and identity verification for coherence. Addresses the cold-start problem where an agent must reconstruct who…
log-session
Append a structured entry to the project's session log (docs/LOGS.md): what was done this session, files touched, decisions taken, and the next step — so the next session (or another person) can pick up the thread without re-reading git history. Run it before /clear, before closing your agent session, or at any…
decision-logger
Two-layer memory architecture for board meeting decisions. Manages raw transcripts (Layer 1) and approved decisions (Layer 2). Use when logging decisions after a board meeting, reviewing past decisions with /cs:decisions, or checking overdue action items with /cs:review. Invoked automatically by the board-meeting…
context-engine
Loads and manages company context for all C-suite advisor skills. Reads /.claude/company-context.md, detects stale context (>90 days), enriches context during conversations, and enforces privacy/anonymization rules before external API calls. Use when starting any C-suite advisor session, when context looks stale or…
decide
/cs:decide — Log a decision to two-layer memory via decision-logger. Approved memo becomes durable; raw transcripts kept for reference. Use when the founder has approved a boardroom memo and the decision must become durable company memory — e.g. right after /cs:boardroom concludes.