squadai: Skill for Claude Code

.claude/skills/shared/context-discipline/SKILL.md

context-discipline is a skill for Claude Code from PedroMosquera/squadai. It costs 40 tokens per session (587 once invoked), scanned A, original, MIT.

A set of procedures for recovering an agent's place after its conversation context has been shortened. It uses project instructions, recent commits, tests, specifications, and visible phase markers to rebuild the working context.

In plain words
What is it for?
Use it after context compaction or when a long session becomes difficult to track. It helps identify the last completed phase and whether the project tests and recent changes support continuing.
Why use it?
Long coding sessions can lose earlier details, making an agent repeat work or continue from the wrong stage. These checks help it resume from the project's actual state.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

This is PedroMosquera/squadai's own configuration. It tells Claude Code how to work on squadai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything squadai configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/PedroMosquera/squadai/main/.claude/skills/shared/context-discipline/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/PedroMosquera/squadai

Made for: Claude Code.

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-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedromosquera/squadai/context-discipline/github.svg)](https://agentmods.dev/skills/pedromosquera/squadai/context-discipline)
Your own site
<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.

agentmods 80×15 button for context-discipline

Your own site · 80×15
<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>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 587 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.00040 $0.00587
Opus 5 $0.00020 $0.00293
Sonnet 5 $0.00008 $0.00117
Haiku 4.5 $0.00004 $0.00059

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

Security

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.

.claude/skills/shared/context-discipline/SKILL.md · 53 lines

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:

  1. Session state — read AGENTS.md or CLAUDE.md for recorded decisions; in solo sessions, look for === PHASE: <name> === markers in the visible context to find your position.
  2. Recent history — run git log --oneline -10 to see the latest commits and infer phase progress from their prefixes (test: = red, feat: = green, refactor:, docs: add spec = spec phase, etc.).
  3. Ground truth — run the project test command; the pass/fail state is a reliable phase indicator.
  4. Artifacts — check specs/ for written specification documents and read the most recently modified files to see what was last changed.
  5. Resume, don't restart — continue from the last completed phase. Never restart a pipeline from scratch after a compaction.
  6. 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".
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. 9d ago First seen · 53 lines · 40 tokens per session scan A 3fdc41987b60

Subscribe to this mod's changes

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.

Related

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.

hyxnj666-creator/ai-memory · 46 tokens

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.

hyxnj666-creator/ai-memory · 56 tokens

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.

hyxnj666-creator/ai-memory · 46 tokens

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.

netgrade-digital/shared-agents · 54 tokens

init-workspace-documentation

Skill "init-workspace-documentation" from griddynamics/rosetta, covering agent memory.md, agent memory, preventive rules, what worked and what failed.

griddynamics/rosetta · 10 tokens

learn

Diagnose and fix agent behavioral surfaces when the user corrects a mistake — connects to Claude native memory.

automagik-dev/genie · 23 tokens