theory-of-mind-agents

theory-of-mind-agents is a skill for Claude Code, Codex from sjarmak/coding-agent-workflows. It costs 93 tokens per session (1,029 once invoked), scanned A, original, MIT.

A design framework for agents that reason about what people know, want, believe, and prefer. It treats this information as an explicit, confidence-rated user model rather than an unstated guess.

In plain words
What is it for?
Use it when designing or reviewing agents that infer intent, adapt to users, plan around uncertainty, or explain why they chose a response.
Why use it?
An agent can give poor or surprising results when it assumes the user's goal, knowledge, or preferences incorrectly. Separating observed facts from inferences makes personalization easier to inspect and correct.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing or reviewing agents that infer intent, adapt to users, plan around uncertainty, or explain why they chose a response.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sjarmak/coding-agent-workflows/theory-of-mind-agents
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 sjarmak/coding-agent-workflows --skill theory-of-mind-agents
Clone the repo
git clone --depth 1 https://github.com/sjarmak/coding-agent-workflows

Made for: Claude Code, Codex.

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 theory-of-mind-agents

README.md
[![agentmods](https://agentmods.dev/badge/skills/sjarmak/coding-agent-workflows/theory-of-mind-agents/github.svg)](https://agentmods.dev/skills/sjarmak/coding-agent-workflows/theory-of-mind-agents)
Your own site
<a href="https://agentmods.dev/skills/sjarmak/coding-agent-workflows/theory-of-mind-agents"><img src="https://agentmods.dev/badge/skills/sjarmak/coding-agent-workflows/theory-of-mind-agents/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 theory-of-mind-agents

Your own site · 80×15
<a href="https://agentmods.dev/skills/sjarmak/coding-agent-workflows/theory-of-mind-agents"><img src="https://agentmods.dev/badge/skills/sjarmak/coding-agent-workflows/theory-of-mind-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,029 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.00093 $0.01029
Opus 5.5 $0.00037 $0.00412
Sonnet 5.5 $0.00019 $0.00206
Haiku 4.5 $0.00009 $0.00103

Measured 1mo ago against content hash 7c9b9260eb99, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

theory-of-mind-agents 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.

source/skills/theory-of-mind-agents/SKILL.md · 100 lines

How it starts

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

Theory of Mind for AI Agents

Theory of Mind is the discipline of acting well under uncertainty about minds: what the user knows, wants, and expects. The engineering object is a user model — explicit, confidence-weighted, inspectable — not vibes absorbed into a prompt.

The user model is first-class state

Model at least four layers, kept separate:

  • Goals — what they are trying to achieve (task-level and standing).
  • Beliefs — what they think is true, including about the system; false beliefs are the interesting ones, because they predict surprise.
  • Preferences — how they want things done (style, autonomy, risk).
  • Expertise — what can be assumed vs must be explained.

Every entry carries evidence and confidence. Distinguish observed (they said it), inferred (pattern across sessions), and default (population prior). Confusing these tiers is how personalization becomes presumption.

Intent inference — the utterance is evidence, not the intent

Requests are compressed, context-dependent renderings of goals. Infer the goal behind the words, then check the inference:

  • When interpretations diverge materially, the choice is ask vs assume. Decide by cost asymmetry: assume when wrong-guess cost is low and reversible; ask when it is high, irreversible, or outward-facing.
  • An inferred intent that contradicts the literal instruction never silently wins — surface the conflict.
  • Ambiguity resolved this session is evidence for next session; that is the preference-learning write path.

Recursive modeling — beliefs about beliefs

Second-order state does real work: what does the user believe the agent knows, and what does the user expect to happen next? Mismatches here produce the worst interaction failures — the agent acting on context the user forgot it has, or the user assuming context the agent lacks. Detect expectation violations and repair explicitly (say what you know, ask what you're missing) rather than plowing ahead.

Read the full file on GitHub · 100 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. 1mo ago First seen · 100 lines · 93 tokens per session scan A 7c9b9260eb99

Subscribe to this mod's changes

theory-of-mind-agents is a skill published in the GitHub repository sjarmak/coding-agent-workflows (7 stars, last pushed 2d ago), licensed MIT. It adds 93 tokens to every session and 1,029 once invoked, about $0.0004 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-02.

Related

theory-of-mind-agents compared with skills from other repositories

theory-of-mind-agents next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
theory-of-mind-agentssjarmak/coding-agent-workflowsSkill72d agoMITA93Claude Code, Codex
reverse-engineer-anythingmxyhi/ok-skillsSkill5189d agoApache-2.0A83Claude Code, Codex
browser-tracemxyhi/ok-skillsSkill5189d agoApache-2.0A88Claude Code
planning-with-filesmxyhi/ok-skillsSkill5189d agoApache-2.0A117Claude Code
bopomofo-rescuemxyhi/ok-skillsSkill5189d agoApache-2.0A332Claude Code
ai-elementsmxyhi/ok-skillsSkill5189d agoApache-2.0A46Claude Code, Codex
exa-searchmxyhi/ok-skillsSkill5189d agoApache-2.0A33Claude Code, Codex