Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ApexIQ/skillsmith --skill context_engineeringgit clone --depth 1 https://github.com/ApexIQ/skillsmithWrote 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/apexiq/skillsmith/context_engineering)<a href="https://agentmods.dev/skills/apexiq/skillsmith/context_engineering"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/context_engineering/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/apexiq/skillsmith/context_engineering"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/context_engineering.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.00025 | $0.00811 |
| Opus 5.5 | $0.00010 | $0.00324 |
| Sonnet 5.5 | $0.00005 | $0.00162 |
| Haiku 4.5 | $0.00003 | $0.00081 |
Grade A, and why
context-engineering 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🎯 Context Engineering
Philosophy: The right context at the right time produces the best results.
The Problem
AI models have limited context windows:
- Too little context → Hallucinations, wrong assumptions
- Too much context → Quality degradation, high costs
- Wrong context → Irrelevant or incorrect output
Context Window Management
Know Your Limits
| Model | Approx Context | Practical Limit |
|---|---|---|
| GPT-4 | 128k tokens | ~80k for best quality |
| Claude 3.5 | 200k tokens | ~150k for best quality |
| Gemini 2.0 | 1M+ tokens | ~500k for best quality |
Rule of thumb: Stay at 50-70% of max for optimal performance.
Context Priority Stack
Order context by importance:
1. CRITICAL: Current task instructions
2. HIGH: Directly relevant code/files
3. MEDIUM: Related patterns/examples
4. LOW: General project context
5. OPTIONAL: Historical context
Strategies
1. Progressive Disclosure
Start minimal, add context as needed:
Step 1: Give task + key file
Step 2: Agent asks for more context
Step 3: Provide specific additional files
Step 4: Agent completes task
2. Context Windowing
Show only relevant sections:
# ❌ Don't: Load entire 5000-line file
file_content = read_file("huge_file.py")
# ✅ Do: Load only relevant section
file_content = read_file("huge_file.py", start=100, end=200)
3. Semantic Chunking
Include related code, not arbitrary ranges:
Good chunk: Entire function + its imports
Bad chunk: Lines 100-200 (arbitrary)
4. Context Prefetching
Anticipate needs based on task type:
| Task Type | Prefetch |
|---|---|
| Bug fix | Error logs, related tests, recent changes |
| New feature | Similar features, API patterns, tests |
| Refactor | Callers, tests, type definitions |
Context Organization
Structure context for clarity:
<current_file>
[The file being edited]
</current_file>
<related_files>
[Files that import/use current_file]
</related_files>
<tests>
[Test files for current functionality]
</tests>
<documentation>
[API docs, READMEs relevant to task]
</documentation>
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.
- 1mo ago First seen · 142 lines · 25 tokens per session scan A 8a36bc2a6498
context-engineering is a skill published in the GitHub repository ApexIQ/skillsmith (5 stars, last pushed 6mo ago), licensed MIT. It adds 25 tokens to every session and 811 once invoked, about $0.0001 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
auto-context
An automatic context detector that identifies the files, functions, and other code context an AI needs for a task.
context-budget
Use when you need to check the current session's context usage and get recommendations for compaction or continuation.
context-engineering
Use this skill to systematically manage what information goes into an LLM context window — selecting, compressing, and prioritizing content to maximize response quality within token budget constraints. Activates when building or optimizing LLM applications, RAG systems, or agent workflows that face context window…
cortivex-context-compression
Compress agent outputs for efficient context handoff between pipeline nodes while preserving actionable information.
context-map
Generates a compressed project context map to avoid expensive Read/Grep calls. Use at session start or before implementing features in an unfamiliar codebase.
init
Initialize structured context for this project. Scaffolds .scs/ with all 11 concept bundles, scans the project, and recommends where to start.