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.
npx agentmods add instructions/buzzer-re/rikugan/agents-mdgit clone --depth 1 https://github.com/buzzer-re/RikuganWrote 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.
[](https://agentmods.dev/instructions/buzzer-re/rikugan/agents-md)<a href="https://agentmods.dev/instructions/buzzer-re/rikugan/agents-md"><img src="https://agentmods.dev/badge/instructions/buzzer-re/rikugan/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.14111 | $0.14111 |
| Opus 5 | $0.07056 | $0.07056 |
| Sonnet 5 | $0.02822 | $0.02822 |
| Haiku 4.5 | $0.01411 | $0.01411 |
Grade A, and why
Rikugan AGENTS.md scanned grade A with 1 finding 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 5d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- Blocked patterns (subprocess, os.system, etc.) are rejected before reaching the approval step How it starts
The opening of the file, as written. The whole thing — 1,208 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — Rikugan Developer Guide
Project Overview
Rikugan (六眼) is a multi-host reverse-engineering agent plugin that integrates an LLM-powered assistant directly inside IDA Pro and Binary Ninja. It has its own agentic loop, in-process tool orchestration, streaming UI, multi-tab chat, session persistence, MCP client support, and host-native tool sets.
Directory Structure
rikugan/
├── agent/ # Agent loop & prompt logic (host-agnostic)
│ ├── loop.py # AgentLoop: generator-based turn cycle
│ ├── turn.py # TurnEvent / TurnEventType definitions
│ ├── context_window.py # Context-window management (threshold compaction)
│ ├── exploration_mode.py # Exploration state machine (4 phases)
│ ├── mutation.py # MutationRecord, build_reverse_record, capture_pre_state
│ ├── plan_mode.py # Plan-mode step orchestration
│ ├── subagent.py # SubagentRunner — isolated AgentLoop for tasks
│ ├── system_prompt.py # build_system_prompt() dispatcher
│ └── prompts/ # Host-specific system prompts
│ ├── base.py # Shared prompt sections (discipline, renaming, etc.)
│ ├── ida.py # IDA Pro base prompt
│ └── binja.py # Binary Ninja base prompt
│
├── core/ # Shared infrastructure (host-agnostic)
│ ├── config.py # RikuganConfig — settings, provider config, paths
│ ├── constants.py # Constants (CONFIG_DIR_NAME, etc.)
│ ├── errors.py # Exception hierarchy (ToolError, AgentError, etc.)
│ ├── host.py # Host context (BV, address, navigate callback)
│ ├── logging.py # Logging utilities
│ ├── thread_safety.py # Thread-safety helpers (@idasync, etc.)
│ └── types.py # Core data types (Message, ToolCall, StreamChunk, etc.)
│
├── ida/ # IDA Pro host package
│ ├── tools/
│ │ └── registry.py # IDA create_default_registry() — imports rikugan.tools.*
│ └── ui/
│ ├── panel.py # IDA PluginForm wrapper
│ ├── actions.py # IDA UI hooks & context menu actions
│ └── session_controller.py # IDA SessionController
│
├── binja/ # Binary Ninja host package
│ ├── tools/
│ │ ├── registry.py # BN create_default_registry() — imports rikugan.binja.tools.*
│ │ ├── common.py # BN shared helpers (get_bv, get_function_at, etc.)
│ │ ├── navigation.py # Navigation tools
│ │ ├── functions.py # Function listing/search tools
│ │ ├── strings.py # String tools
│ │ ├── database.py # Segments, imports, exports, binary info
│ │ ├── disassembly.py # Disassembly tools
│ │ ├── decompiler.py # Decompiler/HLIL tools
│ │ ├── xrefs.py # Cross-reference tools
│ │ ├── annotations.py # Rename/comment/set_type tools
│ │ ├── types_tools.py # Struct/enum/typedef tools
│ │ ├── il.py # IL core tools (get_il, get_il_block, nop_instructions, redecompile_function)
│ │ ├── il_analysis.py # IL analysis tools (get_cfg, track_variable_ssa)
│ │ ├── il_transform.py # IL transform tools (il_replace_expr, il_set_condition, il_nop_expr, patch_branch, etc.)
│ │ └── scripting.py # execute_python tool
│ └── ui/
│ ├── panel.py # BN QWidget panel
│ ├── actions.py # BN action handlers
│ └── session_controller.py # BN BinaryNinjaSessionController
│
├── tools/ # IDA tool implementations
│ ├── base.py # @tool decorator, ToolDefinition, JSON schema generation
│ ├── registry.py # Shared ToolRegistry class
│ ├── navigation.py # IDA navigation tools
│ ├── functions.py # IDA function tools
│ ├── strings.py # IDA string tools
│ ├── database.py # IDA database tools (segments, imports, exports)
│ ├── disassembly.py # IDA disassembly tools
│ ├── decompiler.py # IDA decompiler tools (Hex-Rays)
│ ├── xrefs.py # IDA xref tools
│ ├── annotations.py # IDA annotation tools (rename, comment, set type)
│ ├── types_tools.py # IDA type tools (structs, enums, typedefs, TILs)
│ ├── microcode.py # IDA Hex-Rays microcode tools
│ ├── microcode_format.py # Microcode formatting helpers
│ ├── microcode_optim.py # Microcode optimizer framework
│ └── scripting.py # IDA execute_python tool
│
├── hosts/ # Backward-compat shims → rikugan.ida.ui.* / rikugan.binja.ui.*
│
├── providers/ # LLM provider integrations (host-agnostic)
│ ├── base.py # LLMProvider ABC
│ ├── registry.py # ProviderRegistry
│ ├── anthropic_provider.py # Claude (Anthropic) — supports OAuth auto-detection
│ ├── openai_provider.py # OpenAI
│ ├── gemini_provider.py # Google Gemini
│ ├── ollama_provider.py # Ollama (local)
│ ├── minimax_provider.py # MiniMax (subclasses OpenAICompatProvider)
│ └── openai_compat.py # OpenAI-compatible endpoints
│
├── mcp/ # MCP client (host-agnostic)
│ ├── config.py # MCP server config loader
│ ├── client.py # MCP protocol client
│ ├── bridge.py # MCP ↔ ToolRegistry bridge
│ ├── manager.py # MCPManager — lifecycle management
│ └── protocol.py # MCP JSON-RPC protocol types
│
├── skills/ # Skill system (host-agnostic)
│ ├── registry.py # SkillRegistry — discovery & loading
│ ├── loader.py # SKILL.md frontmatter parser (mode field support)
│ └── builtins/ # 12 built-in skills
│ ├── malware-analysis/
│ ├── linux-malware/
│ ├── deobfuscation/
│ ├── vuln-audit/
│ ├── driver-analysis/
│ ├── ctf/
│ ├── generic-re/
│ ├── ida-scripting/ # IDAPython API skill with full reference
│ ├── binja-scripting/ # Binary Ninja Python API skill with full reference
│ ├── modify/ # Exploration mode: autonomous binary modification
│ ├── smart-patch-ida/ # IDA-specific binary patching workflow
│ └── smart-patch-binja/ # Binary Ninja-specific patching workflow
│
├── state/ # Session persistence (host-agnostic)
│ ├── session.py # SessionState — message history, token tracking
│ └── history.py # SessionHistory — auto-save/restore per file
│
└── ui/ # Shared UI widgets (Qt, host-agnostic)
├── panel_core.py # PanelCore — multi-tab chat, export, mutation log, event routing
├── session_controller_base.py # SessionControllerBase — multi-session, fork support
├── chat_view.py # Chat message display widget (queued message support)
├── input_area.py # User input text area with skill autocomplete
├── context_bar.py # Binary context status bar
├── message_widgets.py # Message bubble widgets (tool calls, exploration, approval)
├── mutation_log_view.py # MutationLogPanel — mutation history with undo
├── markdown.py # Markdown rendering for assistant messages
├── plan_view.py # Plan-mode UI
├── settings_dialog.py # Settings dialog (screen-aware sizing)
├── styles.py # Qt stylesheet constants
└── qt_compat.py # Qt compatibility layer (PySide6)
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.
- 5d ago First seen · 1,208 lines · 14,111 tokens per session scan A 4562c8cb4b39
Rikugan AGENTS.md is an instructions file published in the GitHub repository buzzer-re/Rikugan (672 stars, last pushed 2mo ago), licensed MIT. It adds 14,111 tokens to every session, about $0.0706 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.