Agent skill

Mastra Integration

by helloxz in helloxz/znote

Mastra AI framework integration guide for building TypeScript agents with skills, workflows, and memory

AGPL-3.0Auto-check passedAI & LLM Engineering

Install Mastra Integration

skills CLI
$ npx skills add helloxz/znote --skill mastra-integration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install helloxz/znote mastra-integration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/helloxz/znote.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/mastra-integration .claude/skills/mastra-integration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mastra-integration
GitHub stars
104
Token cost
~643 tokens
SKILL.md length
110 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Mastra AI framework integration guide for building TypeScript agents with skills, workflows, and memory

  • AI & LLM Engineering work in your project
  • SKILL.md covers What I do, When to use me, Core Concepts and References
  • Needs OPENAI_API_KEY and ANTHROPIC_API_KEY

What it does

Mastra Integration is an agent skill from helloxz/znote. Mastra AI framework integration guide for building TypeScript agents with skills, workflows, and memory

Its SKILL.md is about 640 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering. It works with Mastra, TypeScript and OpenAI. The repository describes itself as: ZNote是一款小而美的纯笔记应用,原生支持 Markdown 所见即所得,一处部署,随处可用。 The licence is AGPL-3.0.

When your agent uses it

  • AI & LLM Engineering work in your project

Example prompts

  • “/mastra-integration”

Requirements

  • A credential in OPENAI_API_KEY
  • A credential in ANTHROPIC_API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 80c58f1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • mastra.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY
    • ANTHROPIC_API_KEY
    • GOOGLE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mastra Integration loads about 643 tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 110 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~643

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from helloxz/znote at commit 80c58f1, republished under its AGPL-3.0 licence (© helloxz). 110 words, ~643 tokens.

Download SKILL.mdSave it as .claude/skills/mastra-integration/SKILL.md (or your agent's skills folder).
name
mastra-integration
description
Mastra AI framework integration guide for building TypeScript agents with skills, workflows, and memory

What I do

  • Help integrate Mastra AI framework into TypeScript projects
  • Guide on creating agents with createSkill() and Agent classes
  • Provide best practices for skills, workflows, and memory configuration
  • Assist with Mastra's model router and provider setup

When to use me

Use this skill when:

  • Building AI agents with Mastra framework
  • Creating reusable skills for Mastra agents
  • Setting up workflows and memory systems
  • Configuring model providers (OpenAI, Anthropic, Google)

Core Concepts

Creating Skills
typescript
import { createSkill } from '@mastra/core/skills'

const mySkill = createSkill({
  name: 'skill-name',
  description: 'What this skill does',
  instructions: `Detailed instructions for the agent...`,
  references: {
    'doc.md': '# Reference content...',
  },
})
Creating Agents
typescript
import { Agent } from '@mastra/core/agent'
import { mySkill } from './skills/my-skill'

export const agent = new Agent({
  id: 'agent-id',
  name: 'Agent Name',
  instructions: 'Agent behavior instructions...',
  model: 'openai/gpt-5.5',  // provider/model format
  skills: [mySkill],
})
Model Router Format

Use provider/model format (not provider:model):

  • openai/gpt-5.5
  • anthropic/claude-sonnet-4-6
  • google/gemini-2.5-flash
Environment Variables
  • OpenAI: OPENAI_API_KEY
  • Anthropic: ANTHROPIC_API_KEY
  • Google: GOOGLE_API_KEY
Project Structure
src/
├── mastra/
│   ├── index.ts          # Mastra entry point
│   ├── agents/
│   │   └── my-agent.ts
│   ├── skills/
│   │   └── my-skill.ts
│   └── tools/
│       └── my-tool.ts
Entry Point
typescript
import { Mastra } from '@mastra/core'
import { myAgent } from './agents/my-agent'

export const mastra = new Mastra({
  agents: { myAgent },
})
Dynamic Skills
typescript
export const agent = new Agent({
  id: 'dynamic-agent',
  model: 'openai/gpt-5.5',
  skills: ({ requestContext }) => {
    const role = requestContext.get('userRole')
    if (role === 'developer') return [devSkill]
    return [supportSkill]
  },
})
Programmatic Access
typescript
const skill = await agent.getSkill('skill-name')
const allSkills = await agent.listSkills()

References

© helloxz, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .opencode/skills/mastra-integration of helloxz/znote.

Open the folder on GitHubat commit 80c58f1

Compare with similar skills

Mastra Integration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mastra Integration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mastra Integration this skillhelloxz/znote104—~643Automated safety check: PassAGPL-3.0
Trigger.dev Agent Patternspapermark/papermark9.2k—~2kAutomated safety check: PassCustom licence
Add Example AgentGetBindu/Bindu10k—~1.1kAutomated safety check: NotesCustom licence
Claude APIKocoro-lab/Kocoro4147 repos~4.5kAutomated safety check: PassApache-2.0
Agent Squad for TypeScript2FastLabs/agent-squad7.8k—~4.3kAutomated safety check: PassApache-2.0
MastraLiorVainer/data-israel1302 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Trigger.dev Agent Patterns

    papermark/papermark

    Patterns for building LLM agents on Trigger.dev tasks: prompt chaining, routing, parallel workers, orchestrator-workers, evaluator loops and human approval gates.

    9.2k GitHub stars~2k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Add Example Agent

    GetBindu/Bindu

    Add a new self-contained example agent under examples/. An agent skill from GetBindu/Bindu.

    10k GitHub stars~1.1k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check: notes
  • Claude API

    Kocoro-lab/Kocoro

    Build apps with the Claude API or Anthropic SDK. An agent skill from Kocoro-lab/Kocoro.

    414 GitHub starsUsed in 7 repos~4.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Agent Squad for TypeScript

    2FastLabs/agent-squad

    Guide to building Node.js and TypeScript apps on the agent-squad package: orchestrator, agent types, classifier routing, storage, retrievers and MCP tools.

    7.8k GitHub stars~4.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Mastra

    LiorVainer/data-israel

    Comprehensive Mastra framework guide. An agent skill from LiorVainer/data-israel.

    130 GitHub starsUsed in 2 repos~1.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Duel Agents

    2aronS/Duel-Agents

    Use Duel Agents model routing in Cursor. An agent skill from 2aronS/Duel-Agents.

    745 GitHub stars~228 tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed

Questions about Mastra Integration

What does Mastra Integration do?

Mastra AI framework integration guide for building TypeScript agents with skills, workflows, and memory. Mastra Integration is an agent skill from helloxz/znote.

When should I use Mastra Integration?

Mastra Integration fits situations like: AI & LLM Engineering work in your project.

How do I install Mastra Integration in Claude Code?

Run `npx skills add helloxz/znote --skill mastra-integration -a claude-code`. Or copy the skill folder (.opencode/skills/mastra-integration in helloxz/znote) into .claude/skills/mastra-integration in your project. Claude Code loads it when a task matches its description.

How do I install Mastra Integration in Codex?

Run `npx skills add helloxz/znote --skill mastra-integration -a codex`. Or copy the skill folder (.opencode/skills/mastra-integration in helloxz/znote) into .agents/skills/mastra-integration in your project. Codex loads it when a task matches its description.

Can I use Mastra Integration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add helloxz/znote --skill mastra-integration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mastra-integration, .gemini/skills/mastra-integration, .github/skills/mastra-integration and .opencode/skills/mastra-integration in your project.

What does Mastra Integration need to run?

Going by SKILL.md and its folder, Mastra Integration needs credentials named OPENAI_API_KEY, ANTHROPIC_API_KEY and GOOGLE_API_KEY. Our summary lists: A credential in OPENAI_API_KEY; A credential in ANTHROPIC_API_KEY.

Does Mastra Integration access the network?

SKILL.md names 1 domain. As links in the text: mastra.ai. This is read from the text; nothing was executed.

Is Mastra Integration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mastra Integration use?

Mastra Integration is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mastra Integration use?

About 643 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mastra Integration?

Skills that share tags, products or a category with Mastra Integration: Trigger.dev Agent Patterns (papermark/papermark, 9.2k stars), Add Example Agent (GetBindu/Bindu, 10k stars), Claude API (Kocoro-lab/Kocoro, 414 stars) and Agent Squad for TypeScript (2FastLabs/agent-squad, 7.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mastra Integration?

helloxz (a GitHub user) maintains it in helloxz/znote, which has 104 GitHub stars. The repository was last updated on August 17, 2026.

Source: helloxz/znote on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.