_context-loader

A context-loading command reads project-specific or shared memory files for an AI coding assistant. It uses the current project path to decide which files to load.

In plain words
What is it for?
It helps load project memory, coding conventions, decisions, and known problems from the appropriate location.
Why use it?
It avoids loading unrelated files and helps the assistant use the right project’s stored decisions, conventions, and notes.

Command

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.

agentmods
npx agentmods add commands/igoroliveirg/prometheus/_context-loader
Clone the repo
git clone --depth 1 https://github.com/igoroliveirg/prometheus
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,285 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.02285
Opus 5 $0.00000 $0.01143
Sonnet 5 $0.00000 $0.00457
Haiku 4.5 $0.00000 $0.00229

Measured yesterday against content hash 0aa24aea4f85, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

_context-loader 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 yesterday.

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.

src/commands/_context-loader.md · 184 lines

How it starts

The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Activation Protocol

Load only what you need. Every file read costs tokens -- earn each one.


Multi-Project Path Resolution

Prometheus supports multiple projects. Memory and profiles are project-specific.

How to resolve paths:

  1. Detect the current working directory from the conversation context
  2. Map it to a project path: ~/.claude/projects/-{cwd-with-dashes}/
    • Example: /Users/user/Desktop/pitaia~/.claude/projects/-Users-user-Desktop-pitaia/
    • Example: /Users/user/Desktop/Base Viral~/.claude/projects/-Users-user-Desktop-Base-Viral/
  3. Load files from the project-specific path first, then fall back to global ~/.claude/

Path resolution table:

Reference in commands Resolves to (project-specific) Fallback (global)
memory/stack.md ~/.claude/projects/{project}/memory/stack.md ~/.claude/memory/stack.md
memory/decisions.md ~/.claude/projects/{project}/memory/decisions.md ~/.claude/memory/decisions.md
memory/conventions.md ~/.claude/projects/{project}/memory/conventions.md ~/.claude/memory/conventions.md
memory/gotchas.md ~/.claude/projects/{project}/memory/gotchas.md ~/.claude/memory/gotchas.md
profile.md ~/.claude/projects/{project}/profile.md ~/.claude/profiles/active.md
state/current.md ~/.claude/projects/{project}/state/current.md ~/.claude/state/current.md
state/history/ ~/.claude/projects/{project}/state/history/ ~/.claude/state/history/

Always global (never project-specific):

  • ~/.claude/global-memory/* — Cross-project knowledge
  • ~/.claude/commands/* — Agent commands
  • ~/.claude/hooks/* — Enforcement hooks
  • ~/.claude/playbooks/* — Workflow playbooks
  • ~/.claude/inbox/* — Agent inboxes

Always (every activation)

  1. Check inbox: ~/.claude/inbox/[your-agent-name].md -- skip if empty or missing Inbox Read Validation: If inbox has messages with Status: unread, you MUST read and acknowledge them before proceeding. Unread messages may contain critical handoff context, blockers, or priority changes. Skipping inbox is a pipeline violation.
  2. Check state: project-specific ~/.claude/projects/{project}/state/current.md (fall back to ~/.claude/state/current.md if project-specific doesn't exist) -- resume if an active session exists for you; accept any pending handoff
  3. Greet with status summary -- report inbox messages, active story/state, and readiness
  4. Log activation: Append a row to ~/.claude/logs/audit.md: | {ISO timestamp} | {your-agent-name} | activated | Session start |
  5. Reset tool counter: Write 0 to ~/.claude/state/.tool-count
  6. Update activation metric: In ~/.claude/metrics/dashboard.md, increment your agent's Activations count in the Agent Activity table by 1, and increment the "Agent Activations" value in the Workflow table by 1

Read the full file on GitHub · 184 lines

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. yesterday First seen · 184 lines · 0 tokens per session scan A 0aa24aea4f85

Subscribe to this mod's changes

_context-loader is a command published in the GitHub repository igoroliveirg/prometheus (3 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,285 tokens. 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-31.