narsil

narsil is a skill for Claude Code from postrv/narsil-mcp. It costs 42 tokens per session (2,556 once invoked), scanned A, original, Apache-2.0.

A code-analysis toolkit for examining indexed software repositories, including their files, symbols, dependencies, and security risks.

In plain words
What is it for?
Use it to find definitions and usages, follow callers and callees, inspect dependencies, review code history, and run static security analysis.
Why use it?
It helps you understand unfamiliar code and trace how parts of a program connect without searching through every file by hand.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the narsil-plugin plugin — 1 skill, 5 commands shipped together

Good fit Use it to find definitions and usages, follow callers and callees, inspect dependencies, review code history, and run static security analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/postrv/narsil-mcp/narsil
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add postrv/narsil-mcp --skill narsil
Clone the repo
git clone --depth 1 https://github.com/postrv/narsil-mcp

Made for: Claude Code.

Or install narsil-plugin, the plugin that ships this one along with the rest of its 1 skill, 5 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for narsil

README.md
[![agentmods](https://agentmods.dev/badge/skills/postrv/narsil-mcp/narsil/github.svg)](https://agentmods.dev/skills/postrv/narsil-mcp/narsil)
Your own site
<a href="https://agentmods.dev/skills/postrv/narsil-mcp/narsil"><img src="https://agentmods.dev/badge/skills/postrv/narsil-mcp/narsil/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for narsil

Your own site · 80×15
<a href="https://agentmods.dev/skills/postrv/narsil-mcp/narsil"><img src="https://agentmods.dev/badge/skills/postrv/narsil-mcp/narsil.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,556 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.02556
Opus 5 $0.00021 $0.01278
Sonnet 5 $0.00008 $0.00511
Haiku 4.5 $0.00004 $0.00256

Measured 10d ago against content hash 163b347acb46, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

narsil scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

narsil-plugin/skills/narsil/SKILL.md · 249 lines

How it starts

The opening of the file, as written. The whole thing — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Narsil Code Intelligence

Narsil is an MCP server providing 90 code intelligence tools (plus 2 prompts: explain_codebase, find_implementation). This skill helps you use them effectively.

Critical: Parameter Naming

Use short parameter names. These are the most common mistakes:

Wrong Correct
repo_path repo
symbol_name symbol
file_path path
function_name function

The repo parameter expects the repository name from list_repos, not the full filesystem path.

Getting Started

Always start with:

list_repos  → See indexed repositories
get_index_status  → See which features are enabled

Feature Requirements

Some tools require specific CLI flags when starting narsil-mcp:

Feature Required Flag Tools
Git integration --git get_blame, get_file_history, get_recent_changes, get_hotspots, get_contributors, get_commit_diff, get_symbol_history, get_branch_info, get_modified_files
Call graph --call-graph get_call_graph, get_callers, get_callees, find_call_path, get_complexity, get_function_hotspots
LSP --lsp Enhanced: get_hover_info, get_type_info, go_to_definition
Neural search --neural neural_search, get_neural_stats
Remote repos --remote (+ GITHUB_TOKEN) add_remote_repo, list_remote_files, get_remote_file
Knowledge graph --graph sparql_query, list_sparql_templates, run_sparql_template, get_ccg_manifest, export_ccg_*, query_ccg, import_ccg, import_ccg_from_registry, get_ccg_acl, get_ccg_access_info

If a tool returns empty results or errors, check get_index_status to verify the feature is enabled.

Relevant environment variables

Var Purpose
GITHUB_TOKEN Auth for --remote GitHub API calls
EMBEDDING_API_KEY / VOYAGE_API_KEY / OPENAI_API_KEY Neural embedding provider key
EMBEDDING_SERVER_ENDPOINT Custom/self-hosted embeddings endpoint
RUST_LOG Logging level (debug, info, warn, error)

Read the full file on GitHub · 249 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 249 lines · 42 tokens per session scan A 163b347acb46

Subscribe to this mod's changes

narsil is a skill published in the GitHub repository postrv/narsil-mcp (182 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 42 tokens to every session and 2,556 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.