- Home
- Skills
- Code Quality & Review
- Madar — Local Code Graph for Coding Agents
Works with the AI Agents you already use
Madar — Local Code Graph for Coding Agents
Give your coding agent a local graph of your TypeScript/Node repo so it starts from the right files, routes, and call paths instead of searching everything.
Free
Madar — Local Code Graph for Coding Agents
Example session with this skill installed
How does password reset work in this repo? Use Madar.
- Read your context and instructions
- Compiled the madar
Summary
Madar was already installed (0.32.2). I ran it from the repo root, then opened the files it pointed to before answering.
madar try "how does password reset work?"
[madar try] Built out/graph.json with 34 nodes for a local first proof.
Graph freshness: fresh
Indexed files: 8
Confidence score: 1.00
Recommended first read
- src/jobs/reset-email-job.ts (enqueueResetEmailJob())
- src/services/password-reset-service.ts (.requestPasswordReset())
- src/app.ts (passwordResetService)
Note: Madar wrote its graph to out/. Add out/ to .gitignore if it isn't already ignored.
Answer
The account route hands the request to PasswordResetService.requestPasswordReset(). It looks up the user by email, saves a random reset token, enqueues the reset-email job, and records an audit event. It returns { queued: true } even when the email is unknown, so callers can't use it to check which accounts exist.
Path
account-routes.ts -> PasswordResetService.requestPasswordReset() -> userRepository.saveResetToken() -> enqueueResetEmailJob()
Files
| File | Why it matters |
|---|---|
src/services/password-reset-service.ts:15 | Token creation, job enqueue, audit event |
src/jobs/reset-email-job.ts | Sends the reset email |
src/routes/account-routes.ts:8 | Entry point for the request |
src/app.ts:6 | Wires the service into the routes |
Confidence
Madar reported confidence 1.00 on a fresh graph. I opened password-reset-service.ts and confirmed the token save and the unknown-email branch. The path is from static analysis, not a live trace.
Next steps
- To let your agent query Madar directly, I can run
madar claude install. It writes.mcp.json, a section inCLAUDE.md, and a prompt hook under.claude/. OK to run it? - Ask
impactonPasswordResetServicebefore changing it, to see what depends on it.
Connects securely to your tools. The creator never sees your data.
About this skill
Madar — stop your agent rediscovering your repo
On a medium or large TypeScript/Node.js codebase, a coding agent usually starts with broad filename searches, rereads the same files, and guesses which route, service, or handler owns the task. Madar gives it a better first move.
Madar builds a local graph of the repository — files, symbols, imports, calls, routes, handlers, framework roles — and turns each question into a small, task-scoped context pack. The agent starts from likely entrypoints and runtime paths, then reads only the files that matter.
What this skill teaches your agent
- Set up Madar safely. Checks Node and the CLI, shows the exact pinned install command, and installs only after you say yes.
- Get a first answer in one command.
madar try "<your question>"builds the graph and returns a recommended first read. - Connect your agent. Runs the right installer for Claude Code, Codex, Cursor, Copilot, Gemini CLI, Aider, or OpenCode, and tells you which config files it will touch before it does.
- Pick the right tool for the question.
retrievefor "how does X work",impactfor "what breaks if I change X",call_chainfor "how does A reach B",pr_impactfor "how risky is my diff". - Answer honestly. Reports graph freshness and indexing coverage, treats runtime paths as static hypotheses, and opens the named files before explaining or editing.
Local by design
- Graph generation runs on your machine, needs no API key, and uploads nothing.
.env*files, private keys, and credential stores are excluded from the graph, and the skill tells your agent not to read them.- Telemetry is off by default.
Who it's for
Developers using AI coding agents on medium-to-large TypeScript or Node.js repositories who ask architecture, runtime-flow, impact, or review questions.
When it won't help
Small repos, non-JS/TS codebases, questions about live runtime state, or heavily dynamic code. The skill tells your agent to say so and fall back to normal search.
Open source (MIT): https://github.com/mohanagy/madar
TypeScript and JavaScript repositories only. Static analysis: cannot see live runtime state, database values, or heavily dynamic dispatch. Little benefit on small repos. Requires installing the Madar CLI (Node.js 20+); the supported install is a global npm package, run only with your approval.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
2 uses
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 1 month ago
- Free with an Agensi account
Requires
Permissions
File Scopes
Terminal: runs the madar CLI (try, doctor, status, agent installers). Network: only for the one-time, user-approved `npm install -g @lubab/madar@0.32.2`; graph generation and queries are fully local. Read files: the agent opens the source files Madar points to; .env*, keys and credential stores are off-limits. Write files: Madar writes its graph to out/ and, only when the user approves an agent installer, writes that agent's MCP/rule config (e.g. .mcp.json, CLAUDE.md, .claude/). No source code is modified.