Skip to content

Conversation

@douglance
Copy link
Contributor

@douglance douglance commented Jan 31, 2026

Summary

Add AgentSkills.io integration so developers can give their AI coding assistants SpacetimeDB expertise.

What is AgentSkills.io?

AgentSkills.io is an open standard for distributing domain knowledge to AI coding assistants. After this PR is merged, developers can run:

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:

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)

# 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

  • npx skills add . --list shows 5 skills
  • npx skills add . -s spacetimedb-rust --yes installs to 28+ agents
  • YAML frontmatter validates against agentskills.io spec
  • Skills contain hallucinated APIs warnings
  • Skills contain common mistakes tables

Create 5 skill files that enable developers to install SpacetimeDB
expertise into Claude Code, Cursor, Cline, and 40+ other AI agents
via `npx skills add spacetimedb/spacetimedb`.

Skills included:
- spacetimedb-rust: Server module development (tables, reducers, macros)
- spacetimedb-typescript: TypeScript SDK (connection, subscriptions, React)
- spacetimedb-csharp: C#/Unity SDK (BSATN, Unity integration, threading)
- spacetimedb-cli: CLI workflows (init, build, publish, generate)
- spacetimedb-concepts: Core architecture (tables, reducers, subscriptions)
@douglance douglance force-pushed the feature/agentskills-integration branch from f6c98ed to 846f6c6 Compare February 1, 2026 00:50
Incorporate critical information from reference files:
- Add "HALLUCINATED APIs" sections with wrong patterns to avoid
- Add "Common Mistakes Tables" for server/client errors
- Add hard requirements for each language
- Add procedures (beta) sections for Rust/TypeScript
- Add sum types/TaggedEnum section for C#
- Add views and ctx.withTx() patterns for TypeScript
- Add RLS patterns for Rust
- Add feature implementation and debugging checklists for concepts
The symlink wasn't being followed when cloned from GitHub.
Both skills/ and .claude/skills/ now contain the actual files.
Skills should only be in skills/ directory for agentskills.io distribution.
Users install to their own .claude/skills/ via npx skills add.
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.

1 participant