{"slug": "claude-chalk-a-mod-that-lets-claude-code-colour-its-own-replies", "title": "Claude Chalk, a mod that lets Claude Code colour its own replies", "summary": "Developer Adam K. Dean released claude-chalk, a Claude Code plugin that lets Claude color its own terminal replies using chalk-template markup syntax, installed via `/plugin install chalk --marketplace adamkdean/claude-chalk`. The mod uses two hooks: `prompt.compose` adds a system-prompt section teaching Claude the syntax, and `ui.render` on `AssistantMessage` redraws reply blocks containing markup, with named colors matching Claude Code's rendering and hex/RGB colors drawn exactly. The plugin is named `chalk` because Claude Code reserves plugin names starting with `claude-`, and the mod API is in early access and can change.", "body_md": "[Install](#install) ·\n  [Examples](#examples) ·\n  [Palette](#the-palette) ·\n  [Syntax](#syntax) ·\n  [How it works](#how-it-works)\n\n**claude-chalk** is a Claude Code mod that lets Claude colour its own replies\nin the terminal. Claude writes markup in the syntax of the\n[chalk-template](https://github.com/chalk/chalk-template) npm package, and the\nmod draws it in colour, without the braces.\n\nLong replies can bury the one line that matters. With the mod loaded, Claude marks failures in red, passes in green and warnings in yellow, and it puts a question it needs answered on a coloured background. The state of things shows at a glance, and most text stays plain.\n\nAt the prompt of a Claude Code session in a terminal:\n\n```\n/plugin install chalk --marketplace adamkdean/claude-chalk\n```\n\nAnswer `y` to add the marketplace, then choose a scope. The mod is active in\nthat session at once and, under the user scope, in every session after it.\n\nFrom a shell:\n\n```\nclaude plugin install chalk --marketplace adamkdean/claude-chalk\n```\n\nIn the desktop app, where `/plugin` does not run: click **+** next to the\nprompt box, then **Plugins**, **Add marketplace** with\n`adamkdean/claude-chalk`, then **Add plugin**.\n\nThe plugin is named `chalk`, after the npm package whose syntax it uses.\nClaude Code reserves plugin names that start with `claude-`.\n\nEvery screenshot below is a real Claude Code session (Sonnet 5.5) with the mod loaded. The prompts do not ask for colour: Claude chose every colour itself.\n\nFailures stand out from passes, and the coverage gap is easy to spot.\n\nThe bug is labelled in red, and the lesser points in yellow.\n\nThe root cause is in red and the knock-on effect in yellow, ahead of the detail.\n\nWhen Claude cannot go on without a decision, the question goes on its own line on a background colour: blue for an ordinary question, red when the answer allows something risky or hard to undo.\n\nEvery style the mod draws, as Claude showed it when asked for its palette.\n\nA block is `{style text}`: an opening brace, a style, one space, the text and a\nclosing brace. Chain styles with dots. Blocks nest, and an inner block adds to\nthe styles around it.\n\n| Kind | Styles | \n|---|---|\n| Colours | `black`` red``green`` yellow``blue`` magenta``cyan`` white``gray` , and each of the first eight with`Bright` (`redBright` ) | \n| Backgrounds | `bg` and a colour:`bgRed` ,`bgBlueBright` | \n| Modifiers | `bold`` dim``italic`` underline``inverse`` strikethrough` | \n| Hex | `#ff8800` (text),`#:003366` (background),`#ffffff:cc0000` (both),`hex(#ff8800)` ,`bgHex(#003366)` | \n| RGB | `rgb(255,136,0)` ,`bgRgb(0,51,102)` , with no spaces | \n\n```\n{green ✓ All 42 tests pass}\n{red.bold Build failed} in `src/parser.ts`\n{yellow Warning:} the cache is stale.\n{bold Hello {red world}}\n{#ff8800:001122.bold Hot}\n{bgRed.whiteBright  Delete these 3 files? }\n```\n\nInside a block, write `\\{` and `\\}` for literal braces. Text in braces that is\nnot a valid style, such as `{name}`, is left as written.\n\nThe mod has two hooks:\n\n- `prompt.compose` adds a short section to the system prompt that teaches\nClaude the syntax and when to use it. Headless runs (`claude -p` ) do not get\nit, because nothing draws the colours there.\n- `ui.render` on`AssistantMessage` redraws each reply block that holds markup.\nA paragraph with markup is drawn as coloured text, and every other paragraph\nis drawn as markdown, as before. A block without markup is left to Claude\nCode.\n\nNamed colours are drawn as Claude Code draws those names. Hex and RGB colours are drawn exactly. Only the drawing changes: the transcript keeps the markup as Claude wrote it.\n\n- Markup is drawn in prose only. Inside code spans and code blocks it is shown as written.\n- A block ends at the end of its paragraph.\n- In a paragraph with markup, bold, italic, inline code, headings and lists are drawn, but tables are shown as plain text.\n- Where the mod is not loaded, the markup is shown as written.\n- The mod API is in early access and can change between Claude Code releases. Tested with Claude Code 2.1.312.\n\n```\nclaude --plugin-dir .      # start a session with the mod loaded from this folder\nclaude plugin validate .   # check the manifests and the hooks module\nclaude plugin test .       # run the tests in tests/\n```\n\n[AGENTS.md](https://github.com/adamkdean/claude-chalk/blob/master/AGENTS.md) describes the layout, the checks and the rules for\nchanges, including how to check drawing in a real terminal.\n\nThe screenshots are recorded from real sessions in a pseudo-terminal and\nreplayed into [xterm.js](https://xtermjs.org) to render them.\n\nReleased under the [MIT licence](https://github.com/adamkdean/claude-chalk/blob/master/LICENSE).\n\nAn independent project, not made by or affiliated with Anthropic or the chalk project.", "url": "https://wpnews.pro/news/claude-chalk-a-mod-that-lets-claude-code-colour-its-own-replies", "canonical_source": "https://github.com/adamkdean/claude-chalk", "published_at": "2026-10-28 12:29:43+00:00", "updated_at": "2026-10-28 12:42:08.767726+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["Claude Code", "claude-chalk", "Adam K. Dean", "chalk-template", "Anthropic", "Sonnet 5.5"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/claude-chalk-a-mod-that-lets-claude-code-colour-its-own-replies", "markdown": "https://wpnews.pro/news/claude-chalk-a-mod-that-lets-claude-code-colour-its-own-replies.md", "text": "https://wpnews.pro/news/claude-chalk-a-mod-that-lets-claude-code-colour-its-own-replies.txt", "jsonld": "https://wpnews.pro/news/claude-chalk-a-mod-that-lets-claude-code-colour-its-own-replies.jsonld"}}