惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
T
Tenable Blog
D
DataBreaches.Net
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
V
Visual Studio Blog
B
Blog
雷峰网
雷峰网
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
I
InfoQ
M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
The Cloudflare Blog
L
LangChain Blog
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
博客园 - 司徒正美
T
The Exploit Database - CXSecurity.com
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Attack and Defense Labs
Attack and Defense Labs
Martin Fowler
Martin Fowler
SecWiki News
SecWiki News
T
Threat Research - Cisco Blogs
J
Java Code Geeks
Cyberwarzone
Cyberwarzone
Forbes - Security
Forbes - Security
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
O
OpenAI News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Schneier on Security
Schneier on Security
S
Security @ Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
The Hacker News
The Hacker News
H
Help Net Security
Y
Y Combinator Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
量子位
U
Unit 42
S
SegmentFault 最新的问题
V
V2EX
D
Docker

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
How Graphify Stopped My Team from Burning Through Cursor's Context Window
Vikrant Negi · 2026-06-21 · via DEV Community

Every time I asked Cursor about our auth flow, it would open 8-12 files, read through each one, and burn through tokens before even starting to answer. For a React Native codebase maintained by 6 developers, this adds up fast.

I lead a front-end team building React Native apps. Cursor is our primary IDE. And while Cursor is great at understanding code, the way it retrieves context — by grepping and reading raw files sequentially — doesn't scale well on larger projects.

Then I found Graphify, and it fundamentally changed how our AI assistant interacts with our codebase.

What Graphify actually does

Before I get to the setup, it's worth understanding the mechanism — because it's not just another Cursor plugin.

Graphify pre-processes your entire project into a knowledge graph. Think of it as a map of your codebase where every function, class, module, and concept becomes a node, and every relationship between them becomes an edge. When Cursor needs to answer a question, instead of reading 47 files to understand a flow, it runs graphify query "auth flow" — a scoped subgraph lookup that returns only the relevant nodes and connections.

The important part: code extraction happens entirely locally via tree-sitter AST parsing. No API calls, no code leaving your machine. You only hit an LLM when processing docs, PDFs, or images. For a pure code project (which most React Native apps are), the extraction cost is basically zero.

The output is three files:

  • graph.json — the full graph (the core artifact your assistant queries)
  • graph.html — an interactive visualization you can explore in a browser
  • GRAPH_REPORT.md — an architecture summary with god nodes, surprising connections, and suggested questions

That report alone is worth the setup. It finds connections between modules you didn't realize existed and surfaces the most-connected concepts in your project — the things everything flows through.

Setting up Graphify for Cursor

I'm on an M1 MacBook Pro. Here's the exact setup that worked for me.

Install

brew install uv  # if you don't have it already
uv tool install graphifyy

Important: use uv tool install, not pip install. On M1 Macs, pip can break Python path resolution because Graphify resolves the Python binary at runtime from a cached path. uv isolates the environment and avoids this entirely. I learned this the hard way.

Build the graph

cd your-project
graphify extract .

First run takes a few minutes depending on codebase size. Since our projects are all code (no PDFs/docs), the entire extraction runs locally on tree-sitter — no API key needed for this step.

Install the Cursor integration

graphify cursor install

This writes a .cursor/rules/graphify.mdc file with alwaysApply: true. If you've worked with Cursor's rule system, you know what this means — it gets injected into every conversation automatically, telling Cursor to prefer graphify query over reading raw source files.

Quick note for anyone working with .mdc files: a rule with alwaysApply: false and no globs and no description will never auto-apply — it becomes manual @-mention only. Graphify sets alwaysApply: true, which is the correct move for a global project context rule.

Set up the git hook

graphify hook install

This installs a post-commit hook. Every time anyone commits, it auto-rebuilds the graph using tree-sitter — fully local, takes seconds. It also sets up a git merge driver so if two devs commit graph updates in parallel, graph.json gets union-merged automatically instead of leaving conflict markers.

After this, you basically forget Graphify is running. The graph stays current with every commit.

Rolling this out to a team

This is where I had the most questions before adopting it, so let me cover the practical stuff.

What to commit

Add these to your repo:

graphify-out/
├── graph.json          # the core artifact
├── graph.html          # interactive visualization
├── GRAPH_REPORT.md     # architecture summary
├── manifest.json       # tracks extracted files (uses relative paths — portable)
└── cache/              # optional — commit for faster rebuilds

