loom-code
Skill87 starsChanged 3 days agoApache-2.0View on GitHub
Route-then-read code intelligence for a loom-indexed repository. WHEN: the repo is indexed by loom (LOOM_BASE_URL set, or a `.loom` marker), and you would otherwise read whole files, grep the tree, or guess who calls a function. Use loom's code.* tools to find the exact unit first, then read only that. FOR SINGLE OPERATIONS: call the code.* MCP tool directly.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- loom-address-reviewSkill
- loom-benchSkill
- loom-changeSkill
- loom-debugSkill
- loom-deploySkill
- loom-dev-setupSkill
- loom-file-issueSkill
- loom-investigate-ciSkill
- loom-pre-pushSkill
- loom-releaseSkill
- loom-reviewSkill
- loom-ship-prSkill
- loom-writingSkill
- loomSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 57
Every op takes token_budget.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
loom-code — find the unit, then read it
Loom indexes the repository (tree-sitter + compiler tiers, merged-PR
history, tests, callers) and answers structural questions as-of the indexed
head. The index is a router: it tells you which unit to read, so the
read is one function instead of one file. Reading the whole file after a
code.search hit throws the saving away.
The loop
- Orient once.
code.context_pack(apr_number, or atasksentence for a change not yet made) gives the briefing: touched symbols with callers, files that usually change together, related tests, recent PRs. Default budget 2,500 tokens; sections are filterable. - Locate, don't browse.
- You know the name →
code.symbol(qualified or bare;Class::method). - You know a phrase or a mechanism →
code.search(top_k5–10,bodies: "none"first; expand a single unit with thenextcall the result carries). - You know a regex or literal →
code.grep(index-served, returnspath:lineplus the enclosing function). - You hold
path:linepairs from a diff or a stack →code.enclosingresolves each to its innermost function.
- You know the name →
- Ask the graph, never infer it.
code.callers/code.callees(depth 1 unless you need more),code.impactfor the blast radius of a change (callers, tests reaching it, co-change partner files),code.traceto resolve stack frames,code.examplesfor call sites,code.historyfor the PRs that touched a symbol. - Read the unit. Open the file at the returned
path:start_lineand read that span. Only read more when the unit references something you did not get back. - Verify before you assert.
code.verifychecks a claim ("X calls Y", "Z is defined in file F") against the index and answersconfirmed,refutedornot_established(the graph is a floor: an absence is neverrefuted, so say the claim was not established). - Report what you used.
code.outcomewith thetrace_run_idfrom the response and anaction:used_in_answer,opened_file(the paths you opened astargets),fell_back_greporignored. Outcomes train ranking; a silent session teaches nothing. - Before you open a PR, ask whether one exists.
code.pr_checkwith the draft — title, body, the paths you changed, the symbols, the issues it closes — answersduplicate_of(an open PR is already doing this, or a merged one already did: check main before you push),related(read those first) ornone(open it). Items carry state, score and evidence lines; a title alone never reads as a duplicate. Callable by name.
Budgets
Every op takes token_budget. Defaults are tuned per op (search 4k,
context_pack 2.5k, impact 3k). Ask for bodies: "none" on the first call
and expand one unit rather than raising the budget. code.ask returns a
grounded prose answer with citations; use it for "how does X work"
questions, not for locating code.
Merged code, not your working tree
The index answers for the indexed commit (as_of). Files you have changed
and not merged are not in it: read those directly, and pass your diff to
code.impact (files, diff) for what the change reaches.
Trust the abstain
Responses carry abstain, abstain_code, retrieval_confidence, and
as_of (branch, commit, stale, not_covered). not_covered means the
path is outside the indexed prefixes — go read the file. stale: true
means the index lags head; prefer the working tree for the files in the
recent commits it lists. A low-confidence hit is a hint, not a citation.
When you cannot call tools
Some harnesses run without tool access (claude --bare). Loom's grep shim
(integrations/grep-shim) annotates every grep/rg line with the
enclosing function from the index, byte-identical output otherwise, so the
router still works through the shell.
Install
Install either this skill (loom-code-skill) or the loom plugin, not
both: the plugin ships its own skill named loom-code.
Identity
Org and namespace default to the deployment's code plane; set consumer
to your agent's name for trace attribution. A viewer token is enough for
every read; code.refresh needs writer.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

