tofugraph

GraphRAG 구축·검색·상태·수리 — knowledge-manager 그래프 위에 얹는 검색 엔진 운영.

Command

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.

agentmods
npx agentmods add commands/treylom/knowledge-manager/tofugraph
Clone the repo
git clone --depth 1 https://github.com/treylom/knowledge-manager
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 494 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00026 $0.00494
Opus 5 $0.00013 $0.00247
Sonnet 5 $0.00005 $0.00099
Haiku 4.5 $0.00003 $0.00049

Measured today against content hash 07a71ef67eb3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tofugraph 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 today.

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.

commands/tofugraph.md · 32 lines

What it actually says

/tofugraph — GraphRAG 구축·운영·수리

knowledge-manager로 그린 그래프(frontmatter + 위키링크) 위에 GraphRAG 검색을 얹고, 그 서버를 관리·수리합니다. 상세 명세: skills/km-graphrag-ops.md.

사용

/tofugraph              → doctor (진단 + 처방 — 첫 실행이면 여기부터)
/tofugraph build        → 인덱스 구축 (엔진 미설치면 설치 안내)
/tofugraph search <질문> → 검색 1회 (동작 확인)
/tofugraph status       → 상태 + 최근 24h 성능 요약
/tofugraph heal         → 1회성 수리 (이중 확인 후에만 재시작)
/tofugraph auto         → 자동 관리 켜기 (1시간마다 감시·자가치유 데몬, 해제: uninstall-daemon)
/tofugraph guard-set    → 의미 라벨 가드 기준선 재설정 (노트 삭제 등 의도적 감소 후에만)

실행 절차 (에이전트용)

  1. 인자를 파싱한다. 없으면 doctor.
  2. autoinstall-daemon으로, 나머지는 동사 그대로 매핑:
    bash scripts/graphrag-ops/tofugraph.sh <verb> [args]
    
  3. 출력을 사용자 눈높이로 요약한다 — doctor의 [FAIL]/[WARN] 항목은 처방(fix: 줄)을 그대로 전달하고, 전부 [OK]면 "검색 시스템 정상" 한 줄이면 충분.
  4. build가 엔진 미설치를 보고하면 설치 명령을 사용자에게 보여주고 실행 여부를 물어본다 (외부 레포 clone은 사용자 결정).
  5. ⚠️ 경계: 디스크 부족·OS 업데이트류 [WARN]은 이 도구가 고치지 않는다 — 사용자에게 보고만 한다(자동 삭제·정리 금지).
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. today First seen · 32 lines · 26 tokens per session scan A 07a71ef67eb3

Subscribe to this mod's changes

tofugraph is a command published in the GitHub repository treylom/knowledge-manager (227 stars, last pushed yesterday), licensed MIT. It adds 26 tokens to every session and 494 once invoked, about $0.0001 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-01.