ashlr-genome-loop

ashlr-genome-loop is a command for coding agents from ashlrai/ashlr-plugin. It costs 27 tokens per session (954 once invoked), scanned A, original, MIT.

A command for inspecting and controlling Ashlr’s automatic project-knowledge loop. The loop records architecture and decision observations, then combines them into project genome files.

In plain words
What is it for?
Use it to check the loop, force a consolidation, or turn automatic collection on or off.
Why use it?
It shows whether observations are waiting, when they were last combined, and whether automatic updates are enabled.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the ashlr plugin — 11 skills, 36 commands, 5 agents, 7 hooks, 1 MCP server shipped together

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 commands/ashlrai/ashlr-plugin/ashlr-genome-loop
Clone the repo
git clone --depth 1 https://github.com/ashlrai/ashlr-plugin

Or install ashlr, the plugin that ships this one along with the rest of its 11 skills, 36 commands, 5 agents, 7 hooks, 1 MCP server.

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 ashlr-genome-loop

README.md
[![agentmods](https://agentmods.dev/badge/commands/ashlrai/ashlr-plugin/ashlr-genome-loop.svg)](https://agentmods.dev/commands/ashlrai/ashlr-plugin/ashlr-genome-loop)
Your own site
<a href="https://agentmods.dev/commands/ashlrai/ashlr-plugin/ashlr-genome-loop"><img src="https://agentmods.dev/badge/commands/ashlrai/ashlr-plugin/ashlr-genome-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 954 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.00027 $0.00954
Opus 5 $0.00014 $0.00477
Sonnet 5 $0.00005 $0.00191
Haiku 4.5 $0.00003 $0.00095

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

Security

Grade A, and why

ashlr-genome-loop 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 4d 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.

commands/ashlr-genome-loop.md · 119 lines

How it starts

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

The ashlr-plugin runs an automatic genome loop: a PostToolUse hook proposes architecture/decision-flavored observations to .ashlrcode/genome/proposals.jsonl, and a SessionEnd hook consolidates them back into section files when ≥ 3 are pending. This command exposes the loop's status and on/off state.

Subcommands (arg to the slash command):

  • status — show pending proposal count, last consolidation timestamp, and whether the loop is currently enabled.
  • run — force a consolidation pass on the current project's genome.
  • on — enable the loop (writes ~/.ashlr/config.json).
  • off — disable the loop (writes ~/.ashlr/config.json). The ASHLR_GENOME_AUTO=0 env var also disables it per-shell.

Dispatch on $1:

If $1 is empty or status

Run the following Bash command and relay the output:

bash -c '
set -e
CFG="$HOME/.ashlr/config.json"
LOG="$HOME/.ashlr/genome-consolidation.log"
GENOME="$(pwd)/.ashlrcode/genome"
PROPOSALS="$GENOME/proposals.jsonl"

ENABLED="on"
if [ "${ASHLR_GENOME_AUTO:-1}" = "0" ]; then ENABLED="off (env ASHLR_GENOME_AUTO=0)"; fi
if [ -f "$CFG" ] && grep -q "\"genomeAuto\"[[:space:]]*:[[:space:]]*false" "$CFG" 2>/dev/null; then
  ENABLED="off (~/.ashlr/config.json)"
fi

PENDING=0
if [ -f "$PROPOSALS" ]; then
  PENDING=$(grep -c . "$PROPOSALS" 2>/dev/null || echo 0)
fi

LAST="(never)"
if [ -f "$LOG" ]; then
  LAST=$(tail -n 1 "$LOG" 2>/dev/null | awk "{print \$1}")
  [ -z "$LAST" ] && LAST="(never)"
fi

echo "ashlr genome loop — $ENABLED"
echo "  pending proposals: $PENDING ($PROPOSALS)"
echo "  last consolidation: $LAST"
'

If $1 is run

Run the following Bash command and relay its output verbatim:

bun run ${CLAUDE_PLUGIN_ROOT}/scripts/genome-auto-consolidate.ts --dir "$(pwd)"

If no output appears, say "No pending proposals to consolidate (need ≥ 3)."

If $1 is on

Run the following Bash command:

bash -c '
mkdir -p "$HOME/.ashlr"
CFG="$HOME/.ashlr/config.json"
if [ -f "$CFG" ]; then
  bun -e "
    const fs = require(\"fs\");
    const p = process.env.HOME + \"/.ashlr/config.json\";
    let j = {};
    try { j = JSON.parse(fs.readFileSync(p, \"utf-8\")); } catch {}
    j.genomeAuto = true;
    fs.writeFileSync(p, JSON.stringify(j, null, 2));
    console.log(\"ashlr genome loop: enabled\");
  "
else
  echo "{\"genomeAuto\": true}" > "$CFG"
  echo "ashlr genome loop: enabled"
fi
'

Read the full file on GitHub · 119 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. 4d ago First seen · 119 lines · 27 tokens per session scan A 4b0dffef809d

Subscribe to this mod's changes

ashlr-genome-loop is a command published in the GitHub repository ashlrai/ashlr-plugin (3 stars, last pushed 4d ago), licensed MIT. It adds 27 tokens to every session and 954 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.