2 Commits

Author SHA1 Message Date
Gaudenz Alder 516965c7c4 feat(plugin): author diagrams as Mermaid + ELK --layout via desktop CLI
The draw.io desktop CLI (30.2.6+) can convert Mermaid to native .drawio
and run ELK auto-layout on XML, so the Claude Code plugin now uses both.

- SKILL.md rewritten around a "produce a .drawio first, then deliver"
  pipeline: prefer Mermaid for standard diagram types when the CLI is
  present, XML for custom styling / precise positioning / no-CLI fallback.
- Adds an ELK layout section (preset names + custom-layout JSON schema)
  and links shared/mermaid-reference.md.
- Mermaid exports go two-step (convert to .drawio, then export) to embed
  editable XML and sidestep the direct Mermaid->PNG embed bug in current
  released desktop apps.
- README.md / DEVELOPING.md / root CLAUDE.md updated to match; plugin.json
  description refreshed and version bumped to 1.1.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 08:53:26 +02:00
Gaudenz Alder 04a4ce1be3 refactor: restructure skill-cli as Claude Code plugin + marketplace
Repackage the draw.io Claude Code skill as an installable plugin under
plugins/claude-code/ and add a marketplace manifest at the repo root, so
users install via

  /plugin marketplace add jgraph/drawio-mcp
  /plugin install drawio@drawio

instead of hand-copying SKILL.md into ~/.claude/skills/.

Supersedes #49 (@TripleRD), the original plugin + marketplace proposal;
reimplemented here with shell-safety hardening and a deduped marketplace
manifest.

Structure:
- git mv skill-cli/{drawio/SKILL.md,README.md} -> plugins/claude-code/
- skill-cli/CLAUDE.md -> plugins/claude-code/DEVELOPING.md (a CLAUDE.md at a
  plugin root is not loaded as context and trips `claude plugin validate`;
  renamed so validation is clean while keeping the maintainer notes)
- .claude-plugin/marketplace.json (marketplace "drawio", owner "draw.io",
  plugin "drawio")
- plugins/claude-code/.claude-plugin/plugin.json: single source of truth for
  version/description/author/license; the marketplace entry stays minimal
  ({name, source, category}) and inherits the rest (verified against the
  official plugin docs)
- plugins/README.md (per-host grouping)
- docs re-pointed Skill+CLI -> Claude Code Plugin; invocation is now
  /drawio:drawio (auto-triggers without the command in normal use)

Security / correctness fixes in SKILL.md (beyond a verbatim move):
- Windows/WSL2 draw.io path used bash backticks (command substitution), which
  would execute the binary at locate-time rather than store its path; switched
  to double-quoting and corrected the explanation.
- Windows-native url mode built the .url shortcut with `echo URL=%URL%`, which
  cmd.exe splits on the URL's `&` query separators (truncated/corrupt shortcut,
  lost diagram payload) and referenced an undefined %URL%. Node now writes the
  .url file directly; only the `&`-free file path is passed to `start`.
- Quoted filenames passed to the export CLI and the node -e one-liner.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 16:27:17 +02:00