Skip to content

Add Claude Code skill for scaffolding and deploying plugins#46

Draft
guyathomas wants to merge 2 commits intomainfrom
add-claude-code-skill
Draft

Add Claude Code skill for scaffolding and deploying plugins#46
guyathomas wants to merge 2 commits intomainfrom
add-claude-code-skill

Conversation

@guyathomas
Copy link
Copy Markdown

@guyathomas guyathomas commented Apr 21, 2026

Summary

Adds .claude/skills/sigma-plugin/SKILL.md — a Claude Code skill that scaffolds a Vite + vite-plugin-singlefile project pinned to @sigmacomputing/plugin, then deploys via sigcli plugins create / upload-bundle / list against the /v2/plugins API (mono-node#32009 for CRUD, mono-node#32254 for bundle upload, sigcli wiring in cli#24). Gated on the plugins_v2 Statsig flag.

Design

The skill deliberately does not embed @sigmacomputing/plugin hook names or option shapes — those drift across versions. It instructs Claude to fetch them at runtime via context7 (or fall back to the installed .d.ts) and refuse to ship code for any API call it can't confirm. The skill owns: create-vs-update decision, .sigma-plugin.json durability, single-file bundle constraints (incl. the 10 MB server cap), and when to stop and ask.

Part 4 of 4

Part 1: mono-node#32009 (CRUD) · Part 2: mono-node#32254 (bundle upload) · Part 3: cli#24 · Part 4: this PR.

Followups

  • Distribution (skill currently has to be cpd into ~/.claude/skills/).
  • Stale version pins in package.json template.
  • CI test that scaffolds + builds end-to-end.
  • Promote context7 from soft to hard requirement once it's canonical.
  • Align dev port 5173 with the Sigma admin UI dev-mode default.

Test plan

  • cp .claude/skills/sigma-plugin/SKILL.md ~/.claude/skills/sigma-plugin/SKILL.md
  • sigcli profile list works; plugins_v2 flag enabled
  • "create a new Sigma plugin that shows a counter" in an empty dir → files scaffolded, sigcli plugins create called once, .sigma-plugin.json written, build produces single-file dist/index.html, sigcli plugins upload-bundle returns a CDN URL
  • Add to a workbook element, loads in iframe
  • Re-run with an edit → reuses pluginId, no duplicate

🤖 Generated with Claude Code

Adds .claude/skills/sigma-plugin/SKILL.md — a Claude Code skill that
walks a developer from idea to deployed plugin in one session. The
skill is intentionally thin on API specifics: it delegates the
@sigmacomputing/plugin API surface to the context7 MCP (with a
fallback to reading the installed .d.ts), so it stays correct across
library releases without edits.

Paired with three MCP tools exposed by crossover (createPlugin,
pushPluginCode, listPlugins) in sigmacomputing/mono-node.

What the skill teaches
- Create vs. update decision (avoid re-scaffolding working plugins)
- Where to fetch API details (context7 preferred, .d.ts fallback)
- Deploy workflow with error-recovery rules (never re-call
  createPlugin on retry; write .sigma-plugin.json immediately so
  pluginId survives failures)
- Single-file bundle constraints enforced by vite-plugin-singlefile
- When to stop and ask (data unavailable, bundle too large,
  unconfirmed API shapes)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@guyathomas guyathomas closed this Apr 24, 2026
@guyathomas guyathomas reopened this Apr 27, 2026
Replaces the MCP-based createPlugin/pushPluginCode/listPlugins flow with
sigcli plugins create/upload-bundle/list, matching the new /v2/plugins
REST API in mono-node#32009 and the sigcli commands in cli#24.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@guyathomas guyathomas force-pushed the add-claude-code-skill branch from 6733ec1 to 3d3fcb0 Compare April 27, 2026 20:25
@Pearce-Ropion
Copy link
Copy Markdown
Collaborator

I thought we were still exploring how we wanted to handle plugin uploads and if we even wanted to host them on our servers. Where is this being uploaded to? Are we running any sort of security scan on the uploaded bundle?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants