ai-context-layer

ai-context-layer is a skill for Claude Code, Codex from vasilyu1983/AI-Agents-public. It costs 42 tokens per session (3,123 once invoked), scanned A, original, MIT.

A design guide for application context and long-term user memory. It explains how to select, assemble, ground, store, and correct durable facts or preferences while keeping operational truth in tools, APIs, or databases.

In plain words
What is it for?
It helps design user memory, support knowledge bases, context assembly, tenant isolation, relationship-aware context, and choices between relational, graph, or vector storage.
Why use it?
It helps prevent stale or unsupported memories from being treated as the source of truth. It also addresses provenance, retention, correction, personalisation, and separating memory from RAG, which retrieves information from a document collection.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Part of the ai-agents plugin — 144 skills shipped together

Good fit It helps design user memory, support knowledge bases, context assembly, tenant isolation, relationship-aware context, and choices between relational, graph, or vector storage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vasilyu1983/ai-agents-public/ai-context-layer
Install

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.

Any agent
npx skills add vasilyu1983/AI-Agents-public --skill ai-context-layer
Clone the repo
git clone --depth 1 https://github.com/vasilyu1983/AI-Agents-public

Made for: Claude Code, Codex.

Or install ai-agents, the plugin that ships this one along with the rest of its 144 skills.

Wrote 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.

agentmods badge for ai-context-layer

README.md
[![agentmods](https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/ai-context-layer/github.svg)](https://agentmods.dev/skills/vasilyu1983/ai-agents-public/ai-context-layer)
Your own site
<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.

agentmods 80×15 button for ai-context-layer

Your own site · 80×15
<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>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash be6e3cda2e8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 6d ago.

The scan reads SKILL.md. This mod also ships 31 executable files (builds/demo/end_to_end.py, builds/demo/jit_multimodal.py, builds/evals/fakes.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/universal/ai-context-layer/SKILL.md · 98 lines

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

Read the full file on GitHub · 98 lines

Files

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.

Changes

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.

  1. 6d ago Changed be6e3cda2e8c
  2. 13d ago First seen · 98 lines · 42 tokens per session scan A ca650e98c399

Subscribe to this mod's changes

ai-context-layer is a skill published in the GitHub repository vasilyu1983/AI-Agents-public (101 stars, last pushed 3d 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.

Related

Other skills, from other repositories