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/.agents/skills/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.5 | $0.00016 | $0.00235 |
| Sonnet 5.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 17d 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.
- 17d ago Changed 550f418f44ed
- 1mo ago First seen · 53 lines · 40 tokens per session scan A 3fdc41987b60
context-discipline is a skill published in the GitHub repository PedroMosquera/squadai (10 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 587 once invoked, about $0.0002 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-08-31.
Other skills, from other repositories
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.
agent-memory
Recall earlier conversations from the user's other AI tools (Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, Antigravity, Devin), and search the files of the projects they indexed. Use before asking about or assuming a project's history, when the user refers to a prior decision, discussion or fix ("as we…
coordinate-agents
Coordinate a task across multiple AI coding agents (Claude Code, Codex, Gemini, and others). Use when the user asks to delegate work to another agent, get a second opinion or review from a different agent, run agents in parallel on one task, or split a task between agents. The invoking agent becomes the coordinator…
loredex-curate
Write a Start-Here brief for a project or a recent session's findings, and flag stale/duplicate/orphaned notes. Use when the user says "curate my dex/research", "where do I start", "make sense of this project", or just finished a session that produced several markdown files and wants a handoff.
loredex-mcp
Set up or explain the loredex MCP server — live dex access (search, read, handoffs, product state, safe writes) for any MCP-compatible agent. Use when the user wants agents to query the dex mid-task, asks to "connect the dex to Cursor/Codex/an agent", or asks what the loredex MCP tools do.
loredex-init
Set up loredex for the current project — creates/registers the dex and writes AGENTS.md/CLAUDE.md/.cursor rule conventions. Use when the user says "set up loredex", "init loredex", or wants to start tracking this project's research in a dex.