Quick Ref / Command

Engineer Kit

/ak:gkg

GKG Semantic Code Graph

Index a Git repository with GitLab Knowledge Graph, then use MCP or HTTP queries for definitions, references, impact analysis, and architecture understanding.

01

Confirm fit

02

Check repository

03

Index code

04

Start query server

Rule 01

Use GKG for semantic relationships, not raw token dumps.

Rule 02

Index before querying; queries are only as good as the current graph.

Rule 03

Treat incomplete TS/JS/Python cross-file references as caveats in the result.

Execution Map

Core lanes from input to output, aligned with the command's real execution path.

01

Start

Input, scope, route

  1. 1 Confirm fit Use GKG for semantic navigation, find-usages, go-to-definition, impact analysis, architecture diagrams, or RAG-style code understanding; use repomix instead for quick dumps or unsupported languages.
  2. 2 Check repository Ensure the target is an initialized Git repository and note that GKG stores indexes under ~/.gkg/.
02

Work

Agent / skill execution

  1. 3 Index code Run the documented GKG indexing flow such as gkg index or gkg index /path/to/project --stats before querying.
  2. 4 Start query server Start gkg server start so MCP tools or the HTTP API at localhost:27495 can read the graph.
03

Verify

Gate, review, validation

  1. 5 Query symbols Use get_references or /api/graph/search for symbol usages, definitions, and dependency paths.
  2. 6 Review impact For refactors, index affected repos and inspect every call site before changing symbols.
04

Close

Report, handoff, artifact

  1. 7 Respect limits Report language-support caveats: Ruby/Java/Kotlin cross-file refs are full, while Python/TypeScript/JavaScript cross-file refs are still in progress.

Syntax, arguments, subcommands

How to invoke the skill: syntax, positional arguments, shared options, then each subcommand with its own syntax and outcome.

Syntax

/ak:gkg [symbol or query]

Arguments

[symbol or query] Required

Symbol or graph question

Symbol name, qualified member, or natural-language code question to resolve with the current repository graph. Include the target repository or constraints when context is ambiguous.

/ak:gkg AuthService.createSession

Sample Prompt

Concrete invocations for each flag, subcommand, mode, or route available in the live workflow.

Find usages Recommended
/ak:gkg AuthService.createSession
Use when:
You need every reference to a function or class before editing it.
Expected:
Indexes or uses the current graph, queries references, and reports call sites plus language caveats.
Impact analysis
/ak:gkg impact of renaming UserRepository
Use when:
A refactor may cross files or packages.
Expected:
Lists affected symbols and asks you to review all call sites before refactoring.

Handled Scope

  • Go-to-definition and find-usages
  • Refactor impact analysis
  • Architecture and dependency graphing
  • MCP/HTTP graph querying

Artifacts Produced

Semantic graph findings

Pattern

Indexed target, query used, matching symbols, references, caveats.

The useful output is an auditable set of symbols and relationships, not a generic code summary.

Next