psychology-agent: Command for Claude Code

.claude/commands/capacity.md

capacity is a command for Claude Code from safety-quotient-lab/psychology-agent. It costs 0 tokens per session (1,390 once invoked), scanned C, original, Apache-2.0.

A command for checking how much room remains in an agent's memory and instruction files. It measures limits such as line counts and reports when content is approaching or exceeding them.

In plain words
What is it for?
Use it at the start of a session, before a new phase of work, or whenever the agent feels overloaded to decide whether to archive or move content.
Why use it?
It helps detect crowded context before important instructions are truncated or new information is added in the wrong place.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md.

This is safety-quotient-lab/psychology-agent's own configuration. It tells Claude Code how to work on psychology-agent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything psychology-agent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to safety-quotient-lab/psychology-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/safety-quotient-lab/psychology-agent/main/.claude/commands/capacity.md
Clone the repo
git clone --depth 1 https://github.com/safety-quotient-lab/psychology-agent

Made for: Claude Code.

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 capacity

README.md
[![agentmods](https://agentmods.dev/badge/commands/safety-quotient-lab/psychology-agent/capacity/github.svg)](https://agentmods.dev/commands/safety-quotient-lab/psychology-agent/capacity)
Your own site
<a href="https://agentmods.dev/commands/safety-quotient-lab/psychology-agent/capacity"><img src="https://agentmods.dev/badge/commands/safety-quotient-lab/psychology-agent/capacity/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 capacity

Your own site · 80×15
<a href="https://agentmods.dev/commands/safety-quotient-lab/psychology-agent/capacity"><img src="https://agentmods.dev/badge/commands/safety-quotient-lab/psychology-agent/capacity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 1,390 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00000 $0.01390
Opus 5 $0.00000 $0.00695
Sonnet 5 $0.00000 $0.00278
Haiku 4.5 $0.00000 $0.00139

Measured 11d ago against content hash 76d05ea5ad35, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade C, and why

capacity scanned grade C with 2 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 11d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

python3 -c "import json; d=json.load(open('${PROJECT_ROOT}/.claude/settings.json')); print('\n'.join(d.get('hooks',{}).keys()))"

Enumerates other installed skillsmediumAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

ls "${PROJECT_ROOT}/.claude/skills/"
.claude/commands/capacity.md · 179 lines

How it starts

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

/capacity — Cognitive Architecture Capacity Assessment

Assess remaining capacity across every constrained dimension of the cognitive architecture. Run at session start, when approaching a new phase of work, or when the system feels crowded.


Dimensions to Assess

1. MEMORY.md (hard constraint)

PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
_HASH="$(echo "$PROJECT_ROOT" | tr '/' '-')"
wc -l "$HOME/.claude/projects/${_HASH}/memory/MEMORY.md"
Threshold Status Action
< 185 Healthy No action needed
185–199 Pressure Move stable content to CLAUDE.md before adding
200 At limit Mandatory archival before any new content
> 200 OVERFLOWING System is silently truncating — fix immediately

Report: N / 200 lines (N remaining before pressure / hard limit)

2. CLAUDE.md (advisory constraint)

PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
wc -l "${PROJECT_ROOT}/CLAUDE.md"

Advisory limit ~200 lines. Holds stable conventions — grows slowly. Report: N lines used (~M available before advisory limit)

3. cognitive-triggers.md (practical constraint)

PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
wc -l "${PROJECT_ROOT}/docs/cognitive-triggers.md"

Loaded in full at T1. Practical ceiling ~900–1000 lines before context loading becomes a meaningful tax. Above 800: flag for architectural review (consider splitting into core + extended). Report: N lines (~M before practical ceiling)

4. Trigger Coverage

List current triggers T1–TN and identify gaps:

T1  — Session start
T2  — Before any response
T3  — Before any recommendation
T4  — Before writing to disk
T5  — Gap check (phase boundaries)
T6  — After user pushback
T7  — After user approval
T8  — After task completion
T9  — Memory hygiene
T10 — Lesson surfaces
T11 — Cogarch self-audit
T12 — Positive pattern recognition
T13 — External content entering context

Read the full file on GitHub · 179 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. 11d ago First seen · 179 lines · 0 tokens per session scan C 76d05ea5ad35

Subscribe to this mod's changes

capacity is a command published in the GitHub repository safety-quotient-lab/psychology-agent (20 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,390 tokens. A static security scan graded it C with 2 findings (reads agent configuration directories, enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.