mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-06 15:49:35 -04:00
8a82b6d5f6
## Summary Add AgentSkills.io integration so developers can give their AI coding assistants SpacetimeDB expertise. ## What is AgentSkills.io? [AgentSkills.io](https://agentskills.io) is an open standard for distributing domain knowledge to AI coding assistants. After this PR is merged, developers can run: ```bash npx skills add clockworklabs/SpacetimeDB ``` The skills are installed into whichever AI coding tools they use - Claude Code, Cursor, Cline, GitHub Copilot, Windsurf, and 40+ others. The AI then has access to SpacetimeDB-specific patterns, common mistakes to avoid, and correct API usage. ### Test Now You can test this PR before it's merged: ```bash npx skills add douglance/SpacetimeDB ``` ## Why This Matters LLMs frequently hallucinate SpacetimeDB APIs that don't exist: - `#[spacetimedb::table]` instead of `#[table]` - `ctx.db.player` instead of `ctx.db.player()` - `conn.reducers.foo("value")` instead of `conn.reducers.foo({ param: "value" })` These skills teach AI assistants the **correct** patterns and warn about common mistakes, reducing debugging time for developers using AI tools. ## Skills Included | Skill | Lines | What It Teaches | |-------|-------|-----------------| | `spacetimedb-rust` | 895 | Server modules, reducers, tables, RLS, procedures | | `spacetimedb-typescript` | 1004 | Client SDK, React hooks, subscriptions, views | | `spacetimedb-csharp` | 1463 | Unity integration, BSATN, sum types, server modules | | `spacetimedb-cli` | 562 | All CLI commands and workflows | | `spacetimedb-concepts` | 518 | Architecture, when to use SpacetimeDB | Each skill includes: - **HALLUCINATED APIs** section - wrong patterns LLMs commonly generate - **Common Mistakes Table** - server/client errors with fixes - **Hard Requirements** - critical rules that must be followed - **Code Examples** - correct usage patterns ## Directory Structure ``` skills/ ├── spacetimedb-rust/SKILL.md ├── spacetimedb-typescript/SKILL.md ├── spacetimedb-csharp/SKILL.md ├── spacetimedb-cli/SKILL.md └── spacetimedb-concepts/SKILL.md ``` ## Usage (after merge) ```bash # Install all SpacetimeDB skills npx skills add clockworklabs/SpacetimeDB # Install specific skill npx skills add clockworklabs/SpacetimeDB -s spacetimedb-rust # List available skills npx skills add clockworklabs/SpacetimeDB --list ``` ## Test Plan - [x] `npx skills add . --list` shows 5 skills - [x] `npx skills add . -s spacetimedb-rust --yes` installs to 28+ agents - [x] YAML frontmatter validates against agentskills.io spec - [x] Skills contain hallucinated APIs warnings - [x] Skills contain common mistakes tables --------- Co-authored-by: bradleyshep <148254416+bradleyshep@users.noreply.github.com>