Skip to content

fix(skills): persist creator output directly - #17

Merged
iamjr15 merged 1 commit into
mainfrom
fix/skill-creator-direct-persistence
Jul 19, 2026
Merged

fix(skills): persist creator output directly#17
iamjr15 merged 1 commit into
mainfrom
fix/skill-creator-direct-persistence

Conversation

@iamjr15

@iamjr15 iamjr15 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • removes the obsolete skill proposal/confirmation flow from frontend, gateway, agent worker, shared schemas, and persistence helpers
  • makes native skill_create the request-scoped durable save boundary in Skill Creator mode
  • preserves complete authored packages, including references and scripts, by collecting from the exact authored sandbox slug before mirroring and indexing
  • cleans historical proposal message parts with a pre-deploy migration

Tracking

Direct production hardening requested in this workstream; no Linear issue or standalone plan document exists for this focused correction.

What's Included

Direct skill persistence

  • passes a user-scoped creator capability into Skill Creator runs only
  • validates the authored package slug and saves metadata, R2 package contents, and sandbox mirror before returning success
  • emits the existing data-skill-created UI event only after persistence completes

Legacy removal

  • deletes the proposal confirmation route, proposal schemas, confirmation UI, gateway forwarding, and redundant CLI creator
  • retains only open/delete HTTP actions for saved skills
  • removes historical data-skill-proposed parts with migration 0076

Package fidelity

  • reads the exact source directory authored by the agent
  • canonicalizes only SKILL.md metadata while retaining references, TypeScript entrypoints, schemas, scripts, and assets
  • refreshes the Skills registry and selects Files after creation

Decisions Made

Decision Choice Alternatives Considered Reasoning
Save boundary native skill_create call user approval card Skill Creator is an explicit user intent; a second confirmation was redundant and diverged from the target behavior
Package source exact authored slug derive folder solely from display name display-name canonicalization can differ from the folder the agent authored and would lose reference/script files
Historical records pre-deploy cleanup migration keep proposal schema forever removes legacy runtime branching while preserving valid transcript content

Edge Cases Handled

Scenario Handling
authored slug differs from display-name slug collect from the explicit source slug, then mirror under the canonical saved slug
sandbox package has no readable files fall back to canonical SKILL.md
tool is called outside Skill Creator mode fail explicitly because no request-scoped creator capability is present
existing skill name is recreated update the existing user skill and package in place

How to Review

  1. Start with packages/agent-core/src/mastra/tools/skill-tools.ts and agent-run-user-skills.ts for the save path.
  2. Review user-skill-packages.ts for full-package collection.
  3. Review deleted proposal routes/types/UI and migration 0076 for legacy cleanup.

Verification

  • pnpm turbo typecheck
  • pnpm turbo lint
  • pnpm turbo build
  • pnpm architecture:check
  • pnpm deadcode
  • direct authenticated browser run created Release Gate Companion without approval
  • Files selected automatically and .cheatcode/skills/release-gate-companion/references/checklist.md was present
  • Skills registry refreshed immediately and showed the saved skill
  • browser console contained no application errors

@iamjr15
iamjr15 merged commit df6e826 into main Jul 19, 2026
1 check passed
@iamjr15
iamjr15 deleted the fix/skill-creator-direct-persistence branch July 19, 2026 11:25
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.

1 participant