context

A command for viewing or editing the agent context used by Self-Care. This context describes the agent's expected behavior so trace checks can distinguish normal actions from possible problems.

In plain words
What is it for?
Use it to display, replace, or reset the .self-care/context.md file.
Why use it?
It gives Self-Care project-specific information that generic checks may not know.

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/not-diamond/self-care/context
Clone the repo
git clone --depth 1 https://github.com/Not-Diamond/self-care
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 985 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.00010 $0.00985
Opus 5 $0.00005 $0.00492
Sonnet 5 $0.00002 $0.00197
Haiku 4.5 $0.00001 $0.00098

Measured 2d ago against content hash 332fedb9bbb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 2d 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.

commands/context.md · 165 lines

How it starts

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

Self-Care Context

View or edit the agent context file that helps Self-Care understand your agent's expected behavior.

Context File Location

Agent context is stored in: .self-care/context.md

This free-form description is provided to all analysis skills to help them understand what's normal vs problematic for your specific agent.

Instructions

Parse Arguments

Extract the subcommand from $ARGUMENTS:

  • If empty or whitespace-only: prompt for new context
  • If show: display current context
  • If reset: reset to default template
  • Otherwise: show usage help

Prompt for New Context (no arguments)

  1. Ensure the config directory exists:

    mkdir -p .self-care/
    
  2. Read current context at .self-care/context.md if it exists.

  3. Display current context (or note if empty/missing):

    Current Agent Context
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    
    <current content, or "No context configured yet.">
    
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    
  4. Ask user for new context using AskUserQuestion:

    • question: "Describe your agent's expected behavior. This helps Self-Care understand what's normal vs problematic. Include details like: what the agent does, expected tool usage patterns, intentional deviations from typical behavior."
    • header: "Agent Context"
    • options:
      • { "label": "Keep current", "description": "Don't change the agent context" }
      • { "label": "Clear context", "description": "Remove the agent context file" }
  5. Handle response:

    • If user selects "Keep current": stop, no changes.
    • If user selects "Clear context": delete the file and confirm:
      rm -f .self-care/context.md
      
      Then display: Agent context cleared.
    • If user provides free text (via "Other"): continue to step 6.
  6. Write the new context using the Write tool:

    # Agent Context
    
    <user's description>
    

Read the full file on GitHub · 165 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. 2d ago First seen · 165 lines · 10 tokens per session scan A 332fedb9bbb9

Subscribe to this mod's changes

context is a command published in the GitHub repository Not-Diamond/self-care (28 stars, last pushed 4mo ago), licensed MIT. It adds 10 tokens to every session and 985 once invoked, about $0.0001 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.