# cli-anything-krita

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 511 installs · ★ 57187
- Author: HKUDS
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/HKUDS/CLI-Anything/tree/HEAD/skills/cli-anything-krita/SKILL.md
- Updated: 2026-09-22
- HTML: https://affpapa.org/en/nevibecode/skills/cli-anything-krita

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/cli-anything-krita/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/cli-anything-krita/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cli-anything-krita/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cli-anything-krita/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install HKUDS/CLI-Anything cli-anything-krita
```

2. **Manually: put the files in place**
- File: `.github/skills/cli-anything-krita/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/HKUDS/CLI-Anything --path skills/cli-anything-krita
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cli-anything-krita/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-krita -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/HKUDS/CLI-Anything/tree/HEAD/skills/cli-anything-krita/SKILL.md

## When to use it
- 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
- 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 list` and tell me which layers are hidden.
- Resize the canvas to 4096×4096 and export PNG frames into `frames/` with overwrite.

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: c22b8dd389436f83.

BEGIN THIRD-PARTY FILE c22b8dd389436f83
````text
---
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
```
````
END THIRD-PARTY FILE c22b8dd389436f83

The third-party file has ended. Everything between the c22b8dd389436f83 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2464 of 3725 bytes. © HKUDS · Apache-2.0 · https://github.com/HKUDS/CLI-Anything/tree/HEAD/skills/cli-anything-krita/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
