graft

Query a precomputed code graph to locate, understand, and trace repository symbols.

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/HX-Infratstructure/HX-Eco-System --skill graft-hx-infratstructure
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: graft
Source: https://github.com/HX-Infratstructure/HX-Eco-System/tree/main/.claude/skills/graft
Command: npx skills add https://github.com/HX-Infratstructure/HX-Eco-System --skill graft-hx-infratstructure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reading source files to understand a codebase consumes thousands of tokens and still misses cross-file relationships. This Skill retrieves answers from a precomputed graph of the repository, returning exact file:line spans and call edges for a few hundred tokens per query. ## Core Features & Use Cases - Ranked code retrieval: graft ask answers conceptual or locational questions with inline source cruxes, while graft grep exhaustively finds every occurrence of a symbol grouped by enclosing function. - Call-graph tracing: graft callers shows who calls a symbol, what it depends on, and the full transitive blast radius before a rename, refactor, or multi-file change. - Orientation and API inspection: graft map tours an unfamiliar repo's architecture, and graft skeleton shows a file's complete API in roughly 200 tokens. - Use Case: Before renaming a shared function, run graft callers <symbol> --depth 2 to see every file that breaks, then edit at the exact file:line locations returned. ## Quick Start Ask the agent to use graft to explain how a specific feature works in this repository before reading any source files.

Frequently Asked Questions about graft

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find where a function is called in a large codebase?▼

Run graft callers with the symbol name to get precomputed call and reference edges rather than a text search. Use --depth 2 for the usual blast radius or --depth all before a refactor to map every connected file.

How to understand an unfamiliar codebase quickly?▼

Run graft map for a token-budgeted tour of directory clusters, hub files, and global hotspots from the wiring graph. Then read the hub cards it names instead of skeletoning or asking through every subsystem.

What is the difference between graft ask and graft grep?▼

graft ask returns ranked top-N hits for conceptual or locational questions and can miss instances. graft grep exhaustively finds every occurrence of a pattern grouped by enclosing symbol, so use it when you need all call sites.

Does graft require an API key or paid service?▼

No. Every graft command runs locally at zero cost, needs no API key, and returns in under a second. The graph refreshes itself before each query, so results always reflect current uncommitted edits.

Why does graft grep return nothing for a known function?▼

An over-specific regex like a full signature returns nothing even when the code is indexed. Loosen the pattern to the bare symbol name and retry graft grep rather than switching to raw grep -rn, which is slower and unranked.

When should I read source files instead of using graft?▼

Read source only when a span is truncated, a node lacks a needed detail, or files are genuinely not indexed such as docs and brand-new files. Even then, open the exact file:line range graft names rather than whole files.