# Metagit Gitnexus

> Run gitnexus analysis for a target workspace and selected project repositories before graph-dependent tasks. Use when index staleness is detected or cross-repo graph results are needed.

- **Type:** Skill
- **Install:** `agentstack add skill-metagit-ai-metagit-cli-metagit-gitnexus`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [metagit-ai](https://agentstack.voostack.com/s/metagit-ai)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [metagit-ai](https://github.com/metagit-ai)
- **Source:** https://github.com/metagit-ai/metagit-cli/tree/main/skills/metagit-gitnexus
- **Website:** https://metagit-ai.github.io/metagit-cli/

## Install

```sh
agentstack add skill-metagit-ai-metagit-cli-metagit-gitnexus
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Running GitNexus Analysis

Use this skill whenever GitNexus context is stale or missing for target repositories.

## Local Wrapper (Use First)

- `./skills/metagit-gitnexus/scripts/analyze-targets.sh  [project_name]`

## Workflow

1. Analyze the current repository where the command is run.
2. Resolve target project repositories from `.metagit.yml`.
3. Run `npx gitnexus analyze` in each local repository path found.
4. Report per-repository success/failure and next actions.

## Manual workspace graph (`.metagit.yml` → Cypher)

Promote inferred edges first (see `metagit-graph-maintain` skill), then ingest:

```bash
./skills/metagit-gitnexus/scripts/ingest-workspace-graph.sh -c .metagit.yml
./skills/metagit-gitnexus/scripts/ingest-workspace-graph.sh -c .metagit.yml --gitnexus-repo my-umbrella --dry-run
```

Manual export + MCP:

```bash
metagit config graph export -c .metagit.yml --format tool-calls --output /tmp/graph-tool-calls.json
uv run python ./skills/metagit-gitnexus/scripts/ingest_workspace_graph.py /tmp/graph-tool-calls.json
# MCP export: metagit_export_workspace_graph_cypher
```

Schema DDL (`MetagitEntity` / `MetagitLink`) runs once per index; pass `--gitnexus-repo` when the umbrella index name differs from manifest `name`.

## GitNexus group sync (cross-index analysis)

Align `workspace.projects[]` repos with a GitNexus group for `group impact`, `group query`, and contract linking:

```bash
./skills/metagit-gitnexus/scripts/sync-group.sh -c .metagit.yml
metagit gitnexus group sync -c .metagit.yml --json
metagit gitnexus group sync -c .metagit.yml --group-name my-workspace --prune
```

MCP: `metagit_gitnexus_group_sync`

Prerequisites:

1. Each managed repo checkout exists locally and has been analyzed (`gitnexus analyze`).
2. Registry entries exist in `~/.gitnexus/registry.json` for those paths.
3. Multi-repo workspace with `workspace.projects[]` in `.metagit.yml`.

Group paths use `/`; default group name is a slug of manifest `name` (stored under `~/.gitnexus/groups//`).

After sync, use GitNexus directly:

```bash
npx gitnexus group status 
npx gitnexus group query  "authentication flow"
npx gitnexus group impact  --repo  --target 
```

## Output Contract

Return:
- analyzed repositories
- failures and reasons
- whether graph queries are safe to run now

## Safety

- Skip repositories that do not exist locally.
- Do not mutate repo content; analysis should be read-only indexing.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [metagit-ai](https://github.com/metagit-ai)
- **Source:** [metagit-ai/metagit-cli](https://github.com/metagit-ai/metagit-cli)
- **License:** MIT
- **Homepage:** https://metagit-ai.github.io/metagit-cli/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-metagit-ai-metagit-cli-metagit-gitnexus
- Seller: https://agentstack.voostack.com/s/metagit-ai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
