
webitrohq/token-skill
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
クロードコードスキル:ローカルコードマップ(グラフ、AST、LLMなし)なので、クロードはプロジェクト全体を再読み込みを停止します。 質問ごとのトークンをフェアーします.
概要
トークンは、Claudeコードをプロジェクトとルールに与えます。そのため、「Xが起こる場所」を尋ねるたびに、ファイルの読み込みや読み込みを停止します。 地図は AST (tree-sitter, 30 言語) からグラフ化することでローカルに構築されます。 地図の作成は秒かかります。 コードナビゲーションの質問では、Claudeは通常、 grep を探索し、ファイルを開き、3 回繰り返す。 中規模のプロジェクトでは、原材料の100k+トークンを簡単に対応できます。 グラフクエリは、関連するシンボル、ファイル、ライン番号を数百〜数千トークンに返し、Claudeはそれらの行のみを開きます。 測定例(実際のプロジェクトで「このフローの作業をする方法」):地図で。 保存はタスクによって異なります。 既に開いているファイルで一行の修正のために、 "where / これを呼び出すか、フローが移動する方法" の質問と小さかったです。 1. それが欠落している場合: uv ツールをインストールします。, pipx, その後、プライベート venv に ~/.local/share/token-skill/venv. sudoはありません。 2.
概要(AI 翻訳)
[[token] は、Claude Code に、プロジェクトの code map と、マップを最初に **ask するルールを与えるので、「X が起こるの?」と尋ねるたびに、ファイルをリッピングして読み込みを停止します。
地図は AST (tree-sitter, 30 言語) からグラフ化することでローカルに構築されます。 LLMの呼び出し無し、APIのキー無し、あなたの機械を残しません。 地図の作成は秒かかります。
なぜ
コードナビゲーションの質問では、Claudeは通常、 grep を探索し、ファイルを開き、3 回繰り返す。 中規模のプロジェクトでは、原材料の100k+トークンを簡単に対応できます。 グラフクエリは、関連するシンボル、ファイル、ライン番号を数百〜数千トークンに返し、Claudeはそれらの行のみを開きます。
測定例(実際のプロジェクトでこのフローの作業をする方法):~169k の抽出トークン → ~2.9k トークン のマップで。
保存はタスクによって異なります。 既に開いているファイルで一行の修正のために、 “where / これを呼び出すか、フローが移動する方法” の質問と小さかったです。
それが何をするか
プロジェクトで[[T1]を実行します。
1.** 行方不明の場合、 graphify** をインストールします。[uv tool install], [pipx]], [[~/.local/share/token-skill/venv]]).
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
token — a Claude Code skill that stops re-reading your whole project
token gives Claude Code a code map of your project and a rule to ask the map first, so it stops grepping and reading file after file every time you ask “where does X happen?”.
The map is built locally by graphify from the AST (tree-sitter, 30 languages). No LLM calls, no API key, nothing leaves your machine. Building a map takes seconds.
/token
map: 63 nodes · 176 edges · 8 communities · graph.json 48 KB
tokens: GRAPH_REPORT.md ≈ 651 · raw source ≈ 21551 · query output typically 0.5–4k
freshness: up to date
CLAUDE.md: token rule written → ./CLAUDE.md
Why
On a code-navigation question, Claude usually explores: grep, open a file, open three more, repeat. On a mid-sized project that can easily be 100k+ tokens of raw source before it answers. A graph query returns the relevant symbols, files and line numbers in a few hundred to a few thousand tokens, and Claude then opens only those lines.
Measured example (one “how does this flow work” question on a real project): ~169k tokens of exploration → ~2.9k tokens with the map.
Savings depend on the task. They are large for “where / what calls this / how does the flow go” questions and small for a one-line fix in a file you already have open.
What it does
Running /token in a project:
- Installs graphify if it’s missing:
uv tool install, thenpipx, then a private venv in~/.local/share/token-skill/venv. Nosudo. - Builds or updates the map in
graphify-out/(AST only). Files with a code extension but an XML body (Tiled tilesets etc.) are added to.graphifyignorefirst, because they break parsing. - Writes a rule to the project’s
CLAUDE.md, in a marked, idempotent block: for code questions, rungraphify querybefore the first grep/read, nevercatthe wholegraph.json, and update the map after changing code. - Reports real numbers: nodes/edges, the token size of the report vs. the raw source, and whether the map is stale.
Optional --strict mode installs a Claude Code PreToolUse hook that blocks the first raw file read in a session until a graph query has run.
Install
Requirements: macOS, Linux or Windows (Git Bash or WSL), bash, Python 3.10+, internet for the first install.
git clone https://github.com/WebitroHQ/token-skill.git
bash token-skill/token/scripts/install.sh
The install copies the skill to ~/.claude/skills/token/ and sets up graphify. The last line should be ready: type /token in Claude Code. Then restart Claude Code, because skills load at session start.
Check:
~/.local/bin/graphify --version && ls ~/.claude/skills/token/SKILL.md ~/.claude/skills/graphify/SKILL.md
If graphify is not found, add export PATH="$HOME/.local/bin:$PATH" to your shell profile.
Usage
In Claude Code, inside a project:
| You say | What happens |
|---|
推奨ツール
別のキーワードを試すか、フィルタを外してください。
インストール
npx skillfish add webitrohq/token-skill