Repository navigation
Add TanStack Intent skills for AI agent guidance - #3956
Merged
Merged
Conversation
…dance Add 9 skills covering shapes, proxy auth, schema design, debugging, deployment, new feature setup, ORM integration, Postgres security, and Yjs collaboration. Includes CI workflows for skill validation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3956 +/- ##
===========================================
+ Coverage 75.75% 88.78% +13.02%
===========================================
Files 11 25 +14
Lines 693 2425 +1732
Branches 171 611 +440
===========================================
+ Hits 525 2153 +1628
- Misses 167 270 +103
- Partials 1 2 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Remove redundant Tension sections (already covered by Common Mistakes) - Remove duplicated auth code from shapes skill (exists in proxy-auth) - Fix y-electric library_version to 0.1.36 (was incorrectly 1.5.10) - Rename notify-playbooks.yml to notify-intent.yml to match purpose - Remove _artifacts/ from tracking and add to .gitignore - Remove dead readFileSync in check-skills.yml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
balegas
approved these changes
Mar 6, 2026
- Add dev environment docker-compose setup to electric-new-feature - Add parser vs schema dual-path mistake (sync bypasses TanStack DB schema) - Inline common auto-parsed types with reference pointer in shapes/new-feature - Document txid type flexibility (number | bigint | string) in schema-shapes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add wal_level=logical, sslmode=disable, tmpfs to docker-compose - Match repo's canonical docker-compose pattern (tanstack-db-web-starter) - Show complete transaction with pg_current_xact_id() in same tx as mutation - Emphasize txid must be queried inside the same transaction Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace non-existent createServerFileRoute with correct createFileRoute + server.handlers pattern from tanstack-db-web-starter example - Add concrete Zod schema definition (todoSchema was referenced but undefined) - Replace abstract api.todos.create() with concrete mutation endpoint showing INSERT + pg_current_xact_id() in same transaction - Add /v1/shape path and Electric Cloud auth conditional to proxy example - Make proxy route framework-agnostic with note to use your framework's pattern Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
This PR has been released! 🚀 The following packages include changes from this PR:
Thanks for contributing to Electric! |
alco
pushed a commit
that referenced
this pull request
Mar 9, 2026
## Summary Add [TanStack Intent](https://github.com/TanStack/intent) skills to `@electric-sql/client` and `@electric-sql/y-electric` so AI coding agents can work with Electric correctly out of the box. Ships 9 skills covering the full developer journey from shape setup to production deployment. ## Approach Skills were generated using the `@tanstack/intent scaffold` workflow: 1. **Domain Discovery** — analyzed source code, docs, and maintainer interview to map 5 domains and 35 failure modes 2. **Tree Generator** — chose flat structure across 2 packages (8 skills in typescript-client, 1 in y-electric) 3. **Skill Generation** — wrote SKILL.md files with setup patterns, code examples verified against source, and wrong/correct mistake pairs Each skill targets a specific task (not a concept), with code examples validated against the current source at `v1.5.10`. ### Skills | Skill | Package | Type | Key coverage | |-------|---------|------|-------------| | `electric-shapes` | client | core | ShapeStream/Shape config, onError contract, WHERE clauses, type parsers | | `electric-proxy-auth` | client | core | Server proxy setup, ELECTRIC_PROTOCOL_QUERY_PARAMS, secret injection | | `electric-schema-shapes` | client | core | Schema + shape co-design, REPLICA IDENTITY FULL, replica modes | | `electric-debugging` | client | lifecycle | Error retry behavior, MissingHeadersError, fast-loop detection | | `electric-deployment` | client | lifecycle | Docker Compose, env vars, health checks, replication slot cleanup | | `electric-new-feature` | client | lifecycle | Full 5-step setup: schema → proxy → collection → queries → mutations | | `electric-orm` | client | composition | Drizzle/Prisma txid patterns, migration with REPLICA IDENTITY | | `electric-postgres-security` | client | security | Pre-deploy checklist: roles, grants, WAL, connection, publication | | `electric-yjs` | y-electric | composition | ElectricProvider, BYTEA parsing, resume state, awareness | ### Non-goals - No framework-specific skills (TanStack DB handles React/Vue/etc.) - No multi-shape-sync skill (experimental feature, may be removed) - No runtime code changes ### CI Workflows - `validate-skills.yml` — validates SKILL.md files on PRs touching `skills/` - `check-skills.yml` — checks for stale skills on release, opens review PR - `notify-intent.yml` — notifies TanStack/intent when source or docs change ## Verification ```bash cd packages/typescript-client && npx @tanstack/intent validate skills/ cd packages/y-electric && npx @tanstack/intent validate skills/ ``` Both pass with no errors or warnings. ## Files changed - `packages/typescript-client/skills/` — 8 SKILL.md files + 2 reference files (WHERE clause syntax, type parsers) - `packages/y-electric/skills/` — 1 SKILL.md file - `packages/*/package.json` — added `skills` + `bin` to `files`, `@tanstack/intent` devDependency, `bin` entry - `packages/*/bin/intent.mjs` — intent CLI shim - `.github/workflows/` — 3 new workflow files - `.gitignore` — added `_artifacts` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add TanStack Intent skills to
@electric-sql/clientand@electric-sql/y-electricso AI coding agents can work with Electric correctly out of the box. Ships 9 skills covering the full developer journey from shape setup to production deployment.Approach
Skills were generated using the
@tanstack/intent scaffoldworkflow:Each skill targets a specific task (not a concept), with code examples validated against the current source at
v1.5.10.Skills
electric-shapeselectric-proxy-authelectric-schema-shapeselectric-debuggingelectric-deploymentelectric-new-featureelectric-ormelectric-postgres-securityelectric-yjsNon-goals
CI Workflows
validate-skills.yml— validates SKILL.md files on PRs touchingskills/check-skills.yml— checks for stale skills on release, opens review PRnotify-intent.yml— notifies TanStack/intent when source or docs changeVerification
Both pass with no errors or warnings.
Files changed
packages/typescript-client/skills/— 8 SKILL.md files + 2 reference files (WHERE clause syntax, type parsers)packages/y-electric/skills/— 1 SKILL.md filepackages/*/package.json— addedskills+bintofiles,@tanstack/intentdevDependency,binentrypackages/*/bin/intent.mjs— intent CLI shim.github/workflows/— 3 new workflow files.gitignore— added_artifacts🤖 Generated with Claude Code