graft
यह क्या करती है
यह स्किल AI को पहले से बने नक्शे की मदद से रिपॉज़िटरी के हिस्से कैसे काम करते हैं, यह देखने देती है। यह उन डेवलपर्स के लिए है जो कोड ढूँढना चाहते हैं और जानना चाहते हैं कि कोई बदलाव किन चीज़ों को प्रभावित कर सकता है।
कब इस्तेमाल करें
- ✓जब आप जानना चाहते हैं कि रिपॉज़िटरी में कोई फ़ीचर या फ़ंक्शन कहाँ है।
- ✓जब आप बदलाव करने से पहले देखना चाहते हैं कि वह किसे प्रभावित कर सकता है।
- ✓जब आपको कोड के किसी एक हिस्से का काम समझना हो।
Skill का लिंक
https://github.com/trailhq/Trail-Code/blob/main/.claude/skills/graft/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस रिपॉज़िटरी में rate limiting कहाँ संभाला जाता है, और उसे कौन कॉल करता है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI ग्राफ़ टूल से सवाल पूछता है और फ़ाइल व लाइन नंबर के साथ सबसे प्रासंगिक कोड स्थान पाता है, साथ में छोटे कोड अंश भी। यह बहुत सारी पूरी सोर्स फ़ाइलें पढ़ने से तेज़ है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
graft
graft/ holds a graph of this repo: small markdown nodes that each explain one
part in prose and name the exact file:line spans they cover, plus a wiring
graph of who-calls-what. Querying a node costs a few hundred tokens; rebuilding
that understanding by reading source costs thousands, and misses the edges.
Every command below is $0, needs no API key, and returns in under a second.
There are six of them. Pick the one that fits the task, run it, act on the
answer; don't chain tools hoping for more. Most tasks need one call.
The tools
1 · graft ask "<question>" --source: locate + understand (the default)
Ranked retrieval over the graph, routed automatically between prose nodes and
the wiring graph, returning the top hits with exact file:line.
--sourceinlines the code at each hit, the ≤8-line crux of each definition, so the result IS the code you need, no follow-up file read. Add--fullonly when the crux is too small to act on.--in <path>narrows to a subtree before ranking;-n Ncaps results (default 8).- Use it when the question is conceptual or locational: "how does auth work", "where is rate-limiting handled", "what assembles the request pipeline".
- One ask usually answers. A genuinely multi-part question needs one ask per distinct sub-aspect, never the same question reworded. Few or weak hits mean switch tool (grep / skeleton / callers), don't re-ask.
2 · graft grep "<pattern>": exhaustive find
Regex (or --fixed for a literal) over every indexed file, hits grouped by
enclosing symbol and ranked by coupling; it also reports files it couldn't read.
- Use it when you need every occurrence: all call sites, all uses of a
constant, all providers.
askis ranked top-N and will miss instances; grep won't. One grep replaces a spray of asks. - Search a short symbol name or literal, not a full guessed signature: an
over-specific regex (
func (s *Server) GenerateHandler) returns nothing even when the code is indexed. If a grep misses, loosen it (drop the receiver and signature, keep the bare name) and retrygraft grep— do NOT switch to rawgrep -rn, which is slower and unranked. -icase-insensitive;--in <path>scopes to a subtree. Rawgrep -rnis only for files graft genuinely doesn't index (docs, configs, brand-new files).
3 · graft skeleton <file>: a file's API at a glance
Signatures-only view of one file (every function / method / type with its span) in ~200 tokens, ~10x cheaper than reading the file.
- Use it when you need "what's in this file / what can I call here" before
editing or wiring into it. One skeleton is the whole answer for a file; don't
re-skeleton the same file, and don't skeleton every file
mapalready named.
4 · graft callers <symbol>: the exact edges
Precomputed call/reference edges, not a text search. Symbol can be bare
(Foo), qualified (Class.method), or package-qualified (pkg.Fn).
- default
--direction in: who calls/references this; run before you rename, delete, or change its signature. --direction out: what this symbol itself calls/depends on (the oldcallees).--depth N: walk transitively N hops for the full blast radius (the oldimpact);--depth 2is the usual "what breaks if I touch this".--depth all: the entire connected closure — every source reachable through the edges. Reach for this before a refactor, rename, or any multi-file change: it surfaces the sibling and downstream files (platform variants, a module you must split out) that a single-file edit would miss.
5 · graft map: orientation for an unfamiliar repo or area
A token-budgeted tour: directory clusters, per-directory hubs, and global hotspots, straight from the wiring graph.
- Use it when you land in a repo cold or are asked for "the architecture".
mapalone is the answer: read the hub cards it names; do NOT then skeleton or ask your way through every subsystem it lists.--max-dirs Nwidens it.
6 · Lifecycle: graft build / graft check
Every tool above refreshes the graph itself before answering, so what those tools
return always describes the code as it is right now — including edits you just made
and have not committed. You do not need to run build after editing.
One caveat, if you grep the markdown under graft/ directly: those cards are a
projection, rebuilt at the end of the turn rather than
अक्सर पूछे जाने वाले सवाल
क्या इसके लिए API कुंजी चाहिए?
नहीं। स्किल बताती है कि इसके कमांड को API कुंजी की ज़रूरत नहीं और वे लोकल चलते हैं।
क्या यह कोड पढ़ने की जगह ले लेती है?
यह पहले लक्षित संदर्भ देती है, ताकि AI कम पूरी फ़ाइलें पढ़े।
कमांड कितनी तेज़ हैं?
स्किल बताती है कि हर कमांड एक सेकंड से कम में नतीजा लौटाता है।
जानकारी
लेखक का मूल विवरण
This repo is indexed by graft/. For ANY task here, whether understanding how something works, finding where code lives, tracing what calls a symbol or what a change breaks, or scoping an edit, get your context from graft before grepping or reading source files.
repo: trailhq/Trail-Code
लोकप्रियता
- GitHub स्टार
- 11k
- रैंकिंग में स्थान
- #11832
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।