# 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.

Madar — Local Code Graph for Coding Agents is a free AI agent skill on Agensi by mohammed anji, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [mohammed anji](https://www.agensi.io/creators/mohammed-anji)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Uses: 3
- Version: 1.0
- Last updated: 2026-10-15
- Security: scan passed (2026-10-15); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/madar-local-code-graph-for-coding-agents
- Tags: code-review, ai-agents, testing, typescript, nodejs, mcp-server, impact-analysis, claude-code

## 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.** `retrieve` for "how does X work", `impact` for "what breaks if I change X", `call_chain` for "how does A reach B", `pr_impact` for "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

## Requires

- Node.js 20+
- Madar CLI (@lubab/madar on npm, MIT)

## Known limitations

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 this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Madar — Local Code Graph for Coding Agents skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does this skill do for my coding agent?

It teaches your agent to set up and use Madar, which builds a local graph of your TypeScript/Node.js repo and returns a small, task-scoped context pack for each question. Your agent starts from likely entrypoints and call paths, then opens only the files that matter, instead of broad filename searches.

### Which agents and projects does it work with?

Madar has project-local installers for Claude Code, Codex CLI, Cursor, GitHub Copilot, Gemini CLI, Aider, and OpenCode. It is built for TypeScript and Node.js repositories and helps most on medium-to-large codebases.

### What does setup involve?

Node.js 20+ and the Madar CLI. If Madar is missing, your agent shows you the exact pinned install command (npm install -g @lubab/madar@0.32.2) and runs it only after you say yes. Then `madar try "<question>"` builds the graph, and an optional installer connects your agent over MCP. The agent tells you which config files an installer will write before running it.

### Can it analyze live runtime data or database state?

No. Madar is static analysis of your source code. Runtime paths it reports are hypotheses from the graph, not live traces, and the skill tells your agent to say so.

### What exactly do I get?

A SKILL.md plus two reference files (MCP tool guide and troubleshooting) that teach your agent how to install, connect, and query Madar safely. Madar itself is a separate, free, MIT-licensed npm package (@lubab/madar) by the same author; the skill does not bundle it.

### Is my code sent anywhere?

Madar builds and queries the graph locally with no API key and uploads nothing. Telemetry is off by default. Your agent may still send prompts and selected file content to its own model provider, depending on that agent's settings.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