.cursor/rules/graphify.mdc    # the Cursor integration rule
.graphifyignore               # if you create one

Add this to .gitignore:

graphify-out/cost.json

cost.json tracks Graphify's own LLM API spend during extraction — not tokens saved in Cursor. It's local accounting, not a shared artifact.

Impact on teammates who don't use Graphify

Zero. This matters — Graphify is purely additive.

The graphify-out/ folder is just inert data files. No build process depends on them, no CI breaks without them. The .mdc file only affects Cursor users who have that rule active. If a dev without Graphify installed triggers the post-commit hook, it fails silently (binary not found) and the commit goes through normally.

You can adopt this incrementally. Install it yourself, commit graphify-out/, and other devs benefit from the graph whenever they install Graphify later. No coordination needed.

Recommended team workflow

  1. Initial setup on main — do the first graphify extract . on main and commit graphify-out/. This becomes the shared baseline everyone pulls.
  2. Feature branches update automatically — the git hook rebuilds incrementally after every commit on any branch.
  3. On merge to main — the graph from the feature branch comes with it. The merge driver handles concurrent updates.

One edge case: if someone runs a long-lived feature branch without the hook installed, their graph.json will drift. A manual graphify extract . --update before raising the MR resyncs it. I've considered adding this to our MR checklist, but honestly the hook handles 99% of cases.

What can go wrong

A few things I ran into or anticipated:

The M1 pip issue. Already mentioned above — use uv tool install, not pip. Wasted about 20 minutes debugging path resolution before figuring this out.

Can you actually measure token savings? Honestly, not directly. Cursor doesn't expose per-conversation token usage. What you can observe: response latency drops (graph queries are faster than multi-file reads), context window pressure reduces (fewer "context limit reached" moments), and Graphify logs every query at ~/.cache/graphify-queries.log with nodes returned and duration — so you get a sense of how targeted the retrieval is.

The rough mental model: without Graphify, Cursor answering "how does auth connect to the API layer?" reads 8-12 files. A typical React Native file is ~200-400 tokens. That's ~3000 tokens just for context loading, before the answer. With Graphify, it reads a scoped subgraph — a fraction of that.

cost.json is not "tokens saved." I initially confused this. cost.json tracks what Graphify itself spent on LLM calls during extraction. For a code-only project, this is near zero. It has nothing to do with what Cursor saves in conversation.

Graph drift on branch switches. If you install the post-commit hook but not the post-checkout hook, switching branches won't rebuild the graph. The latest version of Graphify supports post-checkout hooks too — check if graphify hook install sets both up for you.

What I'd do differently

If I were setting this up again:

  1. Run the initial extraction on a clean main branch first. I initially ran it on a feature branch and had to redo it when I realized the team needed the baseline on main.
  2. Check GRAPH_REPORT.md before sharing with the team. It surfaces god nodes and surprising connections — some of which might reveal architectural issues you'd rather address before making the graph a shared artifact.
  3. Skip committing cache/ initially. It speeds up rebuilds but adds repo size. Start without it and add later if rebuild times become annoying.

Who should use this

Graphify makes the most difference when:

  • Your codebase has 50+ files and multiple modules that interact
  • You use Cursor (or Claude Code, Codex, Gemini CLI — it supports 10+ assistants)
  • You're on a team and tired of your AI assistant not "knowing" the codebase between sessions
  • You do code reviews and need to quickly understand how a change connects to the rest of the system

For small projects with 5-6 files, the graph adds structural clarity but the token savings are minimal — the files already fit in a context window.

Try it

brew install uv
uv tool install graphifyy
cd your-project
graphify extract .
graphify cursor install  # or the equivalent for your IDE
graphify hook install

That's 5 commands to set up. The graph builds, your assistant starts using it, and the hook keeps it current. No config files to write, no services to run.

Check out the Graphify repo for the full docs. If you're on Cursor specifically, the .mdc integration is the smoothest path — it just works.

If you've been feeling like Cursor "forgets" your codebase every conversation, or burns through context reading files it shouldn't need — Graphify is worth the 10 minutes to set up. It was for me.


I'm a React Native tech lead exploring AI-assisted development workflows. Find me on Twitter and GitHub.