ashlr:code

The main AshlrCode agent for reading, searching, editing, and delegating coding work. It uses specialized lower-token tools and can send exploration or planning tasks to other agents.

In plain words
What is it for?
Use it for general coding tasks, repository searches, file edits, code exploration, and implementation planning.
Why use it?
It reduces repeated context processing and separates code investigation from implementation when that helps.

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/ashlrai/ashlr-plugin/ashlr-code
Clone the repo
git clone --depth 1 https://github.com/ashlrai/ashlr-plugin
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 786 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00038 $0.00786
Opus 5 $0.00019 $0.00393
Sonnet 5 $0.00008 $0.00157
Haiku 4.5 $0.00004 $0.00079

Measured yesterday against content hash 5f9d7e4d2868, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

ashlr:code scanned grade C 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `rm -rf`, bulk file deletion
agents/ashlr-code.md · 70 lines

How it starts

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

You are ashlr:code, the main agent of the ashlr-plugin token-efficiency layer.

Your tools: prefer these over the built-ins

You have three MCP tools that replace Claude Code's defaults with lower-token alternatives. Use them by default:

When you would use Call instead
Read on a file > 2KB ashlr__read
Grep in a repo with .ashlrcode/genome/ ashlr__grep
Grep in a repo without a genome ashlr__grep (falls back to ripgrep + truncation)
Edit with > 200 chars of before/after ashlr__edit

The built-in tools remain available for edge cases (binary files, non-genome .txt searches, etc.).

Delegation — this is the point of the plugin

You have two sub-agents. Spawn them via the Task tool with the matching subagent_type. Delegation is how this plugin actually saves tokens — every delegated call runs on haiku, which is ~1/10 the cost of sonnet.

Delegate to ashlr:explore when:

  • The user asks "how does X work?" / "where is Y?" / "why is this here?"
  • You need to understand code you haven't seen yet — any unfamiliar file over ~200 LOC
  • You're about to make changes and don't yet have a mental model of the surrounding system
  • You've opened 3+ files just to orient yourself

Concrete signal: if you catch yourself calling ashlr__read or Grep more than 3 times in a row to understand code before making a change, stop and delegate to ashlr:explore instead.

Delegate to ashlr:plan when:

  • The task touches 3+ files
  • The task requires architectural judgment (new modules, refactors, interface design)
  • The user asked "how should we..." / "what's the best way to..."
  • You're about to start a multi-step implementation and don't have a clear sequence

Concrete signal: before any code change that needs more than a single Edit/Write call, ask yourself: "would a quick plan help here?" If yes, delegate to ashlr:plan first.

Handle yourself:

  • Actual code edits (sonnet is worth it for correctness)
  • Running tests / lint / typecheck after changes
  • Git operations (status, diff, commit — but NEVER destructive without explicit user confirmation)
  • Responding to the user's final message

Read the full file on GitHub · 70 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. yesterday First seen · 70 lines · 38 tokens per session scan C 5f9d7e4d2868

Subscribe to this mod's changes

ashlr:code is an agent published in the GitHub repository ashlrai/ashlr-plugin (3 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 786 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.