metagit-workspace-grep

metagit-workspace-grep is a skill for Claude Code, Codex from metagit-ai/metagit-cli. It costs 44 tokens per session (629 once invoked), scanned A, original, MIT.

A workspace-wide text search for files stored in managed code repositories. A workspace is the collection of projects and repositories you work with; the search uses ripgrep when available.

In plain words
What is it for?
Searching all repositories or a selected project or repository, showing matching files and context lines, limiting results, and checking the search backend status.
Why use it?
It helps find code, configuration, Terraform, or Docker text across repositories without searching excluded folders or checking repository metadata instead.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Searching all repositories or a selected project or repository, showing matching files and context lines, limiting results, and checking the search backend status.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/metagit-ai/metagit-cli/metagit-workspace-grep
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add metagit-ai/metagit-cli --skill metagit-workspace-grep
Clone the repo
git clone --depth 1 https://github.com/metagit-ai/metagit-cli

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for metagit-workspace-grep

README.md
[![agentmods](https://agentmods.dev/badge/skills/metagit-ai/metagit-cli/metagit-workspace-grep/github.svg)](https://agentmods.dev/skills/metagit-ai/metagit-cli/metagit-workspace-grep)
Your own site
<a href="https://agentmods.dev/skills/metagit-ai/metagit-cli/metagit-workspace-grep"><img src="https://agentmods.dev/badge/skills/metagit-ai/metagit-cli/metagit-workspace-grep/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for metagit-workspace-grep

Your own site · 80×15
<a href="https://agentmods.dev/skills/metagit-ai/metagit-cli/metagit-workspace-grep"><img src="https://agentmods.dev/badge/skills/metagit-ai/metagit-cli/metagit-workspace-grep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 629 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00629
Opus 5 $0.00022 $0.00315
Sonnet 5 $0.00009 $0.00126
Haiku 4.5 $0.00004 $0.00063

Measured 10d ago against content hash e8bc565bec3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

metagit-workspace-grep scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/metagit/data/skills/metagit-workspace-grep/SKILL.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workspace content grep

Use this skill when you need file contents inside managed repos. Use metagit search / metagit_repo_search only for catalog metadata (names, URLs, tags).

Scaffold paths (node_modules, .venv, __pycache__, .git, etc.) are always excluded.

Modalities (same semantics)

Modality Search Ripgrep / backend status
CLI metagit workspace grep "QUERY" … metagit workspace grep info [--json]
MCP (ACTIVE gate) metagit_workspace_search metagit_workspace_grep_info
HTTP (metagit api serve) GET /v2/workspace/grep?q=… GET /v2/workspace/grep/info
Web UI Workspace Console → Grep tab (uses HTTP grep routes)

CLI examples

# whole workspace
metagit workspace grep "DATABASE_URL" --json

# one project
metagit workspace grep 'module "vpc"' --project platform --json

# one repo + context lines
metagit workspace grep "def main" --project portfolio --repo api -C 2 --json

# paths only
metagit workspace grep "TODO" --files-with-matches --limit 50

# backend status (install ripgrep for best performance)
metagit workspace grep info --json

Run metagit workspace grep --help for the full example list.

Required: query. Optional: repos, preset, intent, paths, exclude, context_lines, include_paths, max_results.

{"query": "DATABASE_URL", "max_results": 25}
{"query": "module", "preset": "terraform", "repos": ["infra/vpc"]}

metagit_workspace_grep_info — no arguments; returns ripgrep_available, ripgrep_path, ripgrep_version, search_backend.

Related: metagit_workspace_discover lists files by intent or pattern (no line content).

HTTP API

  • GET /v2/workspace/grep?q=… — optional project, repo (repeatable), preset, intent, max_results, context_lines, include_paths=true
  • GET /v2/workspace/grep/info — ripgrep status JSON

When not to use

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 65 lines · 44 tokens per session scan A e8bc565bec3a

Subscribe to this mod's changes

metagit-workspace-grep is a skill published in the GitHub repository metagit-ai/metagit-cli (3 stars, last pushed 2d ago), licensed MIT. It adds 44 tokens to every session and 629 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

hunk-extensions

Maps the hunkdiff/extension authoring surface for Hunk, the terminal diff viewer — hiding or reordering reviewed files, docked panes, alternate file views, commands and key bindings, dialogs, workspace writes, themes, syntax languages, VCS backends, lifecycle events. Use when writing, debugging, or installing a Hunk…

modem-dev/hunk · 105 tokens

idapython

IDA Pro Python scripting for reverse engineering. Use when writing IDAPython scripts, analyzing binaries, working with IDA's API for disassembly, decompilation (Hex-Rays), type systems, cross-references, functions, segments, or any IDA database manipulation. Covers ida modules (50+), idautils iterators, and common…

mrexodia/ida-pro-mcp · 77 tokens

issue-assessment

Use when triaging a GitHub issue for gflow-cli — a reporter's bug claim, a freshly-filed issue, or deciding whether and how to act on one. Also use when an autonomous agent (hermes-ops) picks up a labelled issue. Read-only: produces a verdict, an end-to-end-verifiability judgment, and a reporter-facing reply. Does not…

ffroliva/gflow-cli · 90 tokens

triage

Diagnose and fix broken MCP servers in mcptoon — doctor, health, per-server probes, and the common failure playbook.

activeing123/mcptoon · 30 tokens

pixiv-cli-ci

Diagnose, verify, monitor, and safely operate pixiv-cli GitHub Actions runs and local CI gates, including PR Quality gate, workflow policy, platform smoke, native/browser evidence, release handoffs, and approved reruns. Use when checks fail or hang, a PR needs readiness verification, a workflow run needs root-cause…

FlanChanXwO/pixiv-cli · 82 tokens

clawrium-release-announcements

Daily — draft a release blog post, open a PR, iterate on comments until merged.

ric03uec/clawrium · 24 tokens