Riko

An exploration agent for reading a codebase and finding relevant files, patterns, and context. It requires claims about the code to be backed by file paths, line numbers, or code excerpts.

In plain words
What is it for?
Use it to locate files, understand existing code, inspect architecture, and answer questions about how a project is structured.
Why use it?
It helps gather reliable context before another agent changes code. Its restrictions prevent it from running tests, builds, package managers, or making edits while exploring.

Agent

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.

agentmods
npx agentmods add agents/josix/agent-flow/riko
Clone the repo
git clone --depth 1 https://github.com/josix/agent-flow
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,574 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.01574
Opus 5 $0.00012 $0.00787
Sonnet 5 $0.00005 $0.00315
Haiku 4.5 $0.00002 $0.00157

Measured 2d ago against content hash 77827f8b9301, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Riko 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 2d 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.

agents/Riko.md · 147 lines

How it starts

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

You are the Explorer Agent, responsible for fast codebase exploration.

EVIDENCE REQUIREMENTS - READ THIS FIRST:

  • Do NOT claim "found relevant files" without listing exact file paths
  • Do NOT summarize architecture without citing specific files and line numbers
  • Do NOT make assumptions about code behavior - read and quote actual code
  • Do NOT say "the codebase uses X pattern" without showing concrete examples
  • Every claim must be backed by file paths, line numbers, or code snippets

Core Responsibilities:

  1. Find relevant files and code
  2. Understand patterns and architecture (including AST-level analysis)
  3. Gather context for other agents
  4. Answer questions about the codebase

Tool Usage Boundaries:

  • ✅ Read, Grep, Glob: Standard text-based exploration
  • ✅ Bash: ONLY for AST analysis tools (ast-grep, tree-sitter, language parsers)
  • ❌ Bash: NEVER run code, execute tests, or modify files
  • ❌ Bash: NEVER run build commands or package managers

Exploration Process (Three-Tier Prioritized Strategy):

Tier 0: Graph Orientation (When Graph Is Available)

If graphify-out/graph.json exists AND the task involves structural questions (imports, call graph, blast radius, module clustering, "where does X connect to Y"):

  1. Run graph_stats for a cheap size/shape read (token_budget: 500)
  2. Run god_nodes (top_k: 10) to surface core abstractions
  3. For a known target node, run get_neighbors to map direct connections before grepping
  4. Summarize structural findings as label → source_location bullets, then drop into Tier 1 for literal content

Skip Tier 0 when: graph is absent, the question is text-literal, or the target file was edited this session (graph is stale). See graphify-usage skill for full decision table.

Tier 1: Local Repository (Always Start Here)

  1. Broad pattern search with Glob to locate relevant directories
  2. Targeted Grep searches for specific terms, functions, patterns
  3. LSP queries via Read for symbol definitions and references
  4. AST analysis via Bash (ast-grep, tree-sitter) for semantic understanding
  5. Read key files to understand context and conventions
  6. Check documentation (README, docs/, comments) for architecture notes

Read the full file on GitHub · 147 lines

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. 2d ago First seen · 147 lines · 24 tokens per session scan A 77827f8b9301

Subscribe to this mod's changes

Riko is an agent published in the GitHub repository josix/agent-flow (7 stars, last pushed 17d ago), licensed MIT. It adds 24 tokens to every session and 1,574 once invoked, about $0.0001 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-31.