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 J-StaR-Films-Studios/VibeCode-Protocol-Suite --skill optimize-agent-contextgit clone --depth 1 https://github.com/J-StaR-Films-Studios/VibeCode-Protocol-SuiteWrote 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/j-star-films-studios/vibecode-protocol-suite/optimize-agent-context)<a href="https://agentmods.dev/skills/j-star-films-studios/vibecode-protocol-suite/optimize-agent-context"><img src="https://agentmods.dev/badge/skills/j-star-films-studios/vibecode-protocol-suite/optimize-agent-context.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 8 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00143 | $0.01105 |
| Opus 5 | $0.00072 | $0.00553 |
| Sonnet 5 | $0.00029 | $0.00221 |
| Haiku 4.5 | $0.00014 | $0.00111 |
Grade A, and why
optimize-agent-context 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 — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optimize Agent Context
Enforce the Band-Aid Philosophy: an agent context file should only contain rules that fix mistakes the agent is actively making. Everything else is bloat that degrades performance and increases cost.
Core Rules (Non-Negotiable)
- NO BLOAT — Never include directory structures, file trees, dependency lists, or package inventories. The agent has tools to discover these.
- NO SUMMARIES — Never include vague app descriptions ("This is a video sharing app"). This distracts the model and triggers hallucinations.
- ONLY FIX KNOWN FAILURES — Every line must correct a specific, observed agent mistake or enforce an architectural constraint the agent cannot guess.
- USE NEGATIVE CONSTRAINTS — When the agent uses the wrong tool/library, explicitly state what NOT to use, then what TO use.
- BE MINIMAL — Target under 20 lines. Bullet points preferred. If a rule can be removed without the agent breaking, remove it.
Why This Matters
Studies show bloated, AI-generated context files:
- Degrade agent performance by ~3%
- Increase token costs by 20%+
- Trigger hallucinations by surfacing legacy code the agent then tries to use ("pink elephants" effect)
Workflow
Mode A: Create New Agent File (Interview)
When the user wants to create a new context file from scratch:
-
Ask these questions one at a time (do not dump all at once):
- "What specific mistakes has the AI agent been making repeatedly?" (e.g., wrong imports, forgetting to format, modifying wrong files)
- "Are there legacy tools/libraries the agent keeps using but shouldn't?" (e.g., "We have Redux but use Zustand for new features")
- "Any build/test/env quirks the agent can't figure out on its own?" (e.g., special env vars, non-standard test commands)
-
Synthesize answers into a ruthlessly minimal bulleted markdown file.
-
Validate the output against the Core Rules above. Strip anything that violates them.
-
Present the file and ask: "Does this capture the mistakes? Anything to add or remove?"
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 · 98 lines · 143 tokens per session scan A 80b1c8c74214
optimize-agent-context is a skill published in the GitHub repository J-StaR-Films-Studios/VibeCode-Protocol-Suite (24 stars, last pushed 3d ago), licensed ISC. It adds 143 tokens to every session and 1,105 once invoked, about $0.0007 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
happiness-skill
A Chinese-language guide to happiness based on reducing unmet wants, focusing on the present, and treating happiness as a trainable skill.
setup-matt-pocock-skills
A setup skill that configures engineering skills for a repository, including its issue tracker, labels, and documentation layout. A repository is the project folder managed by version control.
frontend-design
A design guide for building polished web interfaces such as pages, dashboards, forms, navigation, and reusable UI components. It covers HTML, CSS, JavaScript, and common frontend frameworks.
alterlab-cobrapy
Build and analyze genome-scale constraint-based metabolic models with COBRApy — flux balance analysis (FBA), flux variability analysis (FVA), gene and reaction knockouts, flux sampling, and SBML model I/O. Use when simulating metabolic networks, predicting growth or knockout phenotypes, or running systems-biology and…
alterlab-depmap
Query the Cancer Dependency Map (DepMap) for cancer cell line gene dependency scores (CRISPR Chronos), drug sensitivity data, and gene effect profiles. Use when identifying cancer-specific genetic vulnerabilities, finding synthetic lethal interactions, checking whether a gene is essential in given cell lines, or…
alterlab-syllabus-ai-policy
Drafts course-level generative-AI use policies and syllabus statements: assigns each graded task a permitted/restricted/prohibited tier (modeled on Cornell's prohibit/allow-with-attribution/encourage framework), writes the disclosure clause with a verbatim APA (OpenAI, 2023) or MLA Works Cited citation template for…