Integrate ts_knowledge_graph with Claude Code (Graphify-style)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
调研方向
首先阅读现有的 GraphQuery 方法以及支持 --json 的 CLI 查询命令。然后检查拟议的 .claude/skills/SKILL.md 集成,并确定计划中的 MCP 适配器将如何公开相同的操作。完成的标准是,约定的 Claude Code 集成已形成文档,并且无需更改核心图查询层即可使用。
由索引模型根据 Issue 内容生成。
描述
Goal
Integrate ts_knowledge_graph with Claude Code (and other agents) the way Graphify is — let the agent query the knowledge graph instead of blindly grepping the codebase.
How Graphify does it
Graphify's Claude Code integration is a bundle of three standard Claude Code extension points:
- A
CLAUDE.mddirective — tells Claude to read the generated graph report before answering architecture/dependency questions. - A
PreToolUsehook insettings.json— fires before everyGrep/Globcall so the graph is consulted first (the "always-on" angle they advertise). - An MCP server exposing the graph as callable tools — the most agent-native path, still on Graphify's roadmap (their issue #146), not shipped.
Why we are well positioned
The query layer is already designed as "JSON in, JSON out" agent tools:
GraphQuerymethods (whoCalls,blastRadius,deadExports,neighborhood,references) map one-to-one onto agent tools.- Every CLI query command accepts
--json.
The hard part (a clean, machine-readable query surface) is done; integration is plumbing on top.
Options (lowest to highest effort)
| Approach | What it is | Effort | Best when |
|---|---|---|---|
| CLAUDE.md + slash commands | A directive telling Claude to run ts-knowledge-graph blast-radius <id> --json for impact questions, plus optional /blast-radius commands in .claude/commands/ |
Tiny | Just want Claude to know the tool exists and use it |
| A Skill | A .claude/skills/ skill documenting when/how to invoke the CLI via Bash |
Small | Want automatic triggering + self-documentation — closest to how Graphify ships |
| PreToolUse hook | Intercept Grep/Glob, inject graph context or remind Claude to query the graph first |
Small–medium | Want it consulted before search, not on demand |
| MCP server | Wrap GraphQuery as MCP tools (who_calls, blast_radius, dead_exports, …) so Claude calls them natively, no Bash |
Medium | The most native, portable path — works across Claude Code, Cursor, etc. |
Proposed plan
- Start with a Skill — matches Graphify's actual shipping form, fastest to value. Wraps the existing
--jsonCLI; zero changes to core code, just aSKILL.mdteaching Claude the commands and when to reach for blast-radius / dead-exports / who-calls. - Then add an MCP server — thin adapter over
GraphQuery(already JSON-in/JSON-out) for tool-native, cross-agent use. - Skip the
PreToolUsealways-on hook initially — clever but adds latency to every search and is the easiest piece to add later.
References
- Graphify GitHub: https://github.com/safishamsi/graphify
- Graphify + Claude Code integration page: https://graphify.net/graphify-claude-code-integration.html
- ck:graphify (ClaudeKit docs): https://docs.claudekit.cc/docs/engineer/skills/graphify
- Graphify + code-review-graph (DEV Community): https://dev.to/mir_mursalin_ankur/graphify-code-review-graph-build-a-self-updating-knowledge-graph-for-claude-code-and-other-ai-j1m
- 主要语言
- TypeScript
- 星标
- 7
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jeromeetienne/codespine 的其他 Issue
-
enhancement vision
难度 5/5 一周以上 新手友好度 25/100
jeromeetienne/codespine#234 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
jeromeetienne/codespine#233 ·
-
难度 4/5 3-5 天 新手友好度 45/100
jeromeetienne/codespine#232 ·
-
难度 5/5 一周以上 新手友好度 25/100
jeromeetienne/codespine#223 ·
-
难度 4/5 3-5 天 新手友好度 35/100
jeromeetienne/codespine#220 · 1 条评论 ·
查看 jeromeetienne/codespine 的全部 Issue
相似的 Issue
-
security
难度 2/5 1-3 小时 新手友好度 64/100
IBM/ibmi-mcp-server#256 ·
维护者通常 7 天内回复
-
e2e-failure ready-to-code
难度 1/5 1 小时以内 新手友好度 84/100
redhat-developer/rhdh-plugin-export-overlays#4746 · 1 条评论 ·
维护者通常 1 天内回复
-
area:ui
难度 2/5 1-3 小时 新手友好度 78/100
openfootmanager/openfootmanager#1365 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
boxlite-ai/boxlite#2543 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100