Rlm

From jdubray/puffin · View interactive version

Rlm is an AI agent skill from the GitHub repository jdubray/puffin. Run a Recursive Language Model-style loop for long-context tasks. Uses a persistent local Python REPL and an rlm-subcall subagent as the sub-LLM (llm_query).

How to use this skill

Skill file

rlm (Recursive Language Model workflow)

Use this Skill when:

Mental model

How to run

Inputs

This Skill reads $ARGUMENTS. Accept these patterns:

If the user didn't supply arguments, ask for:

1) the context file path, and

2) the query.

Step-by-step procedure

  1. Initialise the REPL state

```bash

python3 .claude/skills/rlm/scripts/rlm_repl.py init <context_path>

python3 .claude/skills/rlm/scripts/rlm_repl.py status

```

  1. Scout the context quickly

```bash

python3 .claude/skills/rlm/scripts/rlm_repl.py exec -c "print(peek(0, 3000))"

python3 .claude/skills/rlm/scripts/rlm_repl.py exec -c "print(peek(len(content)-3000, len(content)))"

```

  1. Choose a chunking strategy
  1. Materialise chunks as files (so subagents can read them)

```bash

python3 .claude/skills/rlm/scripts/rlm_repl.py exec <<'PY'

paths = write_chunks('.claude/rlm_state/chunks', size=200000, overlap=0)

print(len(paths))

print(paths[:5])

PY

```

  1. Subcall loop (delegate to rlm-subcall)
  1. Synthesis

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.