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 vasilyu1983/AI-Agents-public --skill ai-context-layergit clone --depth 1 https://github.com/vasilyu1983/AI-Agents-publicWrote 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/vasilyu1983/ai-agents-public/ai-context-layer)<a href="https://agentmods.dev/skills/vasilyu1983/ai-agents-public/ai-context-layer"><img src="https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/ai-context-layer/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/vasilyu1983/ai-agents-public/ai-context-layer"><img src="https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/ai-context-layer.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.00042 | $0.03123 |
| Opus 5.5 | $0.00017 | $0.01249 |
| Sonnet 5.5 | $0.00008 | $0.00625 |
| Haiku 4.5 | $0.00004 | $0.00312 |
Grade A, and why
ai-context-layer 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 — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
App Context Layer
Design and review the application layer that selects, assembles, grounds, and learns from context for a product surface. Keep operational truth in tools, APIs, SQL, or a system of record; use derived memory only for durable facts or preferences with provenance, retention, and correction paths. This skill covers architecture and runtime contracts, not repo instruction files or prompt wording.
Quick Reference
| Question | Default | Load when needed |
|---|---|---|
| Where should operational truth live? | Tools, APIs, SQL, or system-of-record services | context-layer-detail |
| Is the problem retrieval or context assembly? | Use RAG for corpus retrieval; use this skill when personalization, relationships, action context, or surface bundles change the answer | ai-rag, context assembly |
| Is graph worth it? | Only when relationship traversal changes the answer | graph and relationship layer |
| Which architecture pattern fits? | Select the smallest pattern that meets tenancy, freshness, evidence, and budget needs | patterns catalog, reference architectures |
| Relational, graph, or vector storage? | Use the owning database design matrix alongside the context decision | storage paradigm selection |
| Is the scenario known (personal assistant, support/CRM, coding agent, multi-agent, regulated KB, code hub, incident, procedural, voice, analytics, on-device)? | Load its playbook first: R1–R7 defaults, upgrade trigger, acceptance tests | memory-scenario-playbooks |
| Building or auditing a KB or memory system end to end? | Classify the workload first, then audit the seven responsibilities (admission to materialisation) one by one; when precision and coverage both matter, link current state to its evidence (P22) | memory-responsibilities-audit |
| Is a memory/retrieval service safe to adopt? | Keep app-owned truth, provenance, isolation, retention, and rebuild paths; compare engines by representation × output and the responsibilities they implement natively | managed-memory boundaries, security threat model, vendor landscape |
What ships with it
60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 372 B
- assets/contracts/context-bundle-template.md 640 B
- assets/contracts/entity-memory-contract.md 1.1 KB
- assets/contracts/feedback-outcome-contract.md 2.3 KB
- assets/design/context-layer-review-template.md 369 B
- assets/design/context-layer-system-design.md 589 B
- assets/eval/context-layer-scorecard.md 4.9 KB
- builds/cookbooks/cognee.md 5.0 KB
- builds/cookbooks/git_repo_ingest.md 10 KB
- builds/cookbooks/jit_context_loading.md 928 B
- builds/cookbooks/langgraph_store.md 4.6 KB
- builds/cookbooks/latency_cost.md 6.9 KB
- builds/cookbooks/letta.md 4.9 KB
- builds/cookbooks/mem0.md 5.0 KB
- builds/cookbooks/mongodb_atlas.md 8.3 KB
- builds/cookbooks/multimodal_assembly.md 863 B
- builds/cookbooks/openai_retrieval_managed.md 1.0 KB
- builds/cookbooks/ops_runbook.md 9.3 KB
- builds/cookbooks/pgvector.md 4.9 KB
- builds/cookbooks/README.md 3.1 KB
- builds/cookbooks/supermemory.md 4.0 KB
- builds/cookbooks/traps.md 8.7 KB
- builds/cookbooks/vertex_memory_bank.md 1.1 KB
- builds/demo/end_to_end.py 6.3 KB runs code
- builds/demo/jit_multimodal.py 4.4 KB runs code
- builds/demo/README.md 1.6 KB
- builds/evals/fakes.py 6.9 KB runs code
- builds/evals/harness.py 705 B runs code
- builds/evals/metrics/__init__.py 675 B runs code
- builds/evals/metrics/rot.py 4.0 KB runs code
- builds/evals/metrics/variance.py 2.8 KB runs code
- builds/evals/README.md 5.4 KB
- builds/evals/reports/__init__.py 103 B runs code
- builds/evals/reports/rollup.py 1.9 KB runs code
- builds/evals/suites/cognee/__init__.py 0 B runs code
- builds/evals/suites/cognee/conftest.py 1.3 KB runs code
- builds/evals/suites/cognee/test_cognee.py 976 B runs code
- builds/evals/suites/context_rot/__init__.py 0 B runs code
- builds/evals/suites/context_rot/conftest.py 1.2 KB runs code
- builds/evals/suites/context_rot/dataset.jsonl 3.2 KB
- builds/evals/suites/context_rot/README.md 2.7 KB
- builds/evals/suites/context_rot/test_context_rot.py 5.4 KB runs code
- builds/evals/suites/jit_loading/__init__.py 1 B runs code
- builds/evals/suites/jit_loading/test_jit_loading.py 3.4 KB runs code
- builds/evals/suites/langgraph_store/__init__.py 0 B runs code
- builds/evals/suites/langgraph_store/conftest.py 1.1 KB runs code
- builds/evals/suites/langgraph_store/test_langgraph_store.py 2.2 KB runs code
- builds/evals/suites/letta/__init__.py 0 B runs code
- builds/evals/suites/letta/conftest.py 1.5 KB runs code
- builds/evals/suites/letta/test_letta.py 1.1 KB runs code
- builds/evals/suites/managed_boundary/__init__.py 1 B runs code
- builds/evals/suites/managed_boundary/test_managed_boundary.py 3.2 KB runs code
- builds/evals/suites/mem0/__init__.py 0 B runs code
- builds/evals/suites/mem0/conftest.py 1.3 KB runs code
- builds/evals/suites/mem0/test_mem0.py 1.2 KB runs code
- builds/evals/suites/mode_collapse/__init__.py 0 B runs code
- builds/evals/suites/mode_collapse/conftest.py 1.3 KB runs code
- builds/evals/suites/mode_collapse/dataset.jsonl 1.3 KB
- builds/evals/suites/mode_collapse/README.md 2.8 KB
- builds/evals/suites/mode_collapse/test_mode_collapse.py 2.8 KB runs code
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 Changed be6e3cda2e8c
- 1mo ago First seen · 98 lines · 42 tokens per session scan A ca650e98c399
ai-context-layer is a skill published in the GitHub repository vasilyu1983/AI-Agents-public (101 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 3,123 once invoked, about $0.0002 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-10-06.
ai-context-layer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ai-context-layervasilyu1983/AI-Agents-public | Skill | 101 | 1mo ago | MIT | A | 42 | Claude Code, Codex |
| AgentDB Memory Patternsshyftlabs/continuum | Skill | 86 | yesterday | Apache-2.0 | A | 45 | Claude Code |
| V3 Memory Unificationshyftlabs/continuum | Skill | 86 | yesterday | Apache-2.0 | A | 51 | Claude Code |
| context-managementVersoXBT/claude-initial-setup | Skill | 4 | 6mo ago | MIT | A | 66 | Claude Code |
| agent-v3-memory-specialistruvnet/ruflo | Skill | 83k | yesterday | MIT | A | 25 | Claude Code |
| agents-langchaindavila7/claude-code-templates | Skill | 35k | today | MIT | A | 80 | Claude Code, Codex |
| mem0-integrationa5c-ai/babysitter | Skill | 1.9k | 1mo ago | MIT | A | 27 | Claude Code |