/meta:meta-execfrom meta
Runs shell commands across multiple repositories in a meta-repo workspace. Supports parallel/sequential execution, filtering by repo name or tag, and dry-run mode.
Ships in meta. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Execute any command in the root repo and every project at this meta level (add -r for the meta repos nested under it, -A for the whole workspace from anywhere). Meta extends loop, a tool for running commands across directories.
In the commands below, <repo> is a repo's .meta.yaml name or its path from the nearest .meta.yaml (with -r or -A, from the workspace root: a repo of a nested meta repo needs one of them), and <tag> one of its tags; meta -A --json project list lists both. Other repo and tag names (api, backend) are examples.
meta exec runs a command in each repo directory:
# Run 'make build' in every repo
meta exec -- make build
# Any program with its arguments
meta exec -- ls -la
meta exec -- npm install --save-dev typescript
Each argument meta receives reaches the program unchanged: meta runs the program directly, with no shell in between. Quotes, spaces, $(), ;, |, &&, globs and % in an argument stay literal, so text from an issue, a commit message or a file name can't run commands once meta has it. Your own shell still parses the command line before meta runs ("$(...)" in double quotes runs there), so pass untrusted text in single quotes or as a separate argv element (as the MCP tools take it). When you want a shell (pipes, &&, redirects, globs), ask for one:
meta exec -- sh -c 'npm ci && npm test'
A .looprc alias for the program is expanded into words (POSIX quoting rules, nothing expanded or run). On Windows meta does not wrap commands in cmd /c either. Batch files such as npm.cmd need their extension (meta exec -- npm.cmd install); Windows runs those through cmd.exe, and Rust escapes their arguments for it and refuses any it cannot pass safely.
The -- marks where the command starts; it is optional. The first word after exec (or after --) is the program, and every word after it belongs to the command, so its own options reach it either way. meta's options go before exec.
# These are equivalent:
meta exec make test
meta exec -- make test
meta exec git --version
meta exec -- git --version
Commands run in parallel by default (a .meta.yaml can set defaults.parallel: false; meta reads it from the nearest config at or above the current directory, or from the one --config names). Use --sequential for live output in order, or --parallel to force concurrency:
# Parallel (default) - faster, grouped output after completion
meta exec -- cargo build
# Sequential - see output as it happens
meta --sequential exec -- cargo build
Parallel mode:
Control which repos run the command (examples):
# Only these repos: each value is a repo's .meta.yaml name or its path from the workspace root
meta --include api,worker git status
meta --include services/api,. git status # services/api: the path of a project this .meta.yaml lists; `.` is the root repo
meta -r --include open-source/sdk/core git status # a repo of a nested meta repo (sdk/core in open-source/.meta.yaml) needs -r (from the root) or -A (from anywhere)
# Skip these repos
meta --exclude legacy-service git push
# The repos with a tag (never the root repo: it has no tags)
meta -r --tag backend exec -- make deploy
# The backend repos and the root
meta -r --tag backend --include . git status
Filters: --include and --tag each add repos: the ones --include names, and the ones with any of the --tag tags (with neither, every repo). --exclude then removes the repos it names. The root repo has no tags, so --tag alone never selects it; add it with --include .. A tag no project has is an error that lists the tags there are.
A value names a whole repo, never part of a path: api does not match api-tests. A value that names no repo is an error, so a typo never runs a command in the repo you meant to skip. Inside a worktree set the same holds: a repo sits at its project's path, so it is named by its .meta.yaml name or that path, from the set's root. A value starting with ./ is a path only; use it when a name is ambiguous (a value that names several repos is an error too).
Meta's options go before the command (meta --dry-run exec -- …); what follows the command word is the command's.
Preview what would happen without executing:
meta --dry-run exec -- rm -rf node_modules
Shows which repos would run the command, with [DRY RUN] prefix.
Get structured output for parsing:
meta --json exec -- git rev-parse HEAD
Returns the envelope every meta --json command prints, one row per repo:
{
"success": true,
"command": "exec",
"results": [
{
"project": "api",
"path": "/path/to/workspace/api",
"argv": ["git", "rev-parse", "HEAD"],
"exit_code": 0,
"stdout": "abc123...\n",
"stderr": ""
}
],
"skipped": [],
"warnings": []
}
A row that failed has an error ({"code", "message"}), and so does the whole envelope when anything failed (success: false).
Discard the output of the programs meta runs for exec, raw git commands (meta git status), cargo, git commit -m and git worktree exec: their stdout and stderr go nowhere. Commands that answer for themselves (git clone, git update, git commit --edit, git worktree other than exec) still print. If any failed, the closing error names the repos (Error: 2 commands failed: app, platform); to see why, run it again without --silent:
meta --silent exec -- npm install
Every global option: meta --help.
meta exec -- cargo build --release
meta exec -- cargo test
# Repos tagged frontend (not the root: it has no tags)
meta -r --tag frontend exec -- npm update
# Exclude slow repos (meta options go before `exec`)
meta --exclude large-monorepo exec -- cargo update
# Arguments go to find as typed: "*.rs" is find's pattern, not a shell glob
meta exec -- find . -name '*.rs' -type f | head -20
meta exec -- cargo clean
meta exec -- rm -rf node_modules dist
Use meta exec | Use Plugin (e.g., meta git) |
|---|---|
| Generic commands | Git operations |
| Build/test commands | Commands needing special handling |
| One-off scripts | Operations with meta-specific logic |
| npm/cargo/make | Clone, update, worktree |
meta exec -- <cmd> always runs the command as typed, never through a plugin: meta exec -- git status runs plain git status in each repo, while meta git status uses the git plugin. Prefer meta git <cmd> for git: any git subcommand passes through it, and it runs remote commands (fetch, pull, push) without credential prompts that would hang parallel runs. Plugins intercept only their own subcommands (meta git ..., meta cargo ...) and provide enhanced behavior. meta git clone doesn't run git clone in each repo—it reads .meta.yaml and clones the entire graph.
When your cwd is inside a worktree set (a .worktrees/<name>/ folder, or any set meta made), meta exec automatically scopes to the set's repos instead of the primary checkout:
cd .worktrees/auth-fix/backend
meta exec -- cargo test # runs in auth-fix's repos
# --primary acts on the workspace the set was made from, from right here
meta --primary exec -- cargo test
This is filesystem-based detection—no store dependency: the set's members are the projects whose folders are in it, nested ones included. See the meta-worktree skill for full worktree management.
--include/--exclude/--tag to run commands in only the repos you need — avoids running commands you'll have to undometa_execution_order (from depends_on in .meta.yaml; see the meta-workspace skill to start the server) or read depends_on yourself, then run repos one at a time in that order with --include--sequential when one repo's step needs another's output; parallel is the defaultmeta --dry-run exec -- <command> shows what would happen before committingWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
meta@gitkb is listed by gitkb/claude-plugins — review the source before installing
npx claudepluginhub gitkb/claude-plugins --plugin meta6 skills in this plugin
/meta-workspaceUnderstanding and operating in meta repository workspaces with .meta.yaml configuration.Other plugins' skills for the same job