metagit-gating
Skill4 starsChanged 12 days agoMITView on GitHub
Use when implementing or operating Metagit MCP server activation and tool exposure rules based on .metagit.yml presence and validity.
In this repository62 other files it gives its agents.
- agentsAGENTS.md
- docs/agents.mdAGENTS.md
- agentsAGENTS.md
- agentsCopilot instructions
- .cursor/rules/github-cli.mdcCursor rule
- .cursor/rules/project-level.mdcCursor rule
- llms.txtllms.txt
- gitnexus-cliSkill
- gitnexus-debuggingSkill
- gitnexus-exploringSkill
- gitnexus-guideSkill
- gitnexus-impact-analysisSkill
- gitnexus-refactoringSkill
- humanizerSkill
- metagit-agent-accessSkill
- metagit-agent-coordinationSkill
- metagit-aosSkill
- metagit-bootstrapSkill
- metagit-campaignSkill
- metagit-cliSkill
- metagit-config-refreshSkill
- metagit-context-packSkill
- metagit-control-centerSkill
- metagit-gatingSkill
- metagit-gitnexusSkill
- metagit-graph-maintainSkill
- metagit-mcp-resourcesSkill
- metagit-multi-repoSkill
- metagit-projectsSkill
- metagit-release-auditSkill
- metagit-repo-impactSkill
- metagit-rewrite-campaignSkill
- metagit-sharing-stateSkill
- metagit-stampSkill
- metagit-upstream-scanSkill
- metagit-upstream-triageSkill
- metagit-workspace-scopeSkill
- metagit-workspace-syncSkill
- metagit-agent-accessSkill
- metagit-agent-coordinationSkill
- metagit-aosSkill
- metagit-bootstrapSkill
- metagit-campaignSkill
- metagit-cliSkill
- metagit-cliSkill
- metagit-config-refreshSkill
- metagit-context-packSkill
- metagit-control-centerSkill
- metagit-gitnexusSkill
- metagit-graph-maintainSkill
- metagit-mcp-resourcesSkill
- metagit-multi-repoSkill
- metagit-projectsSkill
- metagit-release-auditSkill
- metagit-repo-impactSkill
- metagit-rewrite-campaignSkill
- metagit-sharing-stateSkill
- metagit-stampSkill
- metagit-upstream-scanSkill
- metagit-upstream-triageSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill whenever you need to control whether Metagit MCP tools/resources are exposed.
- Very specific: line 12
Ensure high-risk tooling and multi-repo context are only available when a valid .metagit.yml exists at the resolved workspace root.
- Very specific: line 42
Check for .metagit.yml in resolved root.
- Distinctive: line 67
Avoid stack traces in user-facing outputs.
- Distinctive: line 72
Never expose mutation-capable tools in inactive state.
- Distinctive: line 73
Never operate outside validated workspace boundaries.
- Distinctive: line 74
Keep defaults read-only unless user/agent explicitly opts in.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Metagit MCP Gating Skill
Use this skill whenever you need to control whether Metagit MCP tools/resources are exposed.
Purpose
Ensure high-risk tooling and multi-repo context are only available when a valid .metagit.yml exists at the resolved workspace root.
Bundled scripts (optional)
Hermes skill_manage installs SKILL.md only. Resolve scripts from the package or a full
metagit skills install:
SKILL_ROOT="$(python3 -c "import metagit, pathlib; print(pathlib.Path(metagit.__file__).parent / 'data/skills/metagit-gating')")"
"$SKILL_ROOT/scripts/gate-status.sh" [root_path]Expected output (single line, tab-delimited):
state=<value>\troot=<path|none>\ttools=<count>
Inline CLI fallback (no scripts)
metagit mcp serve --status-once --root .
metagit config validate -c .metagit.ymlParse mcp_state= from --status-once output (missing, invalid, or active).
Activation Workflow
- Resolve workspace root:
METAGIT_WORKSPACE_ROOT- CLI
--root - upward directory walk
- Check for
.metagit.ymlin resolved root. - Validate config through existing Metagit config models.
- Derive activation state: missing, invalid, or active.
- Register tool surface based on state.
Tool Exposure Contract
Inactive (missing or invalid config)
Expose only:
metagit_workspace_statusmetagit_bootstrap_config_plan_only
Active (valid config)
Expose full set:
metagit_workspace_statusmetagit_workspace_indexmetagit_workspace_searchmetagit_upstream_hintsmetagit_repo_inspectmetagit_repo_syncmetagit_bootstrap_config
Error Handling
- Return explicit, machine-readable state and reason.
- Avoid stack traces in user-facing outputs.
- Log parser/validation errors with enough detail for debugging.
Safety Rules
- Never expose mutation-capable tools in inactive state.
- Never operate outside validated workspace boundaries.
- Keep defaults read-only unless user/agent explicitly opts in.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

