ai/opencode/tech-team/skills/context-cache-discipline/SKILL.md
Token and prompt-cache discipline — lean always-on rules, stable prefixes, skill indirection, minimal Task payloads, bounded reads.
npx skillsauth add akshay-na/dotfiles context-cache-disciplineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when orchestrating or editing the pack so context stays small and early prompt prefixes stay stable (better cache hit odds on providers; always fewer input tokens).
| Goal | Practice |
|------|----------|
| Stable prefix | Prefer one canonical copy of long text in skills; rules point — avoid churn in alwaysApply: true bodies. |
| Lean always-on | Rarely needed norms → alwaysApply: false + globs, or load skill on demand. |
| Indirection | Agents/rules cite skill path; do not paste full playbooks into rules or agent bodies. |
| Task payloads | Parent Task prompts: goal, constraints, approved_plan_path, phase/shard id, touches[], correlation ids — not full rules or transcripts. |
| Reads | Batch parallel Read where independent; one read per file per turn unless content changed; lookup-first for brain-memory-kb. |
| Subagent traffic | Children: caveman-ultra + single YAML envelope per templates/subagent-response.yml.tmpl; parents: do not paste raw child YAML to user. |
Non-claim: Exact cache eligibility is vendor-defined; token reduction is always a win.
Load ~/ai-brain/org/global/config/memory-demotion.yml (via brain-memory-kb) for query ladder L0–L3 caps and demotion thresholds — do not duplicate full policy text here.
task-orchestrationbrain-memory-kbvp-research.md (single broker); never duplicate broker bullets elsewheresubagent-response-protocol + templates/subagent-response.yml.tmpltoken_stats: agent-observabilityalwaysApply rule bodies into chat to “teach” a subagentTask (anti-dup hook is fail-closed)development
Discovery + naming convention reference for typed dev/SME/QA/devops team members in any workspace folder. Primary consumer: `tech-lead` (org-tier).
devops
Automated task classification, agent selection, and state tracking. Use when routing tasks to agents, selecting pipelines, or managing task state.
testing
Use when designing scalable systems, evaluating consistency models, planning state management, making architectural decisions, or when trade-offs around coupling, failure isolation, and reversibility need explicit reasoning before implementation.
tools
CTO/tech-lead helper — split work into disjoint shard briefs with caps (instance_cap, partition_basis, determinism keys).