feat(better-auth): add use-better-auth workflow skill#159
Merged
Conversation
Add a hand-written `use-better-auth` skill under `plugins/better-auth/.agents/skills/use-better-auth/` that mirrors Vercel's `use-ai-sdk` workflow skill in structure and intent. The skill teaches agents to ground all better-auth work in the installed version by querying the source tree via the `ask` CLI (e.g. `ask src better-auth`) instead of relying on training-data knowledge that may be stale. Reference files cover adapters, plugins, database support, and common errors sourced from the actual package. This is a hand-written skill (no SYNC.md marker) and is not vendor-synced — it lives alongside the auto-synced better-auth skills without interfering with the sync pipeline. Also bumps plugin version 1.1.0 → 1.2.0 and prepends a 1.2.0 entry to CHANGELOG.md.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
No issues found across 7 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Agent as Agent (Claude)
participant CLI as ask CLI
participant FS as Local Source Code ($SRC)
participant Ref as Reference Docs (NEW)
participant App as App Code (Server/Client)
participant DB as Database
Note over Agent,Ref: Grounding Phase (NEW: use-better-auth skill)
Agent->>CLI: NEW: Get source path via "ask src better-auth"
CLI-->>Agent: Local path to library source
Agent->>FS: NEW: Enumerate plugins & adapters in $SRC
Note right of FS: Validates real exports instead of<br/>relying on stale training data
FS-->>Agent: Directory structure / index exports
Agent->>Ref: NEW: Consult reference/adapters.md
Ref-->>Agent: Framework-specific mounting logic
Note over Agent,App: Implementation Phase
Agent->>App: NEW: Generate auth.ts with verified plugins
Agent->>App: NEW: Generate framework-specific client (e.g. better-auth/react)
opt Schema Synchronization
Agent->>CLI: Run "npx auth generate"
CLI->>DB: Inspect/Diff database schema
DB-->>Agent: Schema drift status
end
alt Runtime/Type Error
Agent->>Ref: NEW: Check common-errors.md for symptom
Ref-->>Agent: Canonical fix (e.g. Secret strength, CORS)
Agent->>App: CHANGED: Apply version-aware fix
else Success
Agent-->>Agent: Finalize workflow
end
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new use-better-auth skill to the better-auth plugin, providing comprehensive documentation and reference guides for framework adapters, common errors, database configurations, and built-in plugins. It also bumps the plugin version to 1.2.0. However, the placement of the new skill files in the .agents/skills/ directory violates the repository's style guide, as this directory is reserved for externally managed skills and should not be modified directly when a skills-lock.json file is present.
Merged
amondnet
added a commit
that referenced
this pull request
Apr 23, 2026
Add a hand-written `use-mastra` skill under `plugins/mastra/.agents/skills/use-mastra/` that mirrors Vercel's `use-ai-sdk` workflow skill in structure and intent. Teaches coding agents to install the relevant `mastra` / `@mastra/*` package and read the docs shipped at `node_modules/<pkg>/dist/docs/SKILL.md` (and `references/*.md`) instead of relying on stale training-data APIs. Confirmed via `npm pack` that these packages ship `dist/docs/`: mastra, @mastra/core, @mastra/memory, @mastra/rag, @mastra/evals, @mastra/deployer, @mastra/server, @mastra/pg, @mastra/libsql, @mastra/mcp. Only @mastra/observability is remote-only. Keeps the existing `mastra` primer skill (v2.0.0, installed via skills.sh from `mastra-ai/skills`) untouched; `use-mastra` is the task-triggered workflow complement. Bumps plugins/mastra from 1.2.0 to 1.3.0 and logs the change in CHANGELOG.md (matching PR #159's format).
amondnet
added a commit
that referenced
this pull request
Apr 23, 2026
* feat(mastra): add use-mastra workflow skill Add a hand-written `use-mastra` skill under `plugins/mastra/.agents/skills/use-mastra/` that mirrors Vercel's `use-ai-sdk` workflow skill in structure and intent. Teaches coding agents to install the relevant `mastra` / `@mastra/*` package and read the docs shipped at `node_modules/<pkg>/dist/docs/SKILL.md` (and `references/*.md`) instead of relying on stale training-data APIs. Confirmed via `npm pack` that these packages ship `dist/docs/`: mastra, @mastra/core, @mastra/memory, @mastra/rag, @mastra/evals, @mastra/deployer, @mastra/server, @mastra/pg, @mastra/libsql, @mastra/mcp. Only @mastra/observability is remote-only. Keeps the existing `mastra` primer skill (v2.0.0, installed via skills.sh from `mastra-ai/skills`) untouched; `use-mastra` is the task-triggered workflow complement. Bumps plugins/mastra from 1.2.0 to 1.3.0 and logs the change in CHANGELOG.md (matching PR #159's format). * chore(mastra): apply AI code review suggestions - Update agent.generate() calls to nested memory: { thread, resource } API instead of the deprecated top-level threadId/resourceId fields (agents-and-workflows.md and common-errors.md). - Use createVectorQueryTool from @mastra/rag instead of createTool for the vector-query recipe in agents-and-workflows.md. Addresses cubic-dev-ai P1 + P2 suggestions on PR #161. * chore: update agent memory for cubic review PR #161
amondnet
added a commit
that referenced
this pull request
Apr 29, 2026
#164) * fix(mastra): move use-mastra skill to skills/ per repo convention The hand-written use-mastra skill was added at .agents/skills/use-mastra/ in #161, but .agents/skills/ is reserved for vendor-managed skills.sh output tracked in skills-lock.json (see CLAUDE.md). Move it to the default skills/ location and switch the plugin.json skills field to array form ["./skills/", "./.agents/skills/"] so both paths load. No skill content changed. Refs #161 * fix(better-auth): move use-better-auth skill to skills/ per repo convention The hand-written use-better-auth skill was added at .agents/skills/use-better-auth/ in #159, but .agents/skills/ is reserved for vendor-managed skills.sh output tracked in skills-lock.json (see CLAUDE.md). Move it to the default skills/ location and switch the plugin.json skills field to array form ["./skills/", "./.agents/skills/"] so both paths load. No skill content changed. Refs #159 * chore: revert manual CHANGELOG and version bumps (release-please owns them) Both CHANGELOG.md and plugin.json version are auto-managed by release-please for plugins/* (see release-please-config.json extra-files: [{ jsonpath: "$.version" }] and existing release PRs #158/#160/#163). Manual edits race with the next release PR. Skill relocations and the plugin.json `skills` array change remain intact — they're the actual fix release-please will pick up via the fix(...) commits already on this branch.
Merged
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
Adds a hand-written
use-better-authworkflow skill to thebetter-authplugin, mirroring the structure and intent of Vercel'suse-ai-sdkskill.What was added and where
plugins/better-auth/.agents/skills/use-better-auth/SKILL.md(216 lines, imperative voice, no second-person).../references/):adapters.md— supported framework adaptersplugins.md— built-in plugin cataloguedatabases.md— supported database adapterscommon-errors.md— common error patterns and fixesplugins/better-auth/.claude-plugin/plugin.json1.1.0 → 1.2.0plugins/better-auth/CHANGELOG.mdWhy hand-written instead of vendor-synced
This skill is a meta-skill that teaches agents how to work with better-auth, not end-user best-practices that belong upstream in the
better-authsource repository. Specifically:use-ai-sdkpattern from the Vercel plugin: ground every code-generation step in the installed package version by querying$(ask src better-auth)rather than trusting training-data knowledge that may be months behind the latest release.SYNC.md) are generated from upstream Gemini CLI extensions. There is no upstream source for this grounding skill — it was authored here intentionally..agents/skills/(notskills/) keeps it out of the auto-sync pipeline and avoids accidental overwrites on the nextbun run skills:sync.Verification
claude plugin validate plugins/better-authpasses with version 1.2.0.$(ask src better-auth)source tree (e.g.betterAuth,prismaAdapter,twoFactor,admin).skills-lock.jsonwas intentionally left untouched — it is managed exclusively bybunx skills add/ vendor sync.Summary by cubic
Adds a hand-written
use-better-authworkflow skill to thebetter-authplugin to ground auth work in the installed package version via theaskCLI. Mirrors theuse-ai-sdkpattern to provide accurate, version-aware guidance.New Features
plugins/better-auth/.agents/skills/use-better-auth/SKILL.mdthat queries localbetter-authsource to avoid stale APIs.references/for adapters, plugins, databases, and common errors sourced from the repo..agents/skills/to stay out of the vendor sync pipeline.Dependencies
CHANGELOG.md.Written for commit 404540d. Summary will update on new commits.