Skip to content

Add Claude Code skill for database migrations to scaffolded projects#11

Merged
jalexw merged 1 commit into
mainfrom
claude/eloquent-cori-sCZ1b
Jun 2, 2026
Merged

Add Claude Code skill for database migrations to scaffolded projects#11
jalexw merged 1 commit into
mainfrom
claude/eloquent-cori-sCZ1b

Conversation

@jalexw

@jalexw jalexw commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR enhances the project initialization process by automatically installing the @schemavaults/dbh Claude Code skill into newly scaffolded projects. This enables AI coding agents to understand and author database migrations in the format established by the template.

Key Changes

  • src/index.ts: Added logic to run npx skills add schemavaults/dbh after auth codegen completes, with graceful error handling that warns users if the installation fails while allowing the project setup to continue
  • scripts/test.sh: Added assertions to verify the Claude Code skill was properly installed (checking for .claude/skills/database-migrations/ directory and SKILL.md file)
  • src/templates/readme.md.ts: Updated the Database Migrations section to document the included Claude Code skill and how to update it
  • README.md: Added explanation that the CLI installs the database-migrations Claude Code skill during project initialization
  • package.json: Bumped version from 0.0.49 to 0.0.50

Implementation Details

  • The skill installation uses --agent claude-code --copy --yes flags to ensure deterministic behavior and vendor real files (avoiding symlink issues in committed repositories)
  • Error handling is non-blocking: if skill installation fails, a warning is printed with instructions for manual installation, but project scaffolding completes successfully
  • The feature is documented in both the generated project's README and the CLI's own README for discoverability

https://claude.ai/code/session_013VHYeGtyxYgvT9rQQYq9Nj

…nto scaffolded projects

Upon initializing a new project, the CLI now runs `npx skills add` to copy the
@schemavaults/dbh database-migrations Claude Code skill into the new project's
.claude/skills/, so coding agents know how to author migrations in the format
this template scaffolds. Uses --copy so the vendored files are committable
(no symlinks into a global cache) and --agent claude-code for a deterministic
install target. The step is non-fatal: a network failure prints a warning with
the manual command rather than aborting an otherwise-ready scaffold.

https://claude.ai/code/session_013VHYeGtyxYgvT9rQQYq9Nj
@jalexw jalexw merged commit 133d89a into main Jun 2, 2026
3 checks passed
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.

2 participants