/everything-copilot-cli:context-engineeringfrom everything-copilot-cli
Structures context for AI agents to minimize noise and maximize signal. Use when delegating complex tasks, agent quality degrades with long context, or designing multi-agent pipelines.
Ships in everything-copilot-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Difference from
context-prime(Copilot-specific):
context-prime: loads live project context at session startcontext-engineering: structures the best possible information for a specific task
Classify the information you plan to give the agent:
| Information type | Include? | Why |
|---|---|---|
| Directly relevant code files | ✅ Yes | The agent must edit or reason about them |
| Interface/type definitions | ✅ Yes | Essential for understanding contracts |
| Unrelated files | ❌ No | Waste tokens and reduce focus |
| Entire README | ❌ No (summarize instead) | Low information density for the size |
| Information the agent already has | ❌ No | Duplicate token cost |
Do not provide everything at once. Reveal only what each phase needs:
Phase 1: Task definition + interface contract
Phase 2: Implementation starts -> add relevant files
Phase 3: Testing -> add test patterns and references
Use this shape when instructing an agent:
## Task
[one clear objective]
## Given (what is already known)
- [file path]: [role]
- [interface contract]
## Constraints (what must not happen)
- [prohibited action]
- [files that must not be changed]
## Done When
- [ ] [specific, testable criterion]
Use context size intentionally. For exact model choice, see multi-model-strategy:
| Task complexity | Context size | Example |
|---|---|---|
| Short task (fast response first) | 2-3 files, clear goal | small bug fix, type addition |
| Medium task (balanced) | 5-10 files, interface contract | new API endpoint, component addition |
| Long task (deep reasoning first) | 10-20 files, module-level context | architecture refactor, complex bug |
If the agent output is off-target:
| Rationalization | Reality |
|---|---|
| "More context is always better" | Irrelevant information distracts the agent. Signal-to-noise ratio matters more than volume. |
| "I'll just give the whole codebase" | That wastes tokens and often lowers agent quality. Include only the files that matter. |
| "Natural language is enough; the agent will figure it out" | Without explicit completion criteria, the agent does not know where to stop. |
"Look through the project, find a bug, and fix it."
## Task
Fix the JWT expiry-validation bug in `src/auth/token.ts`.
## Given
- `src/auth/token.ts`: target file to change
- `src/auth/token.test.ts`: existing tests
- Bug: the `exp` claim is a Unix timestamp, but the code compares it as milliseconds
## Constraints
- Do not modify files outside `src/auth/`
- Do not change existing function signatures
## Done When
- [ ] All existing tests pass
- [ ] The `exp` comparison uses seconds
- [ ] New edge-case tests cover just-before and just-after expiry
spec-driven-development: a good spec becomes a reusable context templatemulti-model-strategy to pick a model that matches task complexityrendergit renders an entire Git repository into a browser-based HTML view with an LLM-friendly text export. Useful when you need the AI to understand the whole codebase at once (e.g., cross-cutting refactors, architecture analysis).
# Install (Python required)
pip install git+https://github.com/karpathy/rendergit
# Open browser view of the entire repo
rendergit .
# In the browser, switch to "LLM View" to copy the CXML-formatted codebase text.
# Paste into your session context or save to a file to attach as context.
When to use rendergit:
When NOT to use:
LLMs recompute the KV-cache for every token in context. For repeated agent invocations on the same context (e.g., analyzing multiple files with the same system prompt), cache-aware context structuring reduces cost significantly.
Principle: Place stable content (system prompt, shared context) before variable content (the specific task or file). This enables KV-cache reuse.
✅ Cache-friendly structure (stable content first):
[System prompt + project rules] ← cached across requests
[Shared context: types, interfaces] ← cached if unchanged
[Variable: specific file to analyze] ← changes per request
❌ Cache-unfriendly structure (variable content first):
[Variable: today's date, run ID] ← busts cache on every call
[System prompt]
[Context]
Practical application in agent instructions:
## Context (stable — appears in every call)
Project: everything-copilot-cli
Rules: follow existing SKILL.md conventions
Output format: Markdown with frontmatter
## Task (variable — changes per call)
Analyze: skills/development/tdd-workflow/SKILL.md
Find: missing edge cases in the Verification checklist
Token budget estimation:
| Context type | Typical size | Cache reuse potential |
|---|---|---|
| System prompt | 500-2000 tokens | High (same across session) |
| Project conventions | 1000-5000 tokens | High |
| Specific file to analyze | 500-3000 tokens | Low (changes per task) |
| Task instruction | 100-500 tokens | Low |
For multi-model pipelines with the same shared context, pass context by reference
(file path + the built-in view tool) rather than inline copy-pasting.
When work spans multiple agent turns or session boundaries, preserve only the durable state the next agent actually needs. Treat the handoff as a compact briefing, not a full transcript dump.
Pattern:
sql, task notes,
or a checked-in doc when appropriate)When to use:
| Scenario | Use latent briefing? |
|---|---|
| Parallel agents analyze different subsystems, then a synthesizer combines the results | ✅ Yes |
| A later session resumes a partially completed task | ✅ Yes |
| One agent keeps iterating inside the same short-lived context window | ❌ No — keep the live context focused instead |
Briefing shape (minimal):
Task: [current objective]
Done so far:
- [finding]
- [decision]
Open questions:
- [question]
Next constraints:
- [what must not change]
The same rules apply when a long session is compacted (/compact, or automatic compaction) and
the summary replaces the transcript. A summary that keeps the topic but loses the user's terms lets
the next turn act on permission it was never given. Make sure a briefing or compaction summary keeps:
A summary is a record, not a new grant. If the summary does not show that an action was approved, ask again instead of inferring approval from it.
If you write the summary yourself (a handoff note, or compaction in your own agent harness), two more rules keep it honest:
data: URIs, binary dumps in tool errors) before
storing or summarizing; keep a short placeholder such as [base64, 48 KB, omitted] so the reader
knows something was thereFor Copilot CLI specifically, pair this with
cross-session-memory when
the handoff must survive across sessions rather than just across turns.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub drvoss/everything-copilot-cli --plugin everything-copilot-cli115 skills in this plugin
/actions-debuggingUse when a GitHub Actions workflow fails — diagnose the run log, identify the root cause, and apply a targeted fix/add-to-changelogUse when you've shipped a feature, fix, or breaking change and need to update CHANGELOG.md — follows Keep a Changelog format and syncs version numbers across package manifests./agent-governanceUse when designing or reviewing an AI agent system that needs policy-based access controls, intent classification, tool-level rate limiting, trust scoring for multi-agent workflows, or append-only audit trails.
Other plugins' skills for the same job