Fixed
Mastra Code hooks were silently doing nothing
Mastra Code reads lifecycle hooks from .mastracode/hooks.json, not from SKILL.md frontmatter (which is Claude Code's format). The existing Mastra integration had hooks defined only in SKILL.md, meaning all three hooks (PreToolUse, PostToolUse, Stop) were completely non-functional in Mastra Code. Plan enforcement, context injection, and completion checking were all silently skipped.
What changed
- Added
.mastracode/hooks.jsonwith proper Mastra Code format (matcher objects, timeouts, descriptions) - Fixed
MASTRACODE_SKILL_ROOTenv var in SKILL.md Stop hook (variable does not exist in Mastra Code, replaced with$HOMEfallback to local path) - Corrected
docs/mastra.mdto accurately describe the hooks.json system (removed false claim about "same hook system as Claude Code") - Fixed personal installation instructions to include the hooks.json copy step
- Bumped Mastra SKILL.md metadata version to 2.18.1
Files changed
.mastracode/hooks.json(new).mastracode/skills/planning-with-files/SKILL.mddocs/mastra.mdCHANGELOG.mdREADME.md
Contributors
Self-caught during integration audit. Shoutout to the Mastra team for building Claude Code compatibility into their skill discovery while keeping hooks in their own format.