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 seb1n/awesome-ai-agent-skills --skill context-injectiongit clone --depth 1 https://github.com/seb1n/awesome-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/seb1n/awesome-ai-agent-skills/context-injection)<a href="https://agentmods.dev/skills/seb1n/awesome-ai-agent-skills/context-injection"><img src="https://agentmods.dev/badge/skills/seb1n/awesome-ai-agent-skills/context-injection/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/seb1n/awesome-ai-agent-skills/context-injection"><img src="https://agentmods.dev/badge/skills/seb1n/awesome-ai-agent-skills/context-injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00054 | $0.01977 |
| Opus 5 | $0.00027 | $0.00988 |
| Sonnet 5 | $0.00011 | $0.00395 |
| Haiku 4.5 | $0.00005 | $0.00198 |
Grade A, and why
context-injection 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 11d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- context-injection — 89% identical, 2 lines differ
How it starts
The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Injection
Context injection is the practice of dynamically inserting relevant information — documents, data, examples, or tool outputs — into an AI prompt so the model has the knowledge it needs to produce accurate, grounded responses. Effective injection is about more than pasting text; it requires deliberate placement, formatting, and token budget allocation to maximize the model's ability to use the injected material.
Workflow
-
Identify the Context Need: Analyze the task to determine what types of external information the model requires. A code review needs the source file; a support question needs product documentation; a personalized reply needs the user's profile. Clearly categorize each need as document grounding, few-shot examples, tool output, or metadata.
-
Gather the Context: Retrieve the necessary information from its source — a database, file system, API response, vector store, or prior conversation. Apply any necessary compression or truncation before injection so the material fits within the allocated token budget.
-
Select an Injection Strategy: Choose the appropriate injection method based on the context type and the model's attention patterns:
- System prompt injection — persistent context like role definitions, rules, and user preferences go in the system message.
- Document grounding — retrieved documents or files are inserted in the user message, typically before the question.
- Few-shot examples — input/output pairs demonstrating the desired format are placed between the system prompt and the user query.
- Tool output injection — results from function calls or API invocations are injected as assistant/tool messages in the conversation.
-
Format and Delimit the Context: Wrap injected content in clear delimiters (XML tags, markdown headers, or triple-backtick fences) so the model can distinguish instructions from context from the user's query. Label each section explicitly (e.g.,
<retrieved_document>,<user_profile>,<code_file>).
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.
- 11d ago First seen · 137 lines · 54 tokens per session scan A d7e3746d8a1d
context-injection is a skill published in the GitHub repository seb1n/awesome-ai-agent-skills (179 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 1,977 once invoked, about $0.0003 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-30.
Other skills, from other repositories
cost-aware-llm-pipeline
A planning guide for choosing language models and managing the amount of conversation context used by an AI coding workflow. It groups tasks by complexity and gives rules for avoiding context overflow during long sessions.
prompt-lookup
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
813-regulations-iso-42001
Use when reviewing, designing, or modifying Java enterprise systems that use GenAI, LLMs, AI-assisted coding, RAG, AI agents, generated code, generated dependencies, prompt workflows, external model providers, or AI-enabled business logic and need ISO/IEC 42001 AI management system-aware engineering guidance. Part of…
happyhorse-prompt-studio
Interactive prompt studio for HappyHorse 1.0 video generation. Guides users through scenario discovery with vivid examples, then assembles production-ready prompts in JP/CN/EN. Use when someone wants to create AI video content with HappyHorse but doesn't know where to start, or when they have a specific scenario and…
strategy
Run structured brainstorming sessions (divergent/convergent), improve prompts with 7-dimension framework, and apply decision frameworks (RICE, weighted scoring, first principles, pre-mortem).
analyze-video
Analyze a reference video and reverse-engineer its style into a reusable Seedance 2.0 prompting template for the Novoads API. The output is a new formula file — like seedance-2-ugc.md — that captures the video's structure, pacing, camera work, edit style and tone so it can be recreated with any product, any person, in…