WT

webitrohq/token-skill

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

29 stars 품질 61 트렌드 26MIT

Claude Code Skill: 로컬 코드 맵 (graphify, AST, no LLM) 그래서 Claude는 전체 프로젝트를 재읽을 수 있습니다. 질문 당 Fewer 토큰.

개요

토큰은 프로젝트의 Claude 코드와 규칙을 제공합니다 , 그래서 당신은 "X가 발생합니까?"라고 묻은 모든 시간 후에 grepping 및 판독 파일을 중지합니다. 지도는 AST (tree-sitter, 30 개 언어)에서 그래픽으로 로컬로 구축됩니다. 지도가 몇 초 걸립니다. 코드 네비게이션 질문에서, Claude는 보통 탐구합니다: grep, 파일을 열고, 3개를 더, 반복 엽니다. 답변하기 전에 100k+ 토큰이 될 수있는 중간 크기의 프로젝트. 그래프 쿼리는 관련 기호, 파일 및 줄 번호를 몇 천 개의 토큰으로 반환하고 Claude는 그 줄 만 열립니다. 측정 된 예 (이 흐름 작업은 어떻게 작동합니까?) :지도. 저축은 작업에 달려 있습니다. 그들은 "어떻게 /이 호출하는 것은 / 어떻게 흐름이 이동"문제와 당신이 이미 열려있는 파일에 한 줄의 고정에 대한 작은. 1. 그것이 누락된 경우: uv 공구 설치, 그 후에 pipx, 그 후에 ~/.local/share/token-skill/venv에 있는 개인적인 venv. 이름 * 2. 명세.

개요(AI 번역)

token 은 Claude Code a code map 의 프로젝트와 의 규칙 ** 먼저 맵을 처리한다**, 그래서 당신은 “X가 발생합니까?” 파일을 요청한 후 grepping 및 판독 파일을 중지합니다.

지도는 AST (tree-sitter, 30 개 언어)에서 그래픽으로 로컬로 구축됩니다. ** LLM 통화 없음, API 키 없음, 아무것도 당신의 기계를 나타낸다. ** 지도가 몇 초 걸립니다.

왜

코드 네비게이션 질문에서, Claude는 보통 탐구합니다: grep, 파일을 열고, 3개를 더, 반복 엽니다. 답변하기 전에 100k+ 토큰이 될 수있는 중간 크기의 프로젝트. 그래프 쿼리는 관련 기호, 파일 및 줄 번호를 몇 천 개의 토큰으로 반환하고 Claude는 그 줄 만 열립니다.

측정된 예 (이 흐름은 어떻게 작동합니까?) : ** ~ 169k exploration의 토큰 → ~ 2.9k 토큰**지도.

저축은 작업에 달려 있습니다. 그들은 "어떻게 /이 호출하는 것은 / 어떻게 흐름이 이동"문제와 당신이 이미 열려있는 파일에 한 줄의 고정에 대한 작은.

무엇 그것

프로젝트에서 [T1]] 실행:

  1. **이 누락 된 경우 ** : uv tool install], 다음 pipx], 다음 ~/.local/share/token-skill/venv]의 개인 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:

  1. Installs graphify if it’s missing: uv tool install, then pipx, then a private venv in ~/.local/share/token-skill/venv. No sudo.
  2. 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 .graphifyignore first, because they break parsing.
  3. Writes a rule to the project’s CLAUDE.md, in a marked, idempotent block: for code questions, run graphify query before the first grep/read, never cat the whole graph.json, and update the map after changing code.
  4. 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
GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add webitrohq/token-skill
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →