cli-anything-krita — Claude Code skill: what it does, how to install
Drives Krita from the command line: new projects, layer stacks, filters and export. Useful when an agent has to produce or convert artwork without opening the GUI.
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a claude-codeWhat cli-anything-krita does
The skill hands your agent a command-line handle on Krita: projects, layers, filters, canvas settings and export all run through cli-anything-krita in a terminal, with no painting window involved. project new takes width and height, layers get a type (paintlayer, grouplayer, vectorlayer and others) plus opacity, and a filter such as blur or levels can be aimed at one named layer. Rendering covers png, jpeg, psd, pdf, webp, gif, svg and bmp, with the preset list coming from export presets.
Underneath it is a plain CLI. Every command accepts --json for machine-readable output, session undo and session redo walk edits back and forth, and the history stays inspectable. That matters when an agent builds an illustration step by step and has to read the result rather than squint at a screenshot.
It will not run on a bare machine. Krita has to be installed, Python 3.10 or newer is required, and the CLI itself is installed from the krita/agent-harness directory with pip install -e .. Check that before asking an agent to paint anything.
What it helps with
- create a canvas at a set size and save the project as JSON
- build a layer stack with opacity and blending modes
- apply blur or levels to a single layer
- render to PNG, PSD or PDF without launching Krita
- undo a bad step through session history
Example prompts for the agent
- Create a 2048×2048 project, add Sketch and Colors layers, apply blur to Background, then render
output.png. - Run
cli-anything-krita --json -p art.json layer listand tell me which layers are hidden. - Resize the canvas to 4096×4096 and export PNG frames into
frames/with overwrite.
How to install cli-anything-krita
1Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a claude-code2Manually: put the files in place
~/.claude/skills/cli-anything-krita/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cli-anything-krita/
1Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a codex2Manually: put the files in place
.agents/skills/cli-anything-krita/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a cursor2Manually: put the files in place
.cursor/skills/cli-anything-krita/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install HKUDS/CLI-Anything cli-anything-krita2Manually: put the files in place
.github/skills/cli-anything-krita/SKILL.md1Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a gemini-cli2Platform CLI
gemini skills install https://github.com/HKUDS/CLI-Anything --path skills/cli-anything-kritaManually: put the files in place
.devin/skills/cli-anything-krita/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cli-anything-krita
How do I install cli-anything-krita in Claude Code?
Run npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a claude-code. The skill lands at ~/.claude/skills/cli-anything-krita/SKILL.md, and the CLI itself is installed from the krita/agent-harness directory with pip install -e ..
What does cli-anything-krita do?
It gives an agent commands for a Krita project: make a canvas, add, remove and configure layers, apply a filter, resize the canvas, and export a render or an animation as frames.
What has to be installed before it works?
Krita itself and Python 3.10 or newer. Without them the cli-anything-krita commands fail even when the skill is already wired into your agent.
Source text
SKILL.md · Apache-2.0
---
name: "cli-anything-krita"
description: "CLI harness for Krita digital painting — manage projects, layers, filters, and export via command line. Use when automating Krita workflows, batch processing images, or operating Krita without a GUI."
---
# cli-anything-krita
CLI harness for **Krita**, the professional open-source digital painting application.
## Prerequisites
- **Krita** installed on the system
- **Python 3.10+**
Install the CLI:
```bash
cd krita/agent-harness && pip install -e .
```
## Command Reference
### Project Management
```bash
cli-anything-krita project new -n "My Art" -w 2048 -h 2048 -o project.json
cli-anything-krita project open project.json
cli-anything-krita --project project.json project save
cli-anything-krita --project project.json project info
```
### Layer Management
```bash
cli-anything-krita -p project.json layer add "Sketch" -t paintlayer
cli-anything-krita -p project.json layer add "Colors" --opacity 200
cli-anything-krita -p project.json layer add "Group" -t grouplayer
cli-anything-krita -p project.json layer remove "Sketch"
cli-anything-krita -p project.json layer list
cli-anything-krita -p project.json layer set "Colors" opacity 180
cli-anything-krita -p project.json layer set "Colors" visible false
cli-anything-krita -p project.json layer set "Colors" blending_mode multiply
```
Layer types: `paintlayer`, `grouplayer`, `vectorlayer`, `filterlayer`, `filllayer`, `clonelayer`, `filelayer`
### Filters
```bash
cli-anything-krita -p project.json filter apply blur -l "Background"
cli-anything-krita -p project.json filter apply sharpen
cli-anything-krita -p project.json filter apply levels -c '{"shadows": 10, "highlights": 240}'
cli-anything-krita filter list
```
Available: blur, sharpen, desaturate, levels, curves, brightness-contrast, hue-saturation, color-balance, unsharp-mask, posterize, threshold
### Canvas Operations
```bash
cli-anything-krita -p project.json canvas resize -w 4096 -h 4096
cli-anything-krita -p project.json canvas resize --resolution 600
cli-anything-krita -p project.json canvas info
```
### Export
```bash
cli-anything-krita -p project.json export render output.png -p png --overwrite
cli-anything-krita -p project.json export render output.jpg -p jpeg
cli-anything-krita -p project.json export render output.psd -p psd
cli-anything-krita -p project.json export animation ./frames/ -p png
cli-anything-krita export presets
cli-anything-krita export formats
```
Presets: png, png-web, jpeg, jpeg-web, jpeg-low, tiff, tiff-lzw, psd, pdf, svg, webp, gif, bmp
### Session (Undo/Redo)
```bash
cli-anything-krita session undo
cli-anything-krita session redo
cli-anything-krita session history
```
### Status
```bash
cli-anything-krita status
```
## Agent Usage (JSON Mode)
All commands support `--json` for machine-readable output:
```bash
cli-anything-krita --json -p project.json project info
cli-anything-krita --json -p project.json layer list
cli-anything-krita --json status
```
## Example Workflow
```bash
# 1. Create project
cli-anything-krita --json project new -n "Illustration" -w 3000 -h 4000 -o art.json
# 2. Set up layer stack
cli-anything-krita --json -p art.json layer add "Background" -t paintlayer
cli-anything-krita --json -p art.json layer add "Sketch" -t paintlayer --opacity 180
cli-anything-krita --json -p art.json layer add "Inking" -t paintlayer
cli-anything-krita --json -p art.json layer add "Colors" -t paintlayer
cli-anything-krita --json -p art.json layer add "Effects" -t paintlayer --opacity 128
# 3. Apply effects
cli-anything-krita --json -p art.json filter apply blur -l "Background"
# 4. Export
cli-anything-krita --json -p art.json export render final.png -p png --overwrite
```
© HKUDS · Apache-2.0 · HKUDS/CLI-Anything