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 vignesh2027/AI-AGENT-SKILLS --skill context-engineeringgit clone --depth 1 https://github.com/vignesh2027/AI-AGENT-SKILLSWrote 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/vignesh2027/ai-agent-skills/context-engineering)<a href="https://agentmods.dev/skills/vignesh2027/ai-agent-skills/context-engineering"><img src="https://agentmods.dev/badge/skills/vignesh2027/ai-agent-skills/context-engineering.svg" alt="Measured on agentmods" 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.00019 | $0.00506 |
| Opus 5 | $0.00010 | $0.00253 |
| Sonnet 5 | $0.00004 | $0.00101 |
| Haiku 4.5 | $0.00002 | $0.00051 |
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 8d 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 — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
Context is finite. What you put in the context window determines what the agent can reason about. Too much noise → the relevant signal is diluted. Too little context → the agent makes uninformed decisions. This skill manages context deliberately.
When to Use
- When an agent produces low-quality outputs despite correct instructions
- When designing a system prompt for a production agent
- When a long conversation is causing quality degradation
- When context costs are higher than expected
Process
Step 1: Define the context budget
For your model and use case: how many tokens is your budget? Reserve: 20% for the system prompt, 20% for the output, 60% for the dynamic context (documents, history, tools).
Step 2: Prioritize context by relevance
Include in this order:
- Task instructions (always)
- The most relevant documents or code (retrieved, not full codebase)
- Relevant conversation history (not all history)
- Supporting context (schemas, type definitions)
Cut: long documents that contain 1 relevant paragraph, full file contents when only a function is needed, conversation history beyond the last N relevant turns.
Step 3: Structure context for retrieval
Agents pay more attention to the beginning and end of context. Put instructions at the top. Put the most relevant context closest to the task.
Step 4: Use explicit context delimiters
Mark different sections clearly:
<system>Your role and constraints</system>
<documents>Retrieved content</documents>
<task>What to do</task>
This prevents the model from confusing instructions with retrieved data.
Step 5: Compress context aggressively
Summarize long histories. Extract the relevant portions of long documents. Use structured data (JSON, tables) instead of prose where possible.
Step 6: Monitor context quality
Track: output quality vs. context length. If longer context is producing worse results, you have a context quality problem, not a context quantity problem.
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.
- 8d ago First seen · 59 lines · 19 tokens per session scan A a1c887834e70
context-engineering is a skill published in the GitHub repository vignesh2027/AI-AGENT-SKILLS (2 stars, last pushed 10d ago), licensed MIT. It adds 19 tokens to every session and 506 once invoked, about $0.0001 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.
Other skills, from other repositories
knowledge
The owner's knowledge base: a markdown folder that is also a typed graph of people, projects, decisions and terms, via the kb CLI. Use BEFORE answering anything about the owner, who they work with, what a project or term means, or what was decided and why; record durable facts unasked. Not for facts about the code.
session-skill-mining
Use when the user explicitly asks to inspect past Codex or Claude Code sessions, runs, or chats from a specific time range and extract reusable upgrades (skills to codify, memories to pin, or strategy-shaped findings that can be represented as skills or memories). Also invoked by the auto-optimizer scheduler to…
memory
A session-memory tool with three layers: agent notes, requirement memories, and overall project memory. The description does not specify how these memories are stored or managed.
summary
A skill that writes a summary of the current conversation to a daily memory file before work ends.
toknt-optimize
Tokn't token optimization — recall compressed content and view stats.
docstrata
Project Context System — structured project memory for any project via layered docs and codebase index. Use for: documenting projects, writing PRD/roadmap, generating codebase repo-wiki, capturing requirements/decisions, writing dev notes, building doc navigation index, compacting bloated docs, auto-detecting stale…