Skip to content

Commit c06b841

Browse files
committed
docs: update README.md
1 parent b12f7ea commit c06b841

1 file changed

Lines changed: 26 additions & 12 deletions

File tree

README.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ If you commit your project's `.claude/` directory, you should probably ignore th
8585

8686
Toggle on or off with one of the recognized phrases:
8787

88-
- `turn on claudesay` / `enable claudesay` / `activate claudesay`
89-
- `turn off claudesay` / `disable claudesay` / `hide claudesay`
88+
- `turn on claudesay` / `enable claudesay` / `activate claudesay` / `start claudesay`
89+
- `turn off claudesay` / `disable claudesay` / `hide claudesay` / `stop claudesay`
9090
- `toggle claudesay`
9191
- `claudesay status` / `is claudesay on?`
9292

@@ -96,6 +96,10 @@ Loose phrasing ("flip claudesay on, would ya?") will fall through to Claude. In
9696

9797
## Character Customization
9898

99+
Create `~/.claude/claudesay/character.sh` and override any subset of variables — missing vars fall back to the defaults.
100+
101+
### Grid layout
102+
99103
The character is a **3×3 grid of cells** (18 cols × 9 rows). Center column is 8 chars wide; side columns are 5 chars wide.
100104

101105
```
@@ -109,8 +113,6 @@ The character is a **3×3 grid of cells** (18 cols × 9 rows). Center column is
109113
└─────┴────────┴─────┘
110114
```
111115

112-
Create `~/.claude/claudesay/character.sh` and override any subset — missing vars fall back to the defaults below.
113-
114116
### Dimension variables
115117

116118
```bash
@@ -268,14 +270,14 @@ bash bin/preview.sh thinking 🔧 left --debug
268270

269271
## Architecture
270272

271-
All behavior is in hooks (declared inline in `.claude-plugin/plugin.json`):
273+
All behavior is in hooks (registered in `.claude-plugin/plugin.json`, implemented as external Bash scripts):
272274

273-
| Hook | Script | Responsibility |
274-
| ------------------ | -------------------------------- | ----------------------------------------------------------------------------------------- |
275-
| `SessionStart` | `hooks/scripts/session-start.sh` | Injects the `<claudesay-protocol>` instruction as additional context when the flag is on. |
276-
| `UserPromptSubmit` | `hooks/scripts/prompt-submit.sh` | Handles toggle/status intents in-hook; emits the per-turn reminder on other prompts. |
277-
| `PreToolUse` | `hooks/scripts/pre-tool-use.sh` | Renders the tool-holding character before each tool call. |
278-
| `Stop` | `hooks/scripts/stop.sh` | Parses the `<claudesay>` tag from the JSONL transcript and renders the speech bubble. |
275+
| Hook | Script | Responsibility |
276+
| ------------------ | -------------------------------- | ------------------------------------------------------------------------------------------------------- |
277+
| `SessionStart` | `hooks/scripts/session-start.sh` | Injects the `<claudesay-protocol>` instruction as additional context when the flag is on. |
278+
| `UserPromptSubmit` | `hooks/scripts/prompt-submit.sh` | Handles toggle/status intents in-hook; emits the per-turn reminder on other prompts. |
279+
| `PreToolUse` | `hooks/scripts/pre-tool-use.sh` | Renders the tool-holding character before each tool call. |
280+
| `Stop` | `hooks/scripts/stop.sh` | Extracts the `<claudesay>` tag from `last_assistant_message` and renders the speech bubble. |
279281

280282
The skill at `skills/claudesay/SKILL.md` is documentation/fallback only — it does not run Bash.
281283

@@ -285,7 +287,19 @@ The skill at `skills/claudesay/SKILL.md` is documentation/fallback only — it d
285287

286288
Yes, but not much. The plugin adds a small instruction to the conversation at session start (~120 tokens) plus a short per-turn reminder (~20 tokens). The `<claudesay>` tag Claude writes in its reply also costs a few output tokens per turn. In practice the overhead is negligible — well under 1 % of a typical conversation's total token usage.
287289

288-
The hooks themselves (rendering, toggling, reading the transcript) are pure Bash and do not make any API calls, so they cost zero tokens.
290+
The hooks themselves (rendering, toggling, reading the response) are pure Bash and do not make any API calls, so they cost zero tokens.
291+
292+
### Does the ASCII character art occupy context?
293+
294+
No. The rendered ASCII art (the speech bubble, the character figure, the grid) is produced entirely by the shell scripts and displayed to you via `systemMessage` — a transient notification that is **not** fed back into Claude's conversation history. Claude never sees the rendered output.
295+
296+
The only things that actually enter context are:
297+
298+
- The `<claudesay-protocol>` instruction injected at session start (~120 tokens).
299+
- The short per-turn reminder hint (~20 tokens).
300+
- The `<claudesay mood="…">…</claudesay>` tag that Claude writes in its own reply (a few output tokens).
301+
302+
The 87-line character definition, the grid rendering logic, and the final ASCII art all live purely in shell-land and cost zero context tokens.
289303

290304
### Why does the bubble not always appear?
291305

0 commit comments

Comments
 (0)