Claude Chalk, a mod that lets Claude Code colour its own replies
The claude-chalk plugin for Claude Code uses chalk-template markup so Claude marks failures red, passes green and risky prompts on a coloured background.
By Dillip Chowdary • Nov 19, 2026 • Source: github.com
At a glance
- Product
- claude-chalk Claude Code plugin
- Install source
- adamkdean/claude-chalk marketplace
- Tested version
- Claude Code 2.1.312
- Licence
- MIT
- Scope
- Terminal sessions only — headless (claude -p) excluded
- API status
- Mod API in early access, subject to change
In this post
Adam Dean published claude-chalk on GitHub, a Claude Code plugin that teaches the AI to colour its own terminal replies using the syntax of the chalk-template npm package. Claude writes markup directly inside its responses, and the mod draws each block in colour while stripping the braces, leaving clean readable output.
Long responses bury the single line that matters. With claude-chalk loaded, Claude marks failures in red, passes in green and warnings in yellow, and places questions requiring a decision on a coloured background — blue for ordinary decisions, red when the answer would permit something risky or hard to undo. The mod is built for developers running Claude Code in a terminal who want state-at-a-glance readability without changing how prose and code blocks look.
01Three install paths, one plugin name
Inside a running Claude Code session, one slash command installs the mod:
/plugin install chalk --marketplace adamkdean/claude-chalkAnswering y adds the marketplace and prompts for scope. Under the user scope the mod activates in every session from that point. From a shell outside any session, the equivalent is:
claude plugin install chalk --marketplace adamkdean/claude-chalkThe desktop app does not run /plugin commands. There, clicking + beside the prompt, then Plugins, then Add marketplace with adamkdean/claude-chalk, and finally Add plugin completes the install. The plugin is named chalk after the npm package whose syntax it uses; Claude Code reserves names starting with claude-, so this naming is intentional.
02Test runs, code reviews and incident boards
The README shows four screenshotted examples of Claude replies drawn through the mod, each played back through a live session in a pseudo-terminal so the images reflect exact output. Test-run replies put failures in red and passes in green, making coverage gaps visible without reading each line.
Code-review replies attach each finding's severity to a coloured background, sorting critical issues from warnings at a glance down the response. Incident-status replies put the root cause in red and move supporting detail beneath it.
When Claude cannot continue without a decision, it places the question on its own coloured line. Blue signals an ordinary choice; red flags one where the answer would allow something risky or irreversible.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Full colour palette and block syntax
A colour block is written {style text}: opening brace, style name, one space, the text, closing brace. Styles chain with dots — {red.bold Build failed} applies both at once.
Blocks nest, and an inner block adds its styles to those around it. Text inside braces that does not match a valid style name, such as {name}, is left as written; \{ and \} produce literal braces.
| Category | Available values |
|---|---|
| Named colours | black, red, green, yellow, blue, magenta, cyan, white, gray |
| Bright variants | redBright, greenBright, blueBright (and all eight named colours) |
| Backgrounds | bgRed, bgGreen, bgBlueBright (bg + colour name) |
| Modifiers | bold, dim, italic, underline, inverse, strikethrough |
| Hex | #ff8800, #:003366, hex(#ff8800), bgHex(#003366) |
| RGB | rgb(255,136,0), bgRgb(0,51,102) — no spaces inside the parens |
Named colours are drawn using the same values Claude Code already applies to those names. Hex and RGB instructions render exactly as specified, giving Claude precise control over foreground and background shades beyond the named set.
04prompt.compose and ui.render, the two hooks
The mod registers two hooks inside Claude Code. The prompt.compose hook appends a short block to the system prompt that teaches Claude the chalk-template syntax and the conditions under which to apply each style. Headless runs started with claude -p do not receive this section because nothing in that environment renders colours.
The ui.render hook fires on each AssistantMessage block and redraws any paragraph containing chalk markup as coloured text. Paragraphs without markup pass through as standard markdown, unchanged. The transcript always stores the markup as Claude originally wrote it; only the visual drawing changes.
Named colours are drawn using Claude Code's existing colour values for those names. Hex and RGB values are applied exactly, giving Claude control over precise shades for both text and background.
05Prose-only rendering, early-access API
Colour markup is drawn in prose paragraphs only. Inside code spans and fenced code blocks the braces and style names appear as written, with no colour applied.
A block cannot span a paragraph boundary; it ends where the paragraph ends. Within a marked-up paragraph, bold, italic, inline code, headings and lists all render, but tables fall back to plain text.
Note: The mod API is in early access and can change between Claude Code releases. The mod was tested against Claude Code 2.1.312. Where the mod is not loaded, all markup is shown exactly as Claude wrote it.
The project is released under the MIT licence and is an independent work, not made by or affiliated with Anthropic or the chalk npm project.
Frequently asked questions
How do I install claude-chalk in a Claude Code terminal session?
Run /plugin install chalk --marketplace adamkdean/claude-chalk inside a session, answer y to add the marketplace, then choose a scope. Under the user scope it activates for every future session.
Does claude-chalk work in headless mode (claude -p)?
No. The prompt.compose hook that teaches Claude the syntax is not injected during headless runs, because nothing in that mode renders colours.
What colours and styles can Claude use with claude-chalk?
Claude can use nine named colours with bright variants, background colours, six modifiers including bold and italic, and exact hex or RGB values for both foreground and background.
Does claude-chalk affect code blocks or tables?
Markup inside code spans and fenced code blocks is shown as written, not coloured. Tables inside a marked-up paragraph also fall back to plain text.
Is claude-chalk an official Anthropic product?
No. It is an independent project by Adam Dean, released under the MIT licence, not made by or affiliated with Anthropic or the chalk npm package.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement