heard: Instructions file for Claude Code

AGENTS.md

heard AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from heardlabs/heard. It costs 3,488 tokens per session, scanned B, original, Apache-2.0.

A contributor and coding-agent guide for Heard, a macOS menu-bar app that speaks updates from Claude Code, Codex, and command-line agents. It explains how the app and its short-lived hook processes communicate.

In plain words
What is it for?
Use it when working on Heard’s daemon, command-line hooks, Unix-socket messages, event routing, or speech handling. It also points contributors to the project’s setup, testing, and contribution process.
Why use it?
It shows where agent events enter the system and how they reach the speech queue. This helps developers understand the event flow before changing hooks, routing, or narration behavior.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: PreToolUse hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is heardlabs/heard's own configuration. It tells Claude Code, Codex and OpenCode how to work on heard 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 heard configures →

Reuse

Borrowing it

Nothing to install: this file belongs to heardlabs/heard. 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/heardlabs/heard/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/heardlabs/heard

Made for: Claude Code, Codex, OpenCode.

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 heard AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/heardlabs/heard/agents-md/github.svg)](https://agentmods.dev/instructions/heardlabs/heard/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/heardlabs/heard/agents-md"><img src="https://agentmods.dev/badge/instructions/heardlabs/heard/agents-md/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 heard AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/heardlabs/heard/agents-md"><img src="https://agentmods.dev/badge/instructions/heardlabs/heard/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,488 This file is loaded in full into every session.
When invoked 3,488 The same file — it is already loaded in full.
Security scan B 1 finding. 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.03488 $0.03488
Opus 5.5 $0.01395 $0.01395
Sonnet 5.5 $0.00698 $0.00698
Haiku 4.5 $0.00349 $0.00349

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

Security

Grade B, and why

heard AGENTS.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

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

~/.claude/settings.json hook → python -m heard.hook claude-code
AGENTS.md · 166 lines

How it starts

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

Heard — contributor & agent guide

A macOS voice companion that narrates Claude Code / Codex / arbitrary CLI agents. py2app menu-bar bundle + CLI. Apache 2.0. heard.dev · Releases

This file is the guide for contributors and for coding agents opened in this repo (Claude Code auto-reads it via CLAUDE.md). Keep it current when the architecture shifts. For setup, the test gate, and the PR flow, see CONTRIBUTING.md.


Process model

One process — the menu-bar app (Heard.app) — runs the daemon as an in-process thread. Hooks installed by Claude Code / Codex are spawned as short-lived python -m heard.hook <agent> subprocesses. They read the hook payload from stdin, send a JSON message over a Unix-domain socket to the daemon, and exit.

CC tool call
  ↓
~/.claude/settings.json hook → python -m heard.hook claude-code
  ↓ stdin: {"hook_event_name": "PreToolUse", ...}
heard.client.send_event() → Unix socket
  ↓
Heard.app (daemon thread) — _handle_event routes by kind:
  ├─ tool_pre / tool_post  → fast-path templates (no LLM)   → speech queue
  ├─ prose / finals        → harness (the brain)            → speech queue
  └─ harness punts (None)  → no-LLM floor (canned/template) → speech queue
  ↓
afplay → history.append (after successful play)

The harness brain is the mandatory narration path for prose and finals. There are exactly three lanes:

  1. Brain (harness.narrate) — prose + finals. One narration-brain call with access to the persona, the Agent State scoreboard, and Working Memory.
  2. Fast-path templates — tool actions ("Editing auth.py"); never the brain (latency/cost). Cheap, no LLM.
  3. No-LLM floor (Daemon._floor_text) — fires only when the brain punts (LLM unreachable: daily cap, outage, no provider). Tools keep their clean template; a final is read as-is if short, else swapped for a bounded lead of the message prefixed with the project. This floor — not any legacy path — is the only fallback. The floor (and the local Kokoro TTS option) is what keeps Heard from going silent, which for an ambient tool reads as "broken."

Read the full file on GitHub · 166 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 · 166 lines · 3,488 tokens per session scan B f5d6c8505099

Subscribe to this mod's changes

heard AGENTS.md is an instructions file published in the GitHub repository heardlabs/heard (214 stars, last pushed today), licensed Apache-2.0. It adds 3,488 tokens to every session, about $0.0140 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories