agentleFS
ZSeven-WZSeven-W/openpencil/CLAUDE.md

openpencil

CLAUDE.md6.1k starsChanged 4 months agoMITView on GitHub

The TypeScript OpenPencil has been retired. apps/web, apps/desktop, apps/cli, and the pen-* packages (pen-types/core/engine/renderer/figma/mcp/ai-skills/sdk/react/acp) are gone. The product is now implemented in Rust (crates/) with a thin wasm-backed web SDK (packages/op-web-sdk*). Historical // ported from pen-* comments in the Rust sources name the retired TS as their origin — that code no longer exists in-tree; consult git history (last TS tag v0.7.5) if you need it. Detailed module docs load automatically in subdirectories: Tooling is Cargo (Rust — the product).…

Trending

Quiet since September.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 3 mentionsMar 2026: 3 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 9 mentionsSep 2026: 6 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the ZSeven-W/openpencil repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about ZSeven-W/openpencil

The biggest 5 of 23 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 23

Talked about on GitHub, Bluesky and Hacker News (23 times).

On GitHub · 13

8 more on GitHub

On Bluesky · 6

1 more on Bluesky

The file

We split this CLAUDE.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use Conventional Commits: <type>(<scope>): <subject>

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

The TypeScript OpenPencil has been retired. apps/web, apps/desktop, apps/cli, and the pen-* packages (pen-types/core/engine/renderer/figma/mcp/ai-skills/sdk/react/acp) are gone. The product is now implemented in Rust (crates/) with a thin wasm-backed web SDK (packages/op-web-sdk*). Historical // ported from pen-* comments in the Rust sources name the retired TS as their origin — that code no longer exists in-tree; consult git history (last TS tag v0.7.5) if you need it.

Detailed module docs load automatically in subdirectories:

  • crates/CLAUDE.md — Rust shell: crate layout, editor core, widgets, hosts (native/web/desktop), MCP, AI, orchestrator, codegen. The canonical architecture doc.
  • packages/CLAUDE.md — Remaining packages (op-web-sdk web viewer SDK family).

Commands

Tooling is Cargo (Rust — the product). The root has no package.json; the JS/Bun tooling for the web SDK lives under packages/ — run SDK/JS scripts from there.

  • Web dev server (Rust): bash scripts/start-web-rust.sh
  • Build (Rust): cargo build --workspace --release
  • Run all tests (Rust): cargo test --workspace; single crate: cargo test -p <crate>
  • Type check: cargo check --workspace; wasm: cargo check --target wasm32-unknown-unknown -p op-host-web --no-default-features --features web
  • Lint / format (Rust): cargo clippy --workspace --all-targets -- -D warnings / cargo fmt --all
  • Lint / format (remaining TS SDK): from packages/: bun run lint (oxlint) / bun run format (oxfmt)
  • Desktop app: cargo build -p op-host-desktop → binary openpencil-desktop (live MCP on 127.0.0.1:<port>/mcp)
  • CLI: cargo build -p op-cli → binary op
  • MCP server: built into the desktop/web host (--mcp <path>); crate op-mcp
  • Iconify catalog (Rust assets): from packages/: bun run generate-iconify-catalog
  • Sync all managed versions: scripts/sync-version.sh reads the canonical version from root Cargo.toml; verify without writing via tools/check-version-sync.sh

Architecture

OpenPencil is an open-source, AI-native vector design tool (Design-as-Code). The editor — canvas engine, chrome, stores, MCP, AI — is Rust, built on the vendored jian skia/widget/render/event toolkit (vendor/jian) and casement winit fork (vendor/casement). See crates/CLAUDE.md for the authoritative crate map; the essentials:

crates/
├── op-editor-core/       Canonical `.op` (PenDocument) editor state + EditorCommand + design-variable resolution
├── op-editor-ui/         Platform-free widgets + RenderBackend facade (wasm32-clean)
├── op-editor-host-core/  Transport-free host state machines shared by all hosts
├── op-host-native/       Native host lib (winit + skia-safe GL) — desktop + mobile
├── op-host-web/          Browser bundle: wasm32 cdylib, CanvasKit renderer
├── op-host-desktop/      Desktop binary `openpencil-desktop`; also the `--serve-web` daemon
├── op-host-services/     Headless serve-web / MCP daemon lib (shared by desktop + web-server)
├── op-host-web-server/   Thin GL-free web-server binary
├── op-cli/               `op` command-line tool
├── op-util/              Dependency-free leaf: hex-colour parsing + JSON / XML escaping
└── op-mcp / op-ai / op-ai-skills / op-codegen / op-orchestrator / op-figma /
   op-git / op-opmerge / op-pen-loader / op-design-lint / op-i18n / op-html /
   op-auth-bridge / op-smoke / …

packages/
├── op-web-sdk/           Read-only `.op` web viewer SDK (wraps the op-host-web wasm bundle)
├── op-web-sdk-react/     React 19 adapter for op-web-sdk
└── op-web-sdk-vue/       Vue 3 adapter for op-web-sdk

Data flow, canvas engine, Document/EditorCommand model, MCP layered-design workflow, design variables, and the run/debug recipe are all documented in crates/CLAUDE.md.

Code Style

  • Single files must not exceed 800 lines — split into smaller modules when they grow beyond this. The workspace currently has zero violations; the convention is a spine (public surface + mod declarations) plus sibling files, with re-exports keeping import paths stable.
  • One component/widget per file, single responsibility.
  • .rs filenames use snake_case; .ts/.tsx (SDK) use kebab-case.
  • Source comments (.rs/.ts/.toml) in English (spec/plan markdown + test CJK fixtures may keep Chinese).
  • Rust widgets paint against jian's Painter; draw_text is baseline-relative (label components center via centered_text_baseline_y, not (h-fs)/2).

Git Commit Convention

Use Conventional Commits: <type>(<scope>): <subject>

Types: feat, fix, refactor, perf, style, docs, test, chore

Scopes: editor, canvas, panels, history, ai, codegen, store, types, variables, figma, mcp, desktop, web, renderer, sdk, cli, agent, i18n

Rules: Subject in English, lowercase start, no period, imperative mood. Body optional; explain why not what. One commit per change.

License

MIT License. See LICENSE for details.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.