Resilient CLI setup flow with graceful error handling#65
Resilient CLI setup flow with graceful error handling#65
Conversation
37 tables across 13 migrations covering CRM, pipeline management, project/task tracking, helpdesk, messaging, content/docs, billing (Stripe-ready), calendar, automations, tags/custom fields, and activity logging. Includes RLS policies, seed data, example queries, and documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…docs - Replace skene-ai/skene-db with SkeneTechnologies/skene-db in all clone URLs - Add missing roles and permissions tables to Identity section in box diagram - Split custom_fields into custom_field_definitions and custom_field_values - Simplify footer to "RLS on every table" since roles is now listed above Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… Supabase Refactors the monolithic migration into 11 independently installable skills, each with its own migration.sql, seed.sql, manifest.json, and SKILL.md. 37 tables, RLS policies inlined per skill, dependency resolution via scripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Centered hero, shields badges, HTML table for skill cards, collapsible FAQ, schema design table, and clearer getting-started flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename supabase-skills/ to skills/ (flat structure, no nested skills/) - Rebrand from "Supabase Skills" to "Skene Skills" across all files - Change manifest author to "skene-ai" - Add 8 new skills: forms, notifications, campaigns, commerce, knowledge, approvals, integrations, compliance (each with migration, seed, SKILL.md) - Full README rewrite with Skene branding, CLI examples, demo section - Update dependency tree, schema diagram, install/reset scripts for 19 skills - Total: 19 skills, 72 tables, all with RLS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix support skill dependency: identity -> crm in README and dependencies.md - Standardize all 72 triggers to trg_<table>_updated_at naming convention - Fix dependency tree and install order for support skill - Add seed data cross-dependency comments to analytics and calendar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…engine demo - Rebrand from "Skene DB" to "Skene Skills" throughout - Add "Why Skene Skills exist" section: AI build gap, 80% identical schema, 2-week AI agent head start, data ownership with Salesforce/Slack and Meta/WhatsApp examples - Primary install via `npx skills add` (skills.sh), direct SQL as fallback - Expand from 12 to 19 skills with dependency tree - Add Skene Engine demo GIF (animated journey map generation) - Follow Agent Skills open standard (agentskills.io) with SKILL.md format - Unicode box-drawing header matching skene repo style - Updated comparison table, FAQ, and contributing guide Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Removed decorative ASCII art header from README.
- Add "Backend skills for your Supabase" tagline below logo in README - Add releases.json for update notification mechanism across repos - Add missing COMMENT ON TABLE statements to billing migration for consistency with the other 18 skills Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace stale PLG toolkit content with skills-first messaging: install command, skills table, build combos, and clean monorepo overview. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit ed8bbd3.
- Remove empty code fence artifact at top - Add "Backend skills for your Supabase" tagline under logo - Move demo gif below install command and value prop - Remove redundant Journey Map nav link - Lead with text, not media Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Blocking fixes: - #1: Move enums above helper functions in identity/migration.sql so get_user_role() can resolve membership_role on fresh install - #2: Scope reset.sh to only drop skill-tracked enums (extracted from migration files), not all public enums. Remove 2>/dev/null error silencing so failures are visible - #3: Fix root README referencing nonexistent `skene install <skill>` command — now points to `npx skills add` - #8: Fix shell injection in install.sh and reset.sh — pass manifest path via sys.argv instead of string interpolation Monorepo/CI fixes: - #4: Add skills/** to paths-ignore in ci.yml so SQL changes don't trigger the Python test matrix - #5: Add skills-ci.yml with sqlfluff lint and Postgres integration test that runs install.sh against an ephemeral database - #6: Add /skills/ owner (@teekoo5) to CODEOWNERS - #7: Remove no-op !skills/ negation from .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix identity migration ordering: enums first, then trigger (plpgsql), then tables, then SQL helper functions that reference those tables. Verified against clean Supabase instance. - Add source citations for Salesforce/Slack and Meta/WhatsApp policy claims in skills README (Computerworld, EC, AGCM) - Regenerate demo GIF from source video at 720px/15fps for better quality - Add .gstack/ to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create skills/package.json (v0.3.1, scoped to @skene) - Add skills-publish.yml workflow triggered on skills-v* releases - Update RELEASING.md with Skills release docs and checklist - Update SKILL.md frontmatter to match npm package name Package includes 19 skills (85 files, 341 KB compressed): migration.sql, seed.sql, manifest.json, SKILL.md per skill, plus scripts/, docs/, and root README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- skills/README.md: npm install as primary in hero, Quick Start, and How Installation Works sections. Add npm badge. - skills/SKILL.md: add npm install to installation section - README.md: update monorepo table to link to npm package - FAQ: mention npm install alongside skills.sh and psql Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Single setup.mjs script that guides users from install to running schema. Detects Supabase connection automatically via env vars and Supabase CLI before falling back to prompting. SKILL.md rewritten as an agent playbook — MCP-first detection, preset selection, lifecycle display, and Skene Cloud promotion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npm strips bin entries with .mjs extension. Adding "type": "module" to package.json allows .js files to use ESM imports natively. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npm pkg fix normalized the bin path, chmod +x for the shebang to work. Bump to 0.4.2. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npx @skene/database-skills crm --seed now does everything: installs itself into the project, detects Supabase, applies migrations, loads demo data, shows Skene Cloud promotion. No separate npm install needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Restructure main() so skill summary and Skene Cloud promotion always display before any connection attempt - Add --dry-run/--plan flag to inspect install plan without connecting - Replace silent catch blocks in detectSupabase() with diagnostic messages - Add classifyConnectionError() with Supabase-specific guidance (IPv6-only hosts, pooler auth, DNS, SSL) - Add printManualInstructions() with psql, MCP, and dashboard fallbacks - Fix ensureInstalled() self-installing into its own package.json - Fix channel_type enum conflict between support and comms migrations - Fix commerce manifest missing identity dependency (fulfillments → users FK) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a47cbb3485
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/skene_test | ||
| run: | | ||
| chmod +x skills/scripts/install.sh | ||
| skills/scripts/install.sh --seed all |
There was a problem hiding this comment.
Avoid rerunning migrations in the seed CI step
The workflow installs all skills in Install all skills, then runs skills/scripts/install.sh --seed all later, but install.sh always applies every migration.sql before seeding. Because these migrations use non-idempotent CREATE TYPE/CREATE TABLE statements, the second invocation will hit already exists errors and fail the install-test job instead of validating seeding.
Useful? React with 👍 / 👎.
| // psql | ||
| console.log(' 1. Direct SQL (psql or any Postgres client)\n'); | ||
| for (const name of installOrder) { | ||
| console.log(` psql "$DATABASE_URL" -f ${name}/migration.sql`); |
There was a problem hiding this comment.
Emit valid migration paths in manual fallback commands
The direct psql fallback prints -f ${name}/migration.sql, which is relative to the caller’s current directory, but these files live under the package directory (resolved elsewhere with join(__dirname, ...)). When users run via npx @skene/database-skills from a normal project root, those printed paths usually do not exist, so the primary manual recovery instructions fail.
Useful? React with 👍 / 👎.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
setup.jsso the skill summary and Skene Cloud promotion always display before any connection attempt — users see what they're getting even when the DB connection fails--dry-run/--planflag to inspect install plans without connectingcatch {}blocks with diagnostic messages showing what was triedclassifyConnectionError()with Supabase-specific guidance (IPv6-only hosts, pooler auth, DNS, SSL)printManualInstructions()with psql, MCP, and dashboard fallbacksensureInstalled()self-referencing its ownpackage.jsonchannel_typeenum conflict between support and comms migrationsTest plan
npx @skene/database-skills crm --dry-run— shows skill summary, lifecycles, manual instructions, exits cleanlynpx @skene/database-skills full --dry-run— lists all 19 skills (72 tables)npx @skene/database-skills crm --db <valid_url> --seed— happy path unchangednpx @skene/database-skills crm --db postgres://bad:url@nowhere— shows categorized error + manual instructions🤖 Generated with Claude Code