Skip to content

xirhxq/carbon-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

carbon-image

License: MIT Skill for Claude Code

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.

What It Does

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.

Prerequisites

  • Claude Code installed
  • Node.js >= 18.17.0
  • carbon-now-cli:
npm i -g carbon-now-cli

Installation

Option A: Clone directly into your skills directory

git clone https://github.com/xirhxq/carbon-image.git ~/.claude/skills/carbon-image

That's it. Claude Code automatically discovers any SKILL.md under ~/.claude/skills/<name>/.

Option B: Symlink (keep repos in a separate location)

git clone https://github.com/xirhxq/carbon-image.git ~/Documents/Clones/carbon-image
ln -s ~/Documents/Clones/carbon-image ~/.claude/skills/carbon-image

Usage

Once installed, simply ask Claude Code in natural language:

  • "Create a carbon image of src/main.ts using the nord theme"
  • "Generate a code screenshot of lines 10-30 in utils.py"
  • "Make a pretty code picture from index.js for my presentation"
  • "Generate a carbon image of the handleRequest function"

Claude will invoke carbon-now with the appropriate arguments and save the image.

Configuration

Quick presets

Use the example config file as a starting point:

cp examples/carbon-config.json ~/.carbon-now.json
carbon-now your-file.js --preset dark-pro

Override settings per run

Claude can pass --settings to customize any run:

carbon-now file.ts --settings '{"theme": "nord", "fontFamily": "Fira Code", "lineNumbers": true}'

Available themes

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

Available fonts

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

Acknowledgments

  • carbon-now-cli by Milos Sutanovac (MIT)
  • Carbon web app by Mike Fix, Brian Dennis, Jake Dexheimer (MIT)

License

MIT

About

A Claude Code skill for generating beautiful code screenshots using carbon-now-cli

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors