Agent skill

Mastra

by LiorVainer in LiorVainer/data-israel

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

Apache-2.0Auto-check passedAI & LLM Engineering

Install Mastra

skills CLI
$ npx skills add LiorVainer/data-israel --skill mastra -a claude-code

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

GitHub CLI
$ gh skill install LiorVainer/data-israel mastra --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/LiorVainer/data-israel.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/mastra .claude/skills/mastra && 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
GitHub stars
130
Used in
2 other repos
Token cost
~1.6k tokens
SKILL.md length
513 words
Files
6 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Works in 3 steps: Embedded docs first (if packages… → Source code second (if packages installed) → Remote docs third (if packages not…
  • All Mastra development to ensure youre using current APIs from the installed version
  • SKILL.md covers ⚠️ Critical: Do not trust…, Prerequisites, Documentation lookup guide and Core concepts, plus 4 more sections
  • Calls npm; reaches mastra.ai

What it does

Mastra is an agent skill from LiorVainer/data-israel. Comprehensive Mastra framework guide. Teaches how to find current documentation, verify API signatures, and build agents and workflows. Covers documentation lookup strategies (embedded docs, remote docs), core concepts (agents vs workflows, tools, memory, RAG), TypeScript requirements, and common patterns. Use this skill for all Mastra development to ensure you're using current APIs from the installed version or latest documentation.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/common-errors.md`, `references/create-mastra.md` and `references/embedded-docs.md`).

It sits in AI & LLM Engineering. It works with Mastra and TypeScript. The repository describes itself as: AI agent network that connects to Israeli open data sources - ask questions in Hebrew, get answers grounded in real data with charts and sources. The licence is Apache-2.0.

When your agent uses it

  • All Mastra development to ensure youre using current APIs from the installed version
  • Latest documentation

Example prompts

  • “/mastra”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Embedded docs first (if packages installed)
  2. Source code second (if packages installed)
  3. Remote docs third (if packages not installed)

What it can do on your machine

Read from SKILL.md and the folder at commit 6522504. 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

    Shell commands in SKILL.md call:

    • npm

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • mastra.ai

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Mastra loads about 1.6k tokens when it runs, and up to ~9.2k if it reads all its reference files. Until then it costs about 111 tokens; SKILL.md has 513 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.2k

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 LiorVainer/data-israel at commit 6522504, republished under its Apache-2.0 licence (© LiorVainer). 513 words, ~1,594 tokens.

Download SKILL.mdSave it as .claude/skills/mastra/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
mastra
description
Comprehensive Mastra framework guide. Teaches how to find current documentation, verify API signatures, and build agents and workflows. Covers documentation lookup strategies (embedded docs, remote docs), core concepts (agents vs workflows, tools, memory, RAG), TypeScript requirements, and common patterns. Use this skill for all Mastra development to ensure you're using current APIs from the installed version or latest documentation.
license
Apache-2.0
metadata.author
Mastra
metadata.version
2.0.0
metadata.repository
https://github.com/mastra-ai/skills

Mastra Framework Guide

Build AI applications with Mastra. This skill teaches you how to find current documentation and build agents and workflows.

⚠️ Critical: Do not trust internal knowledge

Everything you know about Mastra is likely outdated or wrong. Never rely on memory. Always verify against current documentation.

Your training data contains obsolete APIs, deprecated patterns, and incorrect usage. Mastra evolves rapidly - APIs change between versions, constructor signatures shift, and patterns get refactored.

Prerequisites

Before writing any Mastra code, check if packages are installed:

bash
ls node_modules/@mastra/
  • If packages exist: Use embedded docs first (most reliable)
  • If no packages: Install first or use remote docs

Documentation lookup guide

Quick Reference
User QuestionFirst CheckHow To
"Create/install Mastra project"references/create-mastra.mdSetup guide with CLI and manual steps
"How do I use Agent/Workflow/Tool?"references/embedded-docs.mdLook up in node_modules/@mastra/*/dist/docs/
"How do I use X?" (no packages)references/remote-docs.mdFetch from https://mastra.ai/llms.txt
"I'm getting an error..."references/common-errors.mdCommon errors and solutions
"Upgrade from v0.x to v1.x"references/migration-guide.mdVersion upgrade workflows
Priority order for writing code

⚠️ Never write code without checking current docs first.

  1. Embedded docs first (if packages installed)

    Look up current docs in node_modules for a package. Example of looking up "Agent" docs in @mastra/core:

    bash
    grep -r "Agent" node_modules/@mastra/core/dist/docs/references
  2. Source code second (if packages installed)

    If you can't find what you need in the embedded docs, look directly at the source code. This is more time consuming but can provide insights into implementation details.

    bash
    # Check what's available
    cat node_modules/@mastra/core/dist/docs/assets/SOURCE_MAP.json | grep '"Agent"'
    
    # Read the actual type definition
    cat node_modules/@mastra/core/dist/[path-from-source-map]
    • Why: Ultimate source of truth if docs are missing or unclear
    • Use when: Embedded docs don't cover your question
    • See: references/embedded-docs.md
  3. Remote docs third (if packages not installed)

    You can fetch the latest docs from the Mastra website:

    bash
    https://mastra.ai/llms.txt
    • Why: Latest published docs (may be ahead of installed version)
    • Use when: Packages not installed or exploring new features
    • See: references/remote-docs.md
Show full SKILL.md (213 more words)Show less

Core concepts

Agents vs workflows

Agent: Autonomous, makes decisions, uses tools Use for: Open-ended tasks (support, research, analysis)

Workflow: Structured sequence of steps Use for: Defined processes (pipelines, approvals, ETL)

Key components
  • Tools: Extend agent capabilities (APIs, databases, external services)
  • Memory: Maintain context (message history, working memory, semantic recall)
  • RAG: Query external knowledge (vector stores, graph relationships)
  • Storage: Persist data (Postgres, LibSQL, MongoDB)

Critical requirements

TypeScript config

Mastra requires ES2022 modules. CommonJS will fail.

json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ES2022",
    "moduleResolution": "bundler"
  }
}
Model format

Always use "provider/model-name":

  • "openai/gpt-5.2"
  • "anthropic/claude-sonnet-4-5"
  • "google/gemini-2.5-pro"

When you see errors

Type errors often mean your knowledge is outdated.

Common signs of outdated knowledge:

  • Property X does not exist on type Y
  • Cannot find module
  • Type mismatch errors
  • Constructor parameter errors

What to do:

  1. Check references/common-errors.md
  2. Verify current API in embedded docs
  3. Don't assume the error is a user mistake - it might be your outdated knowledge

Development workflow

Always verify before writing code:

  1. Check packages installed

    bash
    ls node_modules/@mastra/
  2. Look up current API

  3. Write code based on current docs

  4. Test in Studio

    bash
    npm run dev  # http://localhost:4111

Resources

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

Files

SKILL.md and 5 other files (references) in .agents/skills/mastra of LiorVainer/data-israel.

  • SKILL.md
  • references/common-errors.md
  • references/create-mastra.md
  • references/embedded-docs.md
  • references/migration-guide.md
  • references/remote-docs.md

Open the folder on GitHubat commit 6522504

Used in 2 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in LiorVainer/data-israel, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Mastra 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 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mastra this skillLiorVainer/data-israel1302 repos~1.6kAutomated safety check: PassApache-2.0
Mastra Integrationhelloxz/znote104—~643Automated safety check: PassAGPL-3.0
Migrating Mastra To Pydantic AIpydantic/pydantic-ai21k—~2kAutomated safety check: PassMIT
Compromise NLP Libraryspencermountain/compromise12k—~2kAutomated safety check: PassMIT
Trigger.dev Agent Patternspapermark/papermark9.2k—~2kAutomated safety check: PassCustom licence
Add Example AgentGetBindu/Bindu10k—~1.1kAutomated safety check: NotesCustom licence

Similar skills

  • Mastra Integration

    helloxz/znote

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

    104 GitHub stars~643 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Official

    Migrate TypeScript Mastra applications to Python with Pydantic AI and, only when needed, Pydantic AI Harness.

    21k GitHub stars~2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Compromise NLP Library

    spencermountain/compromise

    Helps write and debug JavaScript or TypeScript that uses the compromise English NLP library for matching, entity extraction, tagging and sentence transforms.

    12k GitHub stars~2k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • 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
  • Gemini API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, speech generation (TTS), voice…

    4.3k GitHub stars~5.1k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed

More from LiorVainer/data-israel

  • Access and compare Israeli supermarket prices using mandatory Price Transparency Law data feeds.

    130 GitHub stars~2.3k tokensUpdated 4 mo ago
    Auto-check passed
  • Backlog

    LiorVainer/data-israel

    This skill should be used when the user asks to 'add to backlog', 'create a backlog item', 'show backlog', 'list backlog tasks', 'what's in the backlog', 'move to backlog', 'check backlog', 'backlog…

    130 GitHub stars~1.3k tokensUpdated 4 mo ago
    Auto-check passed
  • Govmap API

    LiorVainer/data-israel

    This skill should be used when the user asks about 'GovMap layers', 'GovMap API', 'map layers', 'entitiesByPoint', 'layer metadata', 'govmap endpoints', 'what layers are available', 'query map data…

    130 GitHub stars~1.7k tokensUpdated 4 mo ago
    Auto-check passed
  • Add Data Source

    LiorVainer/data-israel

    This skill should be used when the user asks to 'add a data source', 'create a new data source', 'add a new API', 'integrate a new data provider', 'add new tools', or mentions adding Israeli…

    130 GitHub stars~2.6k tokensUpdated 4 mo ago
    Auto-check: notes
  • Sentry Setup AI Monitoring

    LiorVainer/data-israel

    Setup Sentry AI Agent Monitoring in any project. An agent skill from LiorVainer/data-israel.

    130 GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Mastra

What does Mastra do?

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

When should I use Mastra?

Mastra fits situations like: all Mastra development to ensure youre using current APIs from the installed version; latest documentation.

How do I install Mastra in Claude Code?

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

How do I install Mastra in Codex?

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

Can I use Mastra 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 LiorVainer/data-israel --skill mastra -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, .gemini/skills/mastra, .github/skills/mastra and .opencode/skills/mastra in your project.

What does Mastra need to run?

Going by SKILL.md and its folder, Mastra needs the command-line tools its instructions call (npm).

Does Mastra access the network?

SKILL.md names 1 domain. In commands or code: mastra.ai; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Mastra 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 use?

Mastra is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mastra use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.6k tokens, read only when the agent opens those files.

What are the alternatives to Mastra?

Skills that share tags, products or a category with Mastra: Mastra Integration (helloxz/znote, 104 stars), Migrating Mastra To Pydantic AI (pydantic/pydantic-ai, 21k stars), Compromise NLP Library (spencermountain/compromise, 12k stars) and Trigger.dev Agent Patterns (papermark/papermark, 9.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mastra?

LiorVainer (a GitHub user) maintains it in LiorVainer/data-israel, which has 130 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on May 13, 2026.

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