GR

graphify-knowledge-graph

Turns folders of code, docs, and images into a queryable knowledge graph for better project context.

Install

mkdir -p .claude/skills/graphify-knowledge-graph && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11695" && unzip -o skill.zip -d .claude/skills/graphify-knowledge-graph && rm skill.zip

Installs to .claude/skills/graphify-knowledge-graph

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
67 chars · catalog descriptionno explicit “when” trigger
Intermediate

Key capabilities

  • Build queryable knowledge graphs from code files
  • Build queryable knowledge graphs from documentation files
  • Build queryable knowledge graphs from research papers
  • Build queryable knowledge graphs from image files
  • Query the knowledge graph for relationships and explanations
  • Integrate with AI coding assistants for always-on graph consultation

How it works

The skill processes files in two passes: an AST pass for code to extract structure and a Claude pass for docs/images to extract concepts and relationships, then builds a queryable knowledge graph.

Inputs & outputs

You give it
A folder containing code, documents, papers, or images, or a specific query for an existing graph
You get back
An interactive HTML graph, a markdown report, a JSON graph file, or query results

When to use graphify-knowledge-graph

  • Understand codebase relationships
  • Query design rationale
  • Extract structure from project folders
  • Analyze cross-file dependencies

About this skill

---
name: graphify-knowledge-graph
description: Build queryable knowledge graphs from code, docs, papers, and images using AI coding assistant skills
triggers:
  - "graphify my codebase"
  - "build a knowledge graph"
  - "turn my files into a graph"
  - "understand this codebase with graphify"
  - "run graphify on this folder"
  - "query the knowledge graph"
  - "install graphify skill"
  - "extract relationships from my code"
---

# graphify-knowledge-graph

> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.

graphify turns any folder of code, docs, papers, or images into a queryable knowledge graph. It runs as an AI coding assistant skill — type `/graphify` in Claude Code, Codex, OpenCode, or OpenClaw to extract structure, relationships, and design rationale from your files into an interactive graph you can navigate and query without re-reading raw files.

---

## Install

```bash
pip install graphifyy && graphify install

The PyPI package is graphifyy; the CLI and skill command remain graphify.

Platform-specific install

graphify install                        # Claude Code (default)
graphify install --platform codex       # Codex
graphify install --platform opencode    # OpenCode
graphify install --platform claw        # OpenClaw

Always-on assistant integration (recommended)

Run once per project so your assistant consults the graph before searching files:

graphify claude install      # writes CLAUDE.md section + PreToolUse hook (Claude Code)
graphify codex install       # writes AGENTS.md (Codex)
graphify opencode install    # writes AGENTS.md (OpenCode)
graphify claw install        # writes AGENTS.md (OpenClaw)

Undo with the matching uninstall command:

graphify claude uninstall

Manual install (curl, no pip)

mkdir -p ~/.claude/skills/graphify
curl -fsSL https://raw.githubusercontent.com/safishamsi/graphify/v3/graphify/skill.md \
  > ~/.claude/skills/graphify/SKILL.md

Add to ~/.claude/CLAUDE.md:

- **graphify** (`~/.claude/skills/graphify/SKILL.md`) - any input to knowledge graph. Trigger: `/graphify`
When the user types `/graphify`, invoke the Skill tool with `skill: "graphify"` before doing anything else.

Core workflow

1. Build the graph

# In your AI coding assistant
/graphify .                        # current directory
/graphify ./src                    # specific folder
/graphify ./raw --mode deep        # aggressive INFERRED edge extraction
/graphify ./raw --no-viz           # skip HTML, produce report + JSON only

2. Outputs

graphify-out/
├── graph.html       # interactive — click nodes, search, filter by community
├── GRAPH_REPORT.md  # god nodes, surprising connections, suggested questions
├── graph.json       # persistent graph — query later without re-reading files
└── cache/           # SHA256 cache — re-runs only process changed files

3. Query the graph

/graphify query "what connects attention to the optimizer?"
/graphify query "what connects attention to the optimizer?" --dfs        # trace a path
/graphify query "what connects attention to the optimizer?" --budget 1500  # cap tokens
/graphify path "DigestAuth" "Response"      # shortest path between two nodes
/graphify explain "SwinTransformer"         # expand a single node

Key commands reference

Building

CommandWhat it does
/graphify .Build graph from current directory
/graphify ./folderBuild from a specific folder
/graphify ./folder --mode deepMore aggressive INFERRED edge extraction
/graphify ./folder --updateRe-extract only changed files, merge into existing graph
/graphify ./folder --cluster-onlyRerun clustering without re-extraction
/graphify ./folder --watchAuto-sync as files change (code: instant AST; docs: notifies you)

Ingesting remote content

/graphify add https://arxiv.org/abs/1706.03762          # fetch a paper, add to graph
/graphify add https://x.com/karpathy/status/...         # fetch a tweet
/graphify add https://... --author "Andrej Karpathy"    # tag original author
/graphify add https://... --contributor "Your Name"     # tag who added it

Querying

/graphify query "why does the auth layer depend on redis?"
/graphify query "what implements the retry protocol?" --dfs
/graphify path "Transformer" "AdamW"
/graphify explain "DigestAuth"

Exporting

/graphify ./folder --svg              # export graph.svg
/graphify ./folder --graphml          # export graph.graphml (Gephi, yEd)
/graphify ./folder --neo4j            # generate cypher.txt for Neo4j import
/graphify ./folder --neo4j-push bolt://localhost:7687   # push to live Neo4j
/graphify ./folder --obsidian         # generate Obsidian vault (opt-in)
/graphify ./folder --wiki             # build agent-crawlable wiki (index.md + per-community articles)
/graphify ./folder --mcp              # start MCP stdio server

Git hooks

graphify hook install     # post-commit + post-checkout: auto-rebuild on commit/branch switch
graphify hook uninstall
graphify hook status

Supported file types

TypeExtensionsExtraction method
Code.py .ts .js .go .rs .java .c .cpp .rb .cs .kt .scala .php .swift .luaAST via tree-sitter + call graph + docstring/comment rationale (no LLM)
Docs.md .txt .rstConcepts + relationships + design rationale via Claude
Papers.pdfCitation mining + concept extraction
Images.png .jpg .webp .gifClaude vision — screenshots, diagrams, any language

How it works

graphify runs in two passes:

  1. AST pass (deterministic, no LLM): Extracts classes, functions, imports, call graphs, docstrings, and rationale comments from code files.
  2. Semantic pass (parallel Claude subagents): Extracts concepts, relationships, and design rationale from docs, papers, and images.

Results are merged into a NetworkX graph, clustered with Leiden community detection (topology-based — no embeddings or vector database), and exported as HTML, JSON, and a plain-language audit report.

Edge provenance tags

Every relationship is tagged so you always know what was found vs guessed:

TagMeaningConfidence
EXTRACTEDFound directly in sourceAlways 1.0
INFERREDReasonable inference0.0–1.0 score
AMBIGUOUSFlagged for human review

Python API

graphify is primarily a CLI/skill tool, but the graph output (graph.json) is standard NetworkX JSON you can load and traverse:

import json
import networkx as nx

# Load the persistent graph
with open("graphify-out/graph.json") as f:
    data = json.load(f)

G = nx.node_link_graph(data)

# Find god nodes (highest degree)
god_nodes = sorted(G.degree(), key=lambda x: x[1], reverse=True)[:10]
for node, degree in god_nodes:
    print(f"{node}: {degree} connections")

# Find all EXTRACTED edges (high confidence, found in source)
extracted_edges = [
    (u, v, d) for u, v, d in G.edges(data=True)
    if d.get("provenance") == "EXTRACTED"
]

# Find INFERRED edges above a confidence threshold
high_confidence_inferred = [
    (u, v, d) for u, v, d in G.edges(data=True)
    if d.get("provenance") == "INFERRED" and d.get("confidence_score", 0) > 0.85
]

# Shortest path between two concepts
try:
    path = nx.shortest_path(G, source="DigestAuth", target="Response")
    print(" -> ".join(path))
except nx.NetworkXNoPath:
    print("No path found")

# Get all nodes in a community
communities = {}
for node, data in G.nodes(data=True):
    community_id = data.get("community")
    if community_id is not None:
        communities.setdefault(community_id, []).append(node)

for cid, members in sorted(communities.items()):
    print(f"Community {cid}: {', '.join(members[:5])}{'...' if len(members) > 5 else ''}")

Working with rationale nodes

graphify extracts # NOTE:, # IMPORTANT:, # HACK:, # WHY: comments and docstrings as rationale_for nodes:

# Find all rationale nodes and what they explain
rationale_nodes = [
    (node, data) for node, data in G.nodes(data=True)
    if data.get("node_type") == "rationale_for"
]

for node, data in rationale_nodes:
    print(f"Rationale: {data.get('label')}")
    # Find what this rationale is connected to
    neighbors = list(G.neighbors(node))
    print(f"  Explains: {neighbors}")

Querying semantic similarity edges

# Find cross-file semantic links (concepts connected without structural relationship)
semantic_edges = [
    (u, v, d) for u, v, d in G.edges(data=True)
    if d.get("relation") == "semantically_similar_to"
]

for u, v, data in semantic_edges:
    score = data.get("confidence_score", 0)
    print(f"{u} ~ {v} (confidence: {score:.2f})")

Common patterns

Pattern 1: Onboard to an unfamiliar codebase

# Install graphify, build the graph, read the report
pip install graphifyy && graphify install

# In Claude Code
/graphify .

# Read the output — god nodes tell you what everything routes through
cat graphify-out/GRAPH_REPORT.md

Pattern 2: Mixed research corpus (Karpathy-style /raw folder)

Drop code, PDFs, screenshots, and notes in one folder:

raw/
├── attention_is_all_you_need.pdf
├── training_notes.md
├── whiteboard_photo.png
├── nanoGPT/
│   └── model.py
└── tweet_screenshot.jpg
/graphify ./raw

graphify uses Claude vision on images, citation mining on PDFs, AST on code, and semantic extraction on markdown — all merged into one graph.

Pattern 3: Incremental updates (large codebase)

# First full build
/graphify ./src

# After making changes — only re-processes changed files via SHA256 cache
/graphify ./src --update

# After a major refactor — rerun clustering without re-extracting
/graphify ./src --cluster-only

Pa


Content truncated.

When not to use it

  • When the corpus is too small (< ~6 files) for significant token reduction
  • When only raw file content is needed without structural analysis

Prerequisites

pip install graphifyy

Limitations

  • Token reduction is minimal for small corpuses (< ~6 files)
  • Watch mode provides instant rebuilds only for code files, not docs or images
  • OpenClaw uses sequential extraction, not parallel agent support

How it compares

This skill transforms diverse file types into an interactive, queryable knowledge graph, enabling structural understanding and design rationale extraction without manual file reading, unlike traditional file search.

Compared to similar skills

graphify-knowledge-graph side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
graphify-knowledge-graph (this skill)04moReviewIntermediate
scientific-brainstorming377moNo flagsIntermediate
webclaw14moReviewIntermediate
yams12moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

scientific-brainstorming

davila7

Research ideation partner. Generate hypotheses, explore interdisciplinary connections, challenge assumptions, develop methodologies, identify research gaps, for creative scientific problem-solving.

37155

webclaw

0xmassi

Web extraction engine with antibot bypass. Scrape, crawl, extract, summarize, search, map, diff, monitor, research, and analyze any URL — including Cloudflare-protected sites. Use when you need reliable web content, the built-in web_fetch fails, or you need structured data extraction from web pages.

14

yams

trvon

Code indexing, semantic search, and knowledge graph for project memory

18

literature-review

K-Dense-AI

Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).

5591,298

openalex-database

davila7

Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.

48202

market-research-reports

davila7

Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for data gathering, and multi-framework strategic analysis including Porter's Five Forces, PESTLE, SWOT, TAM/SAM/SOM, and BCG Matrix.

38162

Search skills

Search the agent skills registry