A Claude Code skill for generating beautiful code screenshots using carbon-now-cli.
Generate beautiful images of your source code directly from Claude Code conversations. Supports 29 syntax themes, 13 fonts, custom presets, selective line ranges, and PNG/SVG export.
This is a Claude Code skill — a markdown reference file that teaches Claude Code how to use carbon-now-cli on your behalf. When you ask Claude Code to generate a code screenshot, it will invoke the CLI to produce high-quality Carbon-style images.
It is not a standalone tool. It requires both Claude Code and carbon-now-cli.
- Claude Code installed
- Node.js >= 18.17.0
- carbon-now-cli:
npm i -g carbon-now-cligit clone https://github.com/xirhxq/carbon-image.git ~/.claude/skills/carbon-imageThat's it. Claude Code automatically discovers any SKILL.md under ~/.claude/skills/<name>/.
git clone https://github.com/xirhxq/carbon-image.git ~/Documents/Clones/carbon-image
ln -s ~/Documents/Clones/carbon-image ~/.claude/skills/carbon-imageOnce installed, simply ask Claude Code in natural language:
- "Create a carbon image of
src/main.tsusing the nord theme" - "Generate a code screenshot of lines 10-30 in
utils.py" - "Make a pretty code picture from
index.jsfor my presentation" - "Generate a carbon image of the
handleRequestfunction"
Claude will invoke carbon-now with the appropriate arguments and save the image.
Use the example config file as a starting point:
cp examples/carbon-config.json ~/.carbon-now.json
carbon-now your-file.js --preset dark-proClaude can pass --settings to customize any run:
carbon-now file.ts --settings '{"theme": "nord", "fontFamily": "Fira Code", "lineNumbers": true}'3024-night, a11y-dark, blackboard, base16-dark, base16-light, cobalt, dracula-pro, duotone-dark, hopscotch, lucario, material, monokai, night-owl, nord, oceanic-next, one-light, one-dark, panda-syntax, paraiso-dark, seti, shades-of-purple, solarized dark, solarized light, synthwave-84, twilight, verminal, vscode, yeti, zenburn
Anonymous Pro, Cascadia Code, Droid Sans Mono, Fantasque Sans Mono, Fira Code, Hack, IBM Plex Mono, Inconsolata, JetBrains Mono, Monoid, Source Code Pro, Space Mono, Ubuntu Mono
- carbon-now-cli by Milos Sutanovac (MIT)
- Carbon web app by Mike Fix, Brian Dennis, Jake Dexheimer (MIT)