gabb-code-navigation

Decision guide for code navigation. Teaches when to use gabb tools vs default tools (Grep/Read) for maximum efficiency. Applies to Python/TypeScript/Rust/Kotlin/C++.

allowed_tools: mcp__gabb__*, Edit, Write, Bash, Read, Glob

$ 安裝

git clone https://github.com/gabb-software/gabb-cli /tmp/gabb-cli && cp -r /tmp/gabb-cli/benchmark/claude-code/configs/gabb/skills/gabb ~/.claude/skills/gabb-cli

// tip: Run this command in your terminal to install the skill


name: gabb-code-navigation description: | Decision guide for code navigation. Teaches when to use gabb tools vs default tools (Grep/Read) for maximum efficiency. Applies to Python/TypeScript/Rust/Kotlin/C++. allowed-tools: mcp__gabb__*, Edit, Write, Bash, Read, Glob

When to Use gabb vs Grep/Read

Pre-Flight Checklist (Before ANY Read on Code Files)

Before calling Read on a code file, run this check:

□ Is file extension in [.py, .pyi, .ts, .tsx, .rs, .kt, .kts, .cpp, .cc, .cxx, .hpp, .hh]?
  ├─ NO  → Use Read directly (unsupported language)
  └─ YES → Have I called gabb_structure on this file in this session?
           ├─ NO  → Call gabb_structure FIRST, then decide what to read
           └─ YES → Use Read with offset/limit based on structure output

Why checklists work: They force a pause before automatic behavior.

The Core Decision

Ask yourself: "Am I looking for CODE (functions, classes, symbols)?"

If YES → Use gabbIf NO → Use Grep/Read
Find a functionSearch log messages
Find a classFind config values
Find where X is definedSearch comments
Find usages of XFind in .json/.md/.yaml

Supported Languages

LanguageExtensions
Python.py, .pyi
TypeScript.ts, .tsx
Rust.rs
Kotlin.kt, .kts
C++.cpp, .cc, .cxx, .hpp, .hh

For .js, .jsx, .go, .java, .c, .h → Use Grep/Read

Start Here: The Two-Step Pattern

Step 1: Get cheap overview (no source code, just structure)

gabb_structure file="path/to/file.py"

MANDATORY for any supported code file. Returns symbol names, kinds, line numbers.

Step 2: Get specific code (one of these based on what you need)

  • gabb_symbols name="FunctionName" include_source=true - get a specific symbol's code
  • Read file="path" offset=150 limit=50 - read specific line range from structure output

Quick Reference

GoalTool
Preview file structure (cheap)gabb_structure file="path"details
Find and read code by keywordgabb_symbols name_contains="X" include_source=truedetails
Find usages before refactoringgabb_usages file="X" line=N character=Mdetails

Use include_source=true on gabb_symbols, gabb_symbol, gabb_definition - NOT on gabb_structure.

Specialized Tools

For call tracing, type hierarchies, and other tasks:

When to Fall Back to Grep/Read

  1. Searching text content (error messages, comments, strings)
  2. Unsupported file types (.js, .go, .java, .json, .md)
  3. Finding config values or non-code content