context-engineering is agent-read markdown (skill) from komluk/scaffolding: Optimize Claude Code context-window usage for accuracy and cost. TRIGGER when: hitting context limits, structuring prompts for an agent, or trimming what gets injected into a task. SKIP: persisting knowledge across sessions (use agent-memory); semantic recall tuning (use semantic-memory-mcp)..
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# Context Engineering Skill
Optimizes Claude Code context for better performance and accuracy.
Tracked files in repo: !`git ls-files 2>/dev/null | wc -l || true`
## Auto-Invoke Triggers
- Every 50 messages in conversation
- After major refactoring
- When context feels stale
- Task switching
- User requests `/context` command
## Context Principles
### Active Curation
- Keep only relevant information
- Remove completed task details
- Archive outdated patterns
- Focus on current work
### Signal-to-Noise Ratio
| High Signal | Low Signal |
|-------------|------------|
| Current APIs | Old experiments |
| Active patterns | Completed tasks |
| Recent decisions | Historical context |
| Project structure | Implementation details |
### Token Budget
| File | Limit | Purpose |
|------|-------|---------|
| CLAUDE.md | < 2000 tokens | Quick reference |
| Agent docs | < 500 per agent | Role definition |
| Skills | < 300 per skill | Methodology |
## Context Analysis Process
### Step 1: Measure Current State
```markdown
## Context Analysis
### Token Counts
- CLAUDE.md: XXX tokens
- Agent docs: XXX tokens total
- Skills: XXX tokens total
- Total: XXXX tokens
### Staleness Check
…
Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
A 17 of 17 checks passed. Deterministic, no model, same answer every run.
pass: Frontmatter block present
pass: Frontmatter declares a name
pass: Frontmatter declares a description
pass: Size between 200 bytes and 200 KB (4951 bytes)
pass: No zero-width or bidi control characters
pass: No instruction hidden inside an HTML comment
pass: No link to an exfiltration or paste host
pass: No credential-shaped string
pass: No instruction to send local credentials anywhere
pass: No text hidden with inline styles
pass: No prompt-injection phrasing
pass: No curl or wget piped into a shell
pass: No recursive delete of root, home or parent
pass: No instruction to read or print local credentials
pass: No base64 blob over 200 characters
pass: No link to a raw IP address
pass: No script tag
Source
GitHub
komluk/scaffolding · 15 stars · license MIT · pushed 2026-09-21 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_dunuv2qynl4ungbk
GET https://markdownregistry.com/api/v1/resolve?ref=komluk/scaffolding/context-engineering
GET https://markdownregistry.com/api/v1/blob/3d8a34f271ef3e868918993677f222a9dec14d32caea9f4dc861119a053b5f48
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
komluk/scaffolding · skills/github-actions-template/SKILL.md · GitHub Actions CI pipeline templates and workflow YAML patterns. TRIGGER when: creating or editing a CI workflow…
komluk/scaffolding · skills/mcp-tools/SKILL.md · MCP tool decision tree and MCP-first fallback strategy. TRIGGER when: choosing whether to use an MCP tool versus a…
addyosmani/agent-skills · skills/context-engineering/SKILL.md · Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching…
a5c-ai/babysitter · library/methodologies/gsd/skills/context-engineering/SKILL.md · Context window monitoring and budget management. Keeps orchestrator at 15-30% context usage while subagents get full…
shashankswe2020-ux/whoop-mcp · .github/skills/context-engineering/SKILL.md · Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching…
habitat-thinking/ai-literacy-superpowers · ai-literacy-superpowers/skills/context-engineering/SKILL.md · This skill should be used when the user asks about "writing conventions", "codebase context", "HARNESS.md context…
aaaaqwq/agi-super-team · plugins/agi-super-team-codex/skills/context-engineering/SKILL.md · Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching…
nota-america/forgecat-agent-profiles · profiles/addyosmani/agent-skills/for-cursor/.cursor/skills/context-engineering/SKILL.md · Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching…