metagit-agent-access
Optimize any repository for minimal-token agent onboarding — llms.txt, AGENTS.md, hidden HTML agent blocks, docs/agents.md.
Skill by metagit-ai
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/metagit-ai-metagit-agent-access
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/metagit-agent-access
What's inside
- Skill name
metagit-agent-access- Description
- Optimize any repository for minimal-token agent onboarding — llms.txt, AGENTS.md, hidden HTML agent blocks, docs/agents.md. Use when asked to improve agentic access, agent metadata, llms.txt, or run the agent-access optimizer subagent on a project.
- License
- MIT
- Metadata
- internal: true
- Instructions
- 124 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (8)
- SKILL.md
- reference.md
- optimize-agent-access.sh · scripts/
- optimize_agent_access.py · scripts/
- subagent-prompt.md
- AGENTS.md.template · templates/
- agent-manifest.json.template · templates/
- llms.txt.template · templates/
SKILL.md (first lines)
# Metagit agent access optimizer
On-demand workflow to make a **target repository** easy for AI agents to grasp with **minimal tokens**, using conventions that stay **out of the human reading path** where possible.
## When to use
- User asks to optimize agent access, agent onboarding, or `llms.txt`
- User wants hidden agent metadata in an existing project
- After adding major CLI/MCP features to a product repo (refresh agent surfaces)
Do **not** run proactively on every task.
## Execution modes
| Mode | When |
|------|------|
| **Script first** | Default — fast audit + scaffold |
| **Subagent** | Large/unknown repo or user wants full editorial pass |
### 1) Script (run first)
Hermes `skill_manage` installs **SKILL.md only** — local `./scripts/` paths will not exist.
Prefer the PyPI package path (always available when `metagit-cli` is installed) or
`metagit skills install --skill metagit-agent-access` for a full skill tree.
From the **target repository root** (not necessarily metagit-cli):
```bash
SKILL_ROOT="$(python3 -c "import metagit, pathlib; print(pathlib.Path(metagit.__file__).parent / 'data/skills/metagit-agent-access')")"
"$SKILL_ROOT/scripts/optimize-agent-access.sh" . --apply --json
```
After `metagit skills install --skill metagit-agent-access`:
```bash
"${HERMES_HOME:-$HOME/.hermes}/skills/metagit-agent-access/scripts/optimize-agent-access.sh" . --apply --json
```
### Inline fallback (no scripts)
Run the optimizer Python entrypoint from the installed package:
```bash
SKILL_ROOT="$(python3 -c "import metagit, pathlib; print(pathlib.Path(metagit.__file__).parent / 'data/skills/metagit-agent-access')")"
python3 "$SKILL_ROOT/scripts/optimize_agent_access.py" . --json
python3 "$SKILL_ROOT/scripts/optimize_agent_access.py" . --apply --json
```
If `uv` is available in the target repo, the shell wrapper is equivalent:
```bash
uv run python "$SKILL_ROOT/scripts/optimize_agent_access.py" . --json
```
Manual audit when scripts cannot run: check for `llms.txt`, `AGENTS.md`, `docs/agents.md`, and
`<!-- agent-access:start -->` in README; scaffold from `$SKILL_ROOT/templates/` only after
dry-run review.
Flags:
- `--dry-run` (default): report gaps only
- `--apply`: create missing scaffolds from templates; inject README HTML comment if absent
- `--json`: machine-readable report on stdout
### 2) Subagent (on demand)
When the script report shows gaps the templates cannot fill, or the repo is non-trivial, dispatch a **generalPurpose** subagent (not background) with the prompt in [subagent-prompt.md](subagent-prompt.md).
Replace `{{REPO_ROOT}}` with the absolute target path. The subagent must:
1. Run the optimizer script with `--json`
2. Apply `--apply` if safe (no overwrite of human-authored agent sections without diff review)
3. Add/refine **hidden** metadata (HTML comments) before visible prose changes
4. Keep human-facing README diff minimal (one short pointer table max)
5. Return a JSON summary: `files_created`, `files_updated`, `token_estimate_llms_txt`, `follow_ups`
Parent agent: merge subagent summary; do not paste full generated files into chat.
## Artifacts (priority order)
| Artifact | Audience | Human visibility |
|----------|----------|------------------|
| `llms.txt` | LLM crawlers | Low ( convention ) |
| `AGENTS.md` | Agent hosts | Low ( agent convention ) |
| `<!-- agent-access:... -->` in README | Agents parsing raw MD | **Hidden** (HTML comment) |
| `docs/agents.md` | Docs site + agents | Medium ( link from README ) |
| `.agent/manifest.json` | Agents only | Hidden ( dot dir ) |
See [reference.md](reference.md) for formats.
## Quality bar
- **Token budget:** `llms.txt` ≤ 80 lines; `AGENTS.md` agent section ≤ 120 lines before project-specific content
- **No duplication:** `llms.txt` indexes; `AGENTS.md` quick reference; `docs/agents.md` full guide
- **Session block:** every artifact set includes install + 2–3 session-start commands
- **Idempotent:** re-run `--apply` must not duplicate HTML comment blocks or sections
## Metagit-specific extras
If target has `.metagit.yml`, include in generated session block:
```bash
export METAGIT_AGENT_MODE=true
metagit context pack --tier 2 --json
metagit skills install --scope user
```
## Verification
After `--apply`:
```bash
test -f llms.txt && test -f AGENTS.md
rg 'agent-access:start' README.md # hidden block present
```
If `mkdocs.yml` exists, add `agents.md` to nav and run `mkdocs build --strict` when docs CI expects it.
## Additional resourcesFrom metagit-ai/metagit-cli, MIT.
More from metagit-ai/metagit-cli
- 0.611score
metagit-bootstrap
metagit-ai
Create or refine a local .metagit.yml.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-agent-coordination
metagit-ai
Isolate concurrent agents with RFC-0007 ACL primitives: allocate agent/* branches, acquire branch leases, create exclusive git worktrees, and declare advisory…
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-aos
metagit-ai
Compose ACL, task graph, scheduler, merge, and related coordination subsystems via metagit aos|coord status|doctor|next.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-config-refresh
metagit-ai
Refresh or bootstrap `.metagit.yml` using deterministic init/validate.
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
metagit-campaign
metagit-ai
Plan and track cross-project multi-repo campaigns — YAML overlays, repo rollups, objective fan-out, and MR status.
SkillAFreshness: A★ 4Claude Code +9 - 0.597score
metagit-cli
metagit-ai
CLI-only shortcuts for metagit agents — workspace catalog, discovery, prompts, sync, layout, and config.
SkillAFreshness: A★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 17, 2026 (3 months ago)
- Last release
- Oct 2, 2026 (27 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/metagit-ai/metagit-cli
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from metagit-ai
- 0.611score
metagit-bootstrap
metagit-ai
Create or refine a local .metagit.yml.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-agent-coordination
metagit-ai
Isolate concurrent agents with RFC-0007 ACL primitives: allocate agent/* branches, acquire branch leases, create exclusive git worktrees, and declare advisory…
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-aos
metagit-ai
Compose ACL, task graph, scheduler, merge, and related coordination subsystems via metagit aos|coord status|doctor|next.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-config-refresh
metagit-ai
Refresh or bootstrap `.metagit.yml` using deterministic init/validate.
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
metagit-campaign
metagit-ai
Plan and track cross-project multi-repo campaigns — YAML overlays, repo rollups, objective fan-out, and MR status.
SkillAFreshness: A★ 4Claude Code +9 - 0.597score
metagit-cli
metagit-ai
CLI-only shortcuts for metagit agents — workspace catalog, discovery, prompts, sync, layout, and config.
SkillAFreshness: A★ 4Claude Code +9
Cite this page
metagit-agent-access skill. Agent Mart. https://agentmart.dev/skills/metagit-ai-metagit-agent-access (last updated 2026-10-24)