Files
tomasz-syn-grzegorza 287c08ebfc Add universal GitNexus skills for Cursor and Hermes.
Consolidate connect, graph, and search workflows with mobile endpoint defaults and shared installation docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 16:08:15 +02:00

96 lines
2.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: gitnexus-connect
description: >-
Konfiguruje połączenie z GitNexus (MCP dla Cursora, REST/MCP dla Hermesa).
Użyj przy setupie MCP, health checku, problemach z połączeniem,
lub gdy agent nie widzi serwera gitnexus.
disable-model-invocation: true
---
# gitnexus-connect
Bootstrap połączenia z GitNexus dla **Cursor** (MCP) i **Hermes** (MCP lub REST).
## Domyślny endpoint (zdalny)
```text
https://gitnexus.mobile.agency-ai.dev/api/mcp
```
## Lokalny override (ten sam host co Docker one-gateway)
```text
http://127.0.0.1:4747/api/mcp
```
Ustaw `GITNEXUS_SERVER_URL=http://127.0.0.1:4747` gdy pracujesz lokalnie na hoście z kontenerem `one-gateway-gitnexus-server`.
## Cursor — konfiguracja MCP
Plik `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"gitnexus": {
"url": "https://gitnexus.mobile.agency-ai.dev/api/mcp"
}
}
}
```
Lokalnie zamień URL na `http://127.0.0.1:4747/api/mcp`.
Po zmianie: **Reload Window** → panel MCP → status `gitnexus` = **Connected**.
## Hermes — zmienne środowiskowe
```bash
export GITNEXUS_SERVER_URL=https://gitnexus.mobile.agency-ai.dev
export GITNEXUS_DEFAULT_REPO=one-gateway # opcjonalnie
```
Hermes może używać MCP HTTP (ten sam URL co Cursor) lub REST fallback przez skrypt z `gitnexus-search`.
## Procedura agenta
1. Uruchom health check:
```bash
bash "$SKILLS_ROOT/gitnexus-connect/scripts/gitnexus-health.sh"
```
Domyślnie `SKILLS_ROOT=$HOME/Pulpit/cursor/skills`. Możesz też podać pełną ścieżkę.
2. Sprawdź `GET /api/repos` — czy docelowe repo jest zaindeksowane (`stats.files > 0`).
3. Cursor: Reload Window → MCP panel → `gitnexus` = Connected.
4. Jeśli repo **brak na liście** — nie szukaj lokalnie. Operator musi zamontować repo na hoście GitNexus i wykonać `analyze` (szczegóły w [`reference.md`](reference.md)).
## Szybki test ręczny
```bash
curl -fsS https://gitnexus.mobile.agency-ai.dev/api/health
curl -fsS https://gitnexus.mobile.agency-ai.dev/api/repos
```
## Błędy
| Sytuacja | Akcja |
|----------|-------|
| MCP Error / timeout | Sprawdź health; użyj REST przez `gitnexus-search.py` |
| Repo nie na liście | Operator: `docker exec -w /workspace one-gateway-gitnexus-server gitnexus analyze /workspace` |
| Port 4747 zajęty lokalnie | Nie uruchamiaj drugiego `gitnexus serve` — użyj istniejącego kontenera |
| Brak auth na zdalnym URL | NPMplus Access List / Basic Auth (patrz `reference.md`) |
## Powiązane skille
| Skill | Kiedy |
|-------|-------|
| [`gitnexus-graph`](../gitnexus-graph/SKILL.md) | Architektura, zależności, impact — użyj MCP po połączeniu |
| [`gitnexus-search`](../gitnexus-search/SKILL.md) | Jawne wyszukiwanie `repo + prompt`; REST fallback |
## Referencja
- Szczegóły URL, porty, bezpieczeństwo: [`reference.md`](reference.md)
- Extended docs (one-gateway): `coding-agent/3336*.md`