Skip to content
rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Image Editor — layered raster editor

Layered raster editor: layers, transform, paint, filters, layer styles, 1-click background removal, AI command registry, export.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
image-editor.prompt.mdmarkdown
# Install `image-editor` — Image Editor — layered raster editor

> Layered raster editor: layers, transform, paint, filters, layer styles, 1-click background removal, AI command registry, export.

📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail   : https://resource.rahmanef.com/slices/image-editor
🧠 JSON catalog   : https://resource.rahmanef.com/api/knowledge?slice=image-editor
🔗 Source         : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/image-editor

## 1. Install

```bash
npx rahman-resources add image-editor
# alias: npx rr add image-editor
```

The CLI copies `frontend/slices/image-editor/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.

## 2. What it ships

- npm: `@imgly/background-removal`, `konva`, `lucide-react`, `react-konva`
- shadcn primitives: `button`, `input`, `label`, `separator`, `select`, `scroll-area`, `switch`, `dropdown-menu`, `tooltip`, `resizable`, `popover`, `slider`, `tabs`

## 3. Wire it up

React/default: `npx rr add image-editor`. SvelteKit: `npx rr add image-editor --framework sveltekit`. Both share the same layered document, command registry, doc+paint history, project format, adjustment/style/mask semantics, background-removal and Konva stage export contract. React keeps react-konva/shadcn and automatic agent wiring; Svelte uses Konva directly and accepts optional runAssistant/registerTools. Keep AI/model transport and file authorization in the host; the editor UI is not an authorization boundary.

## Rules of engagement

- shadcn-only UI primitives. No raw `<button>` / `<dialog>` / native date or file inputs.
- 200-line hard cap per source file (extract neighbours when over).
- All Convex queries hit an index (`.withIndex(...)`); never bare `.collect()`.
- Public mutations/queries declare `args:` validators + authz.
- Full ruleset: https://resource.rahmanef.com/best-practice

The agent will fetch /llms.txt for the full ruleset and use /api/knowledge for the JSON catalog.