agentleFS
metagit-aimetagit-ai/metagit-cli/.agents/skills/metagit-workspace-scope/SKILL.md

metagit-workspace-scope

Skill4 starsChanged 15 days agoMITView on GitHub

Discover active metagit workspace scope, project boundaries, and repository status. Use when an agent starts work in a multi-repo workspace and needs fast, scoped context before editing.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 5 are distinctive, and 5 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.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill at session start for workspace-aware tasks.

    line 9
  2. Very specific:

    Do not dump the umbrella manifest.

    line 14
  3. Distinctive:

    Run context pack (tier 0 minimum, tier 2 at session open):

    line 20
  4. Distinctive:

    Run workspace gate and status checks.

    line 28
  5. Distinctive:

    When agents on multiple machines share a manifest via Syncthing:

    line 100
  6. Very specific:

    Wait for sync idle, then metagit config validate before trusting scope.

    line 102
  7. Very specific:

    Only the session-owning agent runs context pack --tier 2 (updates session boundary).

    line 104
  8. Very specific:

    Check digest.manifest_changed after tier-2 pack if another agent may have edited the manifest.

    line 106
  9. Distinctive:

    Keep operations read-only in this step.

    line 119
  10. Distinctive:

    Do not sync or mutate repositories without explicit request.

    line 120

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Discovering Workspace Scope

Use this skill at session start for workspace-aware tasks. Prefer metagit-context-pack for the full tiered pack workflow; this skill focuses on scope boundaries and Hermes wiring.

<!-- modality:context_reduction -->

Do not dump the umbrella manifest. metagit workspace list --json is a paged index (no summary.workspace). Use --project on packs and workspace repo list --json --detail slim. 500+ repos: metagit prompt workspace -k large-workspace --text-only.

Workflow

  1. Run context pack (tier 0 minimum, tier 2 at session open):
export METAGIT_AGENT_MODE=true
metagit context pack --tier 0 --json --project <name> -c .metagit.yml
metagit prompt workspace -k session-start --text-only -c .metagit.yml
  1. Run workspace gate and status checks.
  2. Build a compact map of active project names, repo names, and sync state from pack JSON.
  3. Report a bounded scope for the current objective.

Hermes session bootstrap

Wire into Hermes (or any orchestrator) before the first tool call on a workspace task.

export METAGIT_AGENT_MODE=true
PACK_JSON="$(metagit context pack --tier 0 --json -c .metagit.yml)"
PROMPT_TEXT="$(metagit prompt workspace -k session-start --text-only -c .metagit.yml)"
Integration pointWhat to inject
Hermes system / bootstrap templatePROMPT_TEXT verbatim; summarize PACK_JSON map + health flags
Pre-turn shell hookRun commands; append stdout to conversation context
Subagent dispatchTier-1 pack scoped with --project/--repo + subagent-handoff prompt
MCP-connected Hermesmetagit_context_pack tier 0 (paged map), then workspace resources

Token-tight alternative: tier 0 pack + session-start prompt only.

See metagit-context-pack for tier escalation, objectives, approvals, and repomix.

Commands

Gate check (pick one):

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]
# inline fallback:
metagit mcp serve --status-once --root .

Scope discovery:

metagit context pack --tier 1 --json --project <name> -c .metagit.yml
metagit workspace list -c .metagit.yml --json
metagit workspace repo list -c .metagit.yml --json --detail slim
metagit search "<query>" -c .metagit.yml --json --limit 10
cd "$(metagit search "<query>" -c .metagit.yml --path-only)"
<!-- modality:managed_repo_search -->

Interactive (human sessions only):

<!-- modality:nav_flattened -->
  • metagit nav / metagit navigate — FuzzyFinder project then repo, then open editor
  • metagit nav --all — one picker of every managed project/repo (optional --unmanaged, --print-path)
  • metagit workspace select --project <name>

Agent navigate (preferred over nav):

  • metagit workspace repo list -c .metagit.yml --json --detail slim — MCP metagit_workspace_repos_list
  • metagit search "<query>" --path-only — MCP metagit_repo_search {path_only: true}

Agent context switch (preferred):

<!-- modality:context_switch -->
  • metagit context switch <project> [<repo>] — pack + prompt + objective + shell-eval env
  • MCP metagit_context_switch — same envelope as JSON
  • Lean MCP metagit_project_context_switch when pack/objective are not needed
  • MCP metagit_workspace_state_snapshot before leaving a project for a long switch

Multi-instance workspaces (Syncthing)

When agents on multiple machines share a manifest via Syncthing:

  1. Wait for sync idle, then metagit config validate before trusting scope.
  2. Designate one writer for .metagit.yml catalog edits.
  3. Only the session-owning agent runs context pack --tier 2 (updates session boundary).
  4. Git clones are local — run metagit project sync per machine after manifest changes.
  5. Check digest.manifest_changed after tier-2 pack if another agent may have edited the manifest.

Full conflict-avoidance table: metagit-context-pack skill.

Output Contract

Return:

  • active/inactive workspace state and reason
  • candidate project to operate on
  • top repositories to inspect first (prioritize health flags from pack cards)

Safety

  • Keep operations read-only in this step.
  • Do not sync or mutate repositories without explicit request.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.