Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fb07d40
chore: add changeset for agent skills package
KyleAMathews Jan 26, 2026
72e99bd
feat: add @electric-sql/agent package with AI coding assistant skills
KyleAMathews Jan 26, 2026
5031c51
fix: add @types/node and format script
KyleAMathews Jan 26, 2026
992f91d
fix: add coverage script to agent package
KyleAMathews Jan 26, 2026
aa8e20a
feat: add ecosystem overview with TanStack DB and Durable Streams
KyleAMathews Jan 30, 2026
9ff597e
fix: clarify durable-streams client must be direct dependency
KyleAMathews Jan 30, 2026
cc69b28
chore: remove confusing pnpm comment
KyleAMathews Jan 30, 2026
8acaa4d
fix: simplify TanStack DB skill loading instructions
KyleAMathews Jan 30, 2026
4b8d5e5
refactor: rename @electric-sql/agent to @electric-sql/playbook
KyleAMathews Jan 30, 2026
f1a73f7
fix: update router skill to use playbook naming for all packages
KyleAMathews Jan 30, 2026
d69c131
set version to 0.0.1
KyleAMathews Jan 30, 2026
f2e4317
ci: add playbook package to pkg-pr-new preview builds
KyleAMathews Jan 30, 2026
e8d736a
Add tanstack-start-quickstart skill with complete setup guide
KyleAMathews Jan 31, 2026
6107838
Add electric-proxy skill with framework-agnostic patterns
KyleAMathews Jan 31, 2026
62d28c3
Fix deprecated createServerFileRoute in electric-quickstart
KyleAMathews Jan 31, 2026
b6d056b
Add SSR configuration section to electric-tanstack-integration
KyleAMathews Jan 31, 2026
1acb540
Add cross-references between skills for better discoverability
KyleAMathews Jan 31, 2026
95cd904
Add patterns from tanstack-db-web-starter to skills
KyleAMathews Jan 31, 2026
2cbc164
Remove drizzle-zod schema code from tanstack integration skill
KyleAMathews Jan 31, 2026
221559e
Add electric-drizzle skill for Drizzle ORM integration
KyleAMathews Jan 31, 2026
42e28e7
Add Zod v4 compatibility note to electric-drizzle skill
KyleAMathews Jan 31, 2026
11b30e0
Fix collection URL patterns and add preload documentation
KyleAMathews Jan 31, 2026
ae64dbf
Add pattern for passing arguments to shape proxy URLs
KyleAMathews Jan 31, 2026
61398cd
Sync skills with source docs and standardize env vars
KyleAMathews Jan 31, 2026
8c47477
Add ELECTRIC_INSECURE: true to Docker compose dev example
KyleAMathews Feb 1, 2026
e493003
Improve skill discoverability and add error troubleshooting
KyleAMathews Feb 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/add-agent-skills.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@electric-sql/playbook': minor
'@electric-sql/client': patch
---

Add `@electric-sql/playbook` package with AI coding assistant skills for building Electric apps. Includes CLI commands (`install`, `list`, `show`) and skills for quickstart, TanStack integration, security checks, deployment, and production readiness. Also adds skills directory to `@electric-sql/client` with shapes, auth, and HTTP API reference skills.
5 changes: 3 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- 'packages/typescript-client/**'
- 'packages/react-hooks/**'
- 'packages/y-electric/**'
- 'packages/playbook/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -37,6 +38,6 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Packages
run: pnpm --filter @electric-sql/client --filter @electric-sql/react --filter @electric-sql/y-electric run build
run: pnpm --filter @electric-sql/client --filter @electric-sql/react --filter @electric-sql/y-electric --filter @electric-sql/playbook run build
- name: Publish Previews
run: pnpx pkg-pr-new publish --pnpm --compact './packages/typescript-client' './packages/react-hooks' './packages/y-electric'
run: pnpx pkg-pr-new publish --pnpm --compact './packages/typescript-client' './packages/react-hooks' './packages/y-electric' './packages/playbook'
82 changes: 82 additions & 0 deletions .github/workflows/skill-staleness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Skill Staleness Check

on:
pull_request:
paths:
# Source files that skills reference
- 'AGENTS.md'
- 'website/docs/**/*.md'
- 'packages/typescript-client/src/**/*.ts'
# The skills themselves
- 'packages/agent/skills/**/*.md'
- 'packages/typescript-client/skills/**/*.md'

jobs:
check-staleness:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Get changed files
id: changed-files
run: |
# Get the list of changed files
git diff --name-only origin/${{ github.base_ref }}...HEAD > changed-files.txt
echo "Changed files:"
cat changed-files.txt

- name: Check skill staleness
id: staleness
continue-on-error: true
run: |
exit_code=0
node scripts/check-skill-staleness.mjs changed-files.txt > staleness-report.txt 2>&1 || exit_code=$?
echo "exit_code=$exit_code" >> $GITHUB_OUTPUT

- name: Comment on PR
if: steps.staleness.outputs.exit_code == '1'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const report = fs.readFileSync('staleness-report.txt', 'utf8');

// Check if we already commented
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});

const botComment = comments.find(c =>
c.user.type === 'Bot' &&
c.body.includes('Skills potentially affected by this PR')
);

const body = `🤖 **Agent Skills Staleness Check**\n\n${report}`;

if (botComment) {
// Update existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body,
});
} else {
// Create new comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body,
});
}
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ services:
command: ['postgres', '-c', 'config_file=/etc/postgresql/postgresql.conf']

backend:
image: electricsql/electric:canary
image: electricsql/electric:latest
environment:
DATABASE_URL: postgresql://postgres:password@postgres:5432/electric?sslmode=disable
ELECTRIC_INSECURE: true
Expand Down
79 changes: 79 additions & 0 deletions packages/playbook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# @electric-sql/playbook

Electric Playbook - skills for building apps with [Electric](https://electric-sql.com).

## Overview

This package provides AI agent skills that help coding assistants (Claude, Cursor, Copilot, etc.) build local-first applications with Electric and TanStack DB.

## Installation

```bash
npm install @electric-sql/playbook
```

## Usage

### CLI Commands

Install thin skill pointers to your agent's skills directory:

```bash
npx @electric-sql/playbook install
```

Install globally (to `~/.claude/skills`, etc.):

```bash
npx @electric-sql/playbook install --global
```

List available skills:

```bash
npx @electric-sql/playbook list
```

Output the full content of a skill:

```bash
npx @electric-sql/playbook show electric
```

### Finding Skills by Keyword

When you don't know the exact skill name, grep the installed package:

```bash
# Search for skills mentioning a keyword
grep -r "SSR" node_modules/@electric-sql/playbook/skills/

# Find all skill files
find node_modules -name "SKILL.md" -path "*playbook*"
```

### Skills

This package includes the following skills:

| Skill | Description |
| ------------------------------- | --------------------------------------------------------- |
| `electric` | Router skill - Electric ecosystem overview and navigation |
| `electric-quickstart` | Getting started with Electric + TanStack DB |
| `tanstack-start-quickstart` | Complete TanStack Start + Electric setup (SSR config) |
| `electric-tanstack-integration` | Deep integration patterns for Electric with TanStack DB |
| `electric-security-check` | Security audit checklist for Electric apps |
| `electric-go-live` | Production readiness checklist |
| `deploying-electric` | Deployment patterns (Cloud, Docker, self-hosted) |

Additional skills are available in other Electric packages:

- `@electric-sql/client` - `electric-shapes`, `electric-auth`, `electric-http-api`

## How It Works

Skills are markdown files with YAML frontmatter that provide context and instructions to AI coding assistants. When installed, thin pointers are created in your agent's skills directory that reference the full skill content in the npm package.

## License

Apache-2.0
46 changes: 46 additions & 0 deletions packages/playbook/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "@electric-sql/playbook",
"version": "0.0.2",
"description": "Electric Playbook - skills for building apps with Electric",
"type": "module",
"license": "Apache-2.0",
"author": "ElectricSQL team and contributors.",
"repository": {
"type": "git",
"url": "git+https://github.com/electric-sql/electric.git",
"directory": "packages/playbook"
},
"bugs": {
"url": "https://github.com/electric-sql/electric/issues"
},
"homepage": "https://electric-sql.com",
"bin": {
"electric-playbook": "./dist/cli/index.js"
},
"files": [
"dist",
"skills",
"README.md"
],
"exports": {
"./package.json": "./package.json",
"./skills/*": "./skills/*",
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"scripts": {
"build": "tsup",
"coverage": "echo 'No tests yet'",
"prepack": "pnpm build",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@types/node": "^20.10.0",
"tsup": "^8.0.1",
"typescript": "^5.5.2"
}
}
Loading
Loading