Borrowing it
Nothing to install: this file belongs to PedroMosquera/squadai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/PedroMosquera/squadai/main/.claude/skills/shared/context-discipline/SKILL.mdgit clone --depth 1 https://github.com/PedroMosquera/squadaiWrote 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/pedromosquera/squadai/context-discipline)<a href="https://agentmods.dev/skills/pedromosquera/squadai/context-discipline"><img src="https://agentmods.dev/badge/skills/pedromosquera/squadai/context-discipline/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/pedromosquera/squadai/context-discipline"><img src="https://agentmods.dev/badge/skills/pedromosquera/squadai/context-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00040 | $0.00587 |
| Opus 5 | $0.00020 | $0.00293 |
| Sonnet 5 | $0.00008 | $0.00117 |
| Haiku 4.5 | $0.00004 | $0.00059 |
Grade A, and why
context-discipline 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 9d 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.
What it actually says
Context Discipline Skill
On-demand procedures for context recovery and long-session hygiene. Load this skill only when needed — after a compaction, or when context pressure builds.
Compaction Recovery Procedure
When context is compacted or truncated mid-task, re-anchor before acting:
- Session state — read
AGENTS.mdorCLAUDE.mdfor recorded decisions; in solo sessions, look for=== PHASE: <name> ===markers in the visible context to find your position. - Recent history — run
git log --oneline -10to see the latest commits and infer phase progress from their prefixes (test:= red,feat:= green,refactor:,docs: add spec= spec phase, etc.). - Ground truth — run the project test command; the pass/fail state is a reliable phase indicator.
- Artifacts — check
specs/for written specification documents and read the most recently modified files to see what was last changed. - Resume, don't restart — continue from the last completed phase. Never restart a pipeline from scratch after a compaction.
- Confirm when unsure — tell the user: "Context was compacted. Last commit was X. Shall I continue with [phase]?"
Summarizing Tool and MCP Output
Tool results and MCP responses (Context7 documentation, search results, API lookups) are the fastest way to fill a context window. Rules:
- Extract the relevant findings from any tool output longer than ~30 lines; never leave a full dump in the transcript.
- After an MCP documentation lookup, keep only the signatures, parameters, and constraints you need — drop prose, examples you won't use, and unrelated sections.
- Record what you learned in 3-5 lines in your working notes, then reference the note instead of re-querying.
- When delegating, pass file paths and one-line conclusions, not the raw output you collected.
Working-Notes Protocol for Long Sessions
- Keep a running checklist of pipeline phases; tick them off as they finish.
- After each phase or sub-agent result, write a 3-5 line summary and drop the detail from active use.
- Write large intermediate products (specs, plans, analyses) to disk and reference them by path — the file system is your external memory.
- Prefer re-reading a small file over keeping its content in context "just in case".
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.
- 9d ago First seen · 53 lines · 40 tokens per session scan A 3fdc41987b60
context-discipline is a skill published in the GitHub repository PedroMosquera/squadai (8 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 587 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-31.
Other skills, from other repositories
ai-memory-coding-conventions
Project coding conventions extracted from chat history. Load when writing new code, naming things, designing APIs, or reviewing PRs. Topics: Cursor pagination is mandatory for all paged GraphQL endpoints.
ai-memory-decision-log
Technical decisions made for this project, with reasoning and rejected alternatives. Load when proposing architectural changes, evaluating alternatives, or asked why a choice was made. Topics: Adopt OAuth 2.0 authorization code flow with PKCE for the customer portal SPA.
ai-memory-system-architecture
System architecture facts: components, data flow, integration boundaries. Load when implementing cross-component features, debugging integration issues, or onboarding to the codebase. Topics: Event sourcing for the billing audit log.
shared-agents-knowledge
Sync and use the shared-agents repo (team skills, rules + learnings). Use at session start, when loading team knowledge, searching learnings, or when the user mentions shared-agents, shared learnings, or team knowledge.
init-workspace-documentation
Skill "init-workspace-documentation" from griddynamics/rosetta, covering agent memory.md, agent memory, preventive rules, what worked and what failed.
learn
Diagnose and fix agent behavioral surfaces when the user corrects a mistake — connects to Claude native memory.