Commit Graph

50 Commits

Author SHA1 Message Date
Pedro Rodrigues
760460c221 chore: using mise to manage node versions and tasks (#44)
* add mise for Node.js version management

Replace ad-hoc Node version pinning with mise (mise.toml + mise.lock).
This ensures all contributors and CI use the same Node LTS version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* expand mise with env loading, PATH management, and task runner

- [env] _.file loads .env files for local API keys (replaces dotenv)
- [env] _.path adds node_modules/.bin to PATH for direct tool access
- [tasks] mirrors npm scripts with sources/outputs for file-based caching
- eval tasks for running LLM evaluations via mise run
- update AGENTS.md and CONTRIBUTING.md to use mise run commands

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:44:44 +00:00
Pedro Rodrigues
32142e85fd chore: build system skill body rebased (#43)
* chore: build system skill body (#42)

* feat: extract SKILL.md body into AGENTS.md with H1 title and Overview section

Build system now parses SKILL.md body to extract H1 heading as the AGENTS.md
title and places remaining content under an Overview section. Adds validation
that SKILL.md body starts with H1, directory name is kebab-case, and name
field matches directory name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: AGENTS.md is now SKILL.md body with frontmatter stripped

Build now generates AGENTS.md by extracting the SKILL.md markdown body
(everything after YAML frontmatter). CLAUDE.md remains a symlink to
AGENTS.md. Removes content generation logic (Structure, Usage, Overview,
Reference Categories, Available References sections) — SKILL.md is the
single source of truth for agent instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add Structure and Usage sections to AGENTS.md, validate H1 title matches directory name

Build now generates AGENTS.md as: H1 Title > Structure > Usage > rest of
SKILL.md body. Validates that SKILL.md body starts with H1 heading and
that the title in kebab-case matches the directory name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* chore: move .claude/ gitignore entry after generated skills pattern

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 15:02:16 +00:00
Pedro Rodrigues
c6f5a2bec0 chore: build system skill body (#42)
* feat: extract SKILL.md body into AGENTS.md with H1 title and Overview section

Build system now parses SKILL.md body to extract H1 heading as the AGENTS.md
title and places remaining content under an Overview section. Adds validation
that SKILL.md body starts with H1, directory name is kebab-case, and name
field matches directory name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: AGENTS.md is now SKILL.md body with frontmatter stripped

Build now generates AGENTS.md by extracting the SKILL.md markdown body
(everything after YAML frontmatter). CLAUDE.md remains a symlink to
AGENTS.md. Removes content generation logic (Structure, Usage, Overview,
Reference Categories, Available References sections) — SKILL.md is the
single source of truth for agent instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add Structure and Usage sections to AGENTS.md, validate H1 title matches directory name

Build now generates AGENTS.md as: H1 Title > Structure > Usage > rest of
SKILL.md body. Validates that SKILL.md body starts with H1 heading and
that the title in kebab-case matches the directory name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 17:14:49 +00:00
Tomás Pozo
9b236f3ebd feat: add schema-constraints reference for safe migration patterns (#30)
* feat: add schema-constraints reference for safe migration patterns

Documents correct approaches for adding constraints in PostgreSQL migrations,
since ADD CONSTRAINT IF NOT EXISTS is not supported and causes syntax errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Remove additional correct options

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 17:14:38 +00:00
Dev-iL
0d88c8a3e4 Include GiST index type in query index types documentation (#33)
Added GiST index type for geometric data and nearest-neighbor queries.
2026-02-09 17:10:16 +00:00
Wen Bo Xie
dfd956df58 fix: add MIT license file (#35) 2026-02-09 17:05:45 +00:00
Pedro Rodrigues
22e466937a fix: require reference files at root of references/ directory (#32)
Remove support for nested subdirectories in references/.
All markdown reference files must now be placed directly in
the references/ directory (e.g., references/auth-signup.md).

- Replace getMarkdownFilesRecursive with getMarkdownFiles (flat)
- Simplify parseAllSections to only read root _sections.md
- Update getReferenceFiles to skip subdirectories
- Keep deprecated getMarkdownFilesRecursive alias for compatibility

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:39:59 +00:00
Pamela Chia
5e27342d4a fix(marketplace): correct skills path to match folder name (#31) 2026-01-29 15:35:54 +00:00
Pedro Rodrigues
c29e9dd8e0 ci: add sanity test npx skills add (#29)
* fix: remove CLAUDE.md symlink generation from build

The CLAUDE.md symlink causes installation errors when using
`npx skills add` as it tries to copy AGENTS.md to itself.

- Remove createClaudeSymlink function from build.ts
- Remove claudeSymlink from SkillPaths interface
- Remove CLAUDE.md references from AGENTS.md structure documentation
- Delete existing CLAUDE.md symlink from skills directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test: add sanity test for skills installation

Add a sanity test that verifies the skills CLI installation works:
- Runs `npx skills add . -a claude-code -y` using current directory
- Checks command doesn't fail (exit code 0)
- Verifies .claude/skills directory is created
- Dynamically discovers skills in the repo and verifies they're installed
- Checks SKILL.md exists in each installed skill

The test runs on every push to main and pull requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Revert "fix: remove CLAUDE.md symlink generation from build"

This reverts commit c07c234601.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:41:05 +00:00
Pedro Rodrigues
a3b815155c reduxe the agents.md file size (#20) 2026-01-27 21:38:29 +00:00
Pedro Rodrigues
5da9a5ee37 feat: add subdirectory support for reference files (#18)
- Add getMarkdownFilesRecursive() for recursive file scanning
- Add parseAllSections() to parse _sections.md from subdirectories
- Add parseSectionsFromFile() helper function
- Update buildSkill() and validateSkill() to use new functions
- Export new functions for use by validate.ts

This allows organizing reference files in product-specific subdirectories
(e.g., references/db/ for database files) while keeping _sections.md in
each subdirectory.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 18:34:52 +00:00
Pedro Rodrigues
e5417d1a90 fix: add how to write a skill to agent.md (#16) 2026-01-27 17:07:36 +00:00
Pedro Rodrigues
7aa8ecc25f chore: remove unused using-supabase skill sections (#15)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 21:00:46 +00:00
Pedro Rodrigues
f421451c79 chore: comply with agent skills open stardard (#14) 2026-01-26 15:22:35 +00:00
Pedro Rodrigues
1712854a51 chore: add lint and format commands to agents.md (#13) 2026-01-26 13:17:52 +00:00
Pedro Rodrigues
886305b7bb chore: ignore ai agents directories (#11) 2026-01-26 12:33:52 +00:00
Salman Chishti
3a531f5c1a Upgrade GitHub Actions for Node 24 compatibility (#10)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-01-25 21:11:46 +00:00
Pedro Rodrigues
bbde7ff5f8 refactor: generic skills build system with auto-discovery (#8)
* refactor: generic skills build system with auto-discovery

- Rename postgres-best-practices-build → skills-build
- Add auto-discovery: scans skills/ for subdirectories with metadata.json
- Build/validate all skills or specific skill with -- argument
- Update root AGENTS.md and CONTRIBUTING.md with new structure
- No configuration needed to add new skills

Usage:
  npm run build                    # Build all skills
  npm run build -- skill-name      # Build specific skill
  npm run validate                 # Validate all skills

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix ci

* more generic impact levels

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:56:11 +00:00
Pedro Rodrigues
4b49188895 fix format 2026-01-23 12:06:36 +00:00
Pedro Rodrigues
f7ed8652a1 add skills creator skills for claude code 2026-01-23 01:28:59 +00:00
Pedro Rodrigues
dd27f4f4fb configure supabase mcp server 2026-01-23 01:25:53 +00:00
Pedro Rodrigues
201b4450f0 fix skill.md 2026-01-23 00:51:35 +00:00
Pedro Rodrigues
7b1a65007b automatically reorder sections on agents.md by priority 2026-01-22 08:48:47 +00:00
Pedro Rodrigues
a1fbd23d4b turn rls basics critical 2026-01-22 08:32:12 +00:00
Pedro Rodrigues
f323d3b601 Add Biome formatter/linter and restore CI workflow (#6)
- Install Biome as the project formatter and linter
- Configure Biome with recommended settings
- Add format, lint, and check scripts to package.json
- Restore CI workflow from git history (commit 0a543e1)
- Extend CI with new Biome job for format and lint checks
- Apply Biome formatting to all TypeScript files
- Fix linting issues (use node: protocol, template literals, forEach pattern)

CI now runs on:
- All pushes to main branch
- All pull requests

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 08:28:49 +00:00
Pedro Rodrigues
0ffac720f0 bump security and RLS to critical 2026-01-22 08:20:54 +00:00
Pedro Rodrigues
f9cd8f25f4 add og to readme 2026-01-22 08:03:02 +00:00
Pedro Rodrigues
a28867c5ff rewrite marketplace.json 2026-01-21 19:35:24 +00:00
Pedro Rodrigues
95dd3c3eb7 final final review 2026-01-21 17:10:04 +00:00
Pedro Rodrigues
22326104d3 add contributing.md file 2026-01-21 17:06:09 +00:00
Pedro Rodrigues
221215b707 final review 2026-01-21 16:53:34 +00:00
Pedro Rodrigues
663d784e24 remove extract tests 2026-01-21 16:44:38 +00:00
Pedro Rodrigues
c63a5fa509 second reviewe 2026-01-21 16:32:52 +00:00
Pedro Rodrigues
5c9d145adf first review 2026-01-21 16:10:36 +00:00
Pedro Rodrigues
16027b1609 change readme description 2026-01-21 16:03:56 +00:00
Pedro Rodrigues
6c42207a93 docs: add Claude Code plugin installation instructions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:59:54 +00:00
Pedro Rodrigues
34b421243c Add marketplace json (#5)
* feat: add marketplace.json for Claude Code plugin distribution

Add .claude-plugin/marketplace.json to enable distribution of the
postgres-best-practices skill as a Claude Code plugin.

Users can install via:
  /plugin marketplace add supabase/agent-skills
  /plugin install postgres-best-practices@supabase-postgres

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: add plugin.json manifest for postgres-best-practices skill

Add .claude-plugin/plugin.json inside the skill directory to properly
define this as a Claude Code plugin. This is required by the marketplace
specification - each plugin must have its own plugin.json manifest.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: update marketplace name and description for broader scope

- Rename marketplace from supabase-postgres to supabase-plugins
- Update description to reflect this as the official Supabase agent skills repo

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* minor fixes

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:54:32 +00:00
Pedro Rodrigues
aa951e2de8 Fix abstract text in metadata.json 2026-01-21 15:41:51 +00:00
Pedro Rodrigues
8df22b058d chore: bump version to 1.0.0 (#4)
Update version from 0.1.0 to 1.0.0 across all files:
- skills/postgres-best-practices/AGENTS.md
- skills/postgres-best-practices/SKILL.md
- skills/postgres-best-practices/metadata.json
- packages/postgres-best-practices-build/package.json
- packages/postgres-best-practices-build/package-lock.json
- packages/postgres-best-practices-build/src/build.ts

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:40:53 +00:00
Pedro Rodrigues
0666f21a0c Add installation command (#3) 2026-01-21 15:36:33 +00:00
Pedro Rodrigues
ea93449304 Revert "add ci job"
This reverts commit 5d2a4ee329.
2026-01-21 15:25:02 +00:00
Pedro Rodrigues
5d2a4ee329 add ci job 2026-01-21 15:23:25 +00:00
Pedro Rodrigues
a1b0257ec2 feat: Add initial PostgreSQL best practices rules (#1)
* Add 30 PostgreSQL best practices rules

Rules organized in 8 categories:
- Query Performance (5): indexes, partial indexes, composite, covering, types
- Connection Management (4): pooling, limits, idle timeout, prepared statements
- Schema Design (4): data types, primary keys, foreign key indexes, partitioning
- Concurrency & Locking (4): short transactions, SKIP LOCKED, advisory, deadlocks
- Security (3): RLS basics, RLS performance, privileges
- Data Access Patterns (4): N+1 queries, pagination, upsert, batch inserts
- Monitoring (3): EXPLAIN ANALYZE, pg_stat_statements, VACUUM/ANALYZE
- Advanced Features (3): JSONB indexing, full-text search, CTE materialization

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update skills/postgresql-best-practices/rules/schema-primary-keys.md

Co-authored-by: samrose <samuel.rose@gmail.com>

* Update skills/postgresql-best-practices/rules/lock-deadlock-prevention.md

Co-authored-by: samrose <samuel.rose@gmail.com>

* resolve merge conflicts from postgres team suggestions

* Delete GETTING_STARTED.md

* Restore all 30 rule files that were lost during rebase

* update agents.md

* remove postgres 11 mention to advanced cte optimization

* update agents.md

* replace advanced cte with check contraints

* replace check contraints with schema lowercase identifiers

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: samrose <samuel.rose@gmail.com>
2026-01-21 15:09:06 +00:00
Pedro Rodrigues
6cd3bcf6b7 Add root package.json with build and validate scripts 2026-01-19 20:02:44 +00:00
Pedro Rodrigues
892387b1b7 Update template files: rename postgresql to postgres 2026-01-19 19:52:53 +00:00
Pedro Rodrigues
06a4e68d30 Rename postgresql to postgres (keeping only existing files) 2026-01-19 19:31:34 +00:00
Pedro Rodrigues
9ac9bcc495 Dremove installation step 2026-01-16 15:17:10 +07:00
Pedro Rodrigues
4000ac7107 add info to project root 2026-01-16 14:33:29 +07:00
Pedro Rodrigues
54ff36b38e small fixes 2026-01-16 14:22:53 +07:00
Pedro Rodrigues
0a543e1b4a Initial setup: PostgreSQL best practices repository
Skeleton structure for Supabase PostgreSQL experts to add performance
optimization rules. Modeled after Vercel's react-best-practices-build.

Includes:
- Build system (parser, validator, builder)
- Skill manifest and metadata
- Rule templates and writing guidelines
- CI workflow for validation
- Getting started guide for Postgres team

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:52:32 +07:00