graft

graft is a skill for Claude Code from atretyak1985/swarmery. It costs 102 tokens per session (1,447 once invoked), scanned A, original, Apache-2.0.

A local graph of a code repository that links files and symbols through calls, imports, and containment. It answers code-location and dependency questions with ranked file-and-line results.

In plain words
What is it for?
Use it to find where behavior is handled, inspect what a file exposes, map an unfamiliar repository, and see callers or called code before renaming or deleting a symbol.
Why use it?
It reduces the need to search repeatedly with text searches and open many files when learning an unfamiliar codebase or judging the effect of a change.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the graft-pack plugin — 1 skill shipped together

Good fit Use it to find where behavior is handled, inspect what a file exposes, map an unfamiliar repository, and see callers or called code before renaming or deleting a symbol.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atretyak1985/swarmery/graft
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add atretyak1985/swarmery --skill graft
Clone the repo
git clone --depth 1 https://github.com/atretyak1985/swarmery

Made for: Claude Code.

Or install graft-pack, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graft

README.md
[![agentmods](https://agentmods.dev/badge/skills/atretyak1985/swarmery/graft/github.svg)](https://agentmods.dev/skills/atretyak1985/swarmery/graft)
Your own site
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/graft"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/graft/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for graft

Your own site · 80×15
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/graft"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/graft.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,447 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00102 $0.01447
Opus 5 $0.00051 $0.00724
Sonnet 5 $0.00020 $0.00289
Haiku 4.5 $0.00010 $0.00145

Measured 2d ago against content hash 63b0a6b5cc3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

graft scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/graft-pack/skills/graft/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

graft

graft is a context graph over the repo: every file and symbol as a node, calls/imports/contains as edges, kept next to the code in graft/. Its whole point is that finding code should cost one ranked answer, not a widening sequence of greps.

Requires the graft CLI on the machine (npm i -g @nanonets/graft). No API key and no model call for anything below — every command here is a local graph read.

Pick the command from the question

The question you actually have Command
"How does X work?" / "Where is X handled?" graft ask "<question>" --source -n 5
"Every place this string/pattern appears" graft grep "<pattern>"
"What does this file expose?" graft skeleton <path>
"Who calls this?" — before a rename or delete graft callers <symbol> --depth 2
"What does this call?" graft callers <symbol> --direction out
"I have never seen this repo" graft map

--source is the flag that matters on ask: it inlines the code at each hit, so the answer replaces opening the files rather than pointing at them. Reach for --full only when a crux excerpt genuinely cut something you need.

Rules

  1. No index, no graft. If graft/ is absent, say so and use /search; do not build one mid-task without asking.
  2. ask before grep. ask is ranked and graph-aware; grep is exhaustive and unranked. Use grep when you need every occurrence, not to start a hunt.
  3. Depth is a claim about risk. On callers, d=1 breaks, d=2 probably breaks, deeper is a maybe. --depth all gives the full closure for a delete.
  4. Confidence is not decoration. extracted edges come from the syntax tree; inferred edges were resolved heuristically — verify one before calling it a break.
  5. A stale graph lies by omission. New callers it never saw read as "safe to change". graft check fails on staleness; a plain graft build is incremental.
  6. Never report tokens saved. The graph is how you work, not a result to announce.

Read the full file on GitHub · 101 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 101 lines · 102 tokens per session scan A 63b0a6b5cc3f

Subscribe to this mod's changes

graft is a skill published in the GitHub repository atretyak1985/swarmery (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 102 tokens to every session and 1,447 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.

Related

Other skills, from other repositories

debugging

This skill should be used when a test is failing inexplicably, when a runtime error appears in production, when a bug reproduces unpredictably, or when two or more prior fix attempts have failed. Provides a 4-phase systematic debugging workflow — investigate, analyze patterns, form hypothesis, fix with test — to…

fakoli/fakoli-plugins · 102 tokens

typescript-testing

Select and run TypeScript SDK verification for packages, examples, type checks, linting, builds, Vitest suites, Effect v4 CLI tests, and runtime E2E tests. Use when adding tests, diagnosing TypeScript CI, choosing a focused test command, validating TypeScript package changes, or writing/porting CLI tests against…

ComposioHQ/composio · 95 tokens

potpie-cli

Use when the task is centered on running, explaining, configuring, or troubleshooting the potpie command: doctor, login, pot management, source registration, search, graph workbench reads/writes, and pot scope behavior.

potpie-ai/potpie · 50 tokens

sonarqube-mcp

Provides SonarQube and SonarCloud integration patterns via the Model Context Protocol (MCP) server. Enables quality gate monitoring, issue discovery and triaging, pre-push code analysis, and rule education directly in the agent workflow. Use when the user wants to check quality gates, search for Sonar issues, analyze…

giuseppe-trisciuoglio/developer-kit · 127 tokens

stall-reset

Reset CocoStall counters after an operator-approved recovery.

Snowflake-Labs/cocoplus · 14 tokens

stall-thresholds

Show or update CocoStall thresholds.

Snowflake-Labs/cocoplus · 13 tokens