Skip to content
Back to skills

Context Injector

ASecurity

Budgeted, progressive-disclosure memory context for every request. Use when deciding what project memory to load — never bulk-load memory files; follow the budget table and retrieve the rest on demand.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 26, 2026
ai-agentsgo

Works with

  • mcp

Security analysis

A100/100

Scanned September 26, 2026

npx -y skills add rbhattarai/se-harness --skill context-injector --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context Injector?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Context Injector
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rbhattarai-context-injector/badge)](https://www.skillsdirectory.com/skills/rbhattarai-context-injector)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: context-injector
description: Budgeted, progressive-disclosure memory context for every request. Use when deciding what project memory to load — never bulk-load memory files; follow the budget table and retrieve the rest on demand.
---

# Context Injector

Doctrine (brainstorm.md A5 #1): **do not feed everything on every request.** Three layers:

1. **Always loaded (cheap index)** — AGENTS.md/CLAUDE.md generated blocks + the one-line-per-entry
   index in `.harness/memory/MEMORY.md`. These tell you *what exists*, not the content.
2. **Budgeted hot set (injected per turn)** — assembled by `scripts/inject-context.sh` on
   UserPromptSubmit, priority order with hard caps (~16K chars total, agentmemory pattern):

   | Priority | Source | Cap |
   |---|---|---|
   | 1 | `.harness/memory/SCRATCHPAD.md` (open items) | 2K |
   | 2 | Active requirement (`.harness/requirements/*.md` with status ≠ done) | 2K |
   | 3 | Today's daily log tail | 3K |
   | 4 | `MEMORY.md` (head + tail if over cap) | 4K |
   | 5 | Yesterday's daily log tail | 3K |

3. **Retrieved on demand (never pre-loaded)** — when the task actually needs it:
   - code structure → query the code-graph MCP tools (impact, callers, search)
   - domain knowledge → read the specific `.harness/memory/wiki/` page the index points to
   - history → grep daily logs / follow `[[wiki-links]]`

## Rules
- If the budget is exhausted, drop from priority 5 upward — never truncate priority 1.
- Cite which memory file a claim came from when it influences a decision.
- If the index references a file that doesn't exist, flag it (stale index) instead of guessing.
- Write-backs (new learnings) go to the daily log at task end — not into the always-loaded index
  unless genuinely long-term (then add a one-line index entry).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.