repeat-last

repeat-last is a command for Claude Code from danielraffel/generous-corp-marketplace. It costs 21 tokens per session (864 once invoked), scanned A, original, MIT.

A command that repeats your last message before sending it for processing.

In plain words
What is it for?
Use it for multiple-choice questions, list searches, simple fact retrieval, pattern matching, and basic categorization. It is not intended for complex analysis, debugging, creative writing, or tasks using extended thinking.
Why use it?
It can improve results on simple tasks such as fact lookup or categorization by giving the model the same request twice.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the prompt-repeater plugin — 1 skill, 3 commands, 1 hook shipped together

Good fit Use it for multiple-choice questions, list searches, simple fact retrieval, pattern matching, and basic categorization. It is not intended for complex analysis, debugging, creative writing, or tasks using extended thinking.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/danielraffel/generous-corp-marketplace/repeat-last
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.

Clone the repo
git clone --depth 1 https://github.com/danielraffel/generous-corp-marketplace

Made for: Claude Code.

Or install prompt-repeater, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 hook.

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 repeat-last

README.md
[![agentmods](https://agentmods.dev/badge/commands/danielraffel/generous-corp-marketplace/repeat-last.svg)](https://agentmods.dev/commands/danielraffel/generous-corp-marketplace/repeat-last)
Your own site
<a href="https://agentmods.dev/commands/danielraffel/generous-corp-marketplace/repeat-last"><img src="https://agentmods.dev/badge/commands/danielraffel/generous-corp-marketplace/repeat-last.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 864 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00021 $0.00864
Opus 5 $0.00010 $0.00432
Sonnet 5 $0.00004 $0.00173
Haiku 4.5 $0.00002 $0.00086

Measured 8d ago against content hash 06a432055370, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

repeat-last 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 8d 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.

plugins/prompt-repeater/commands/repeat-last.md · 126 lines

How it starts

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

Repeat Last Prompt

Apply simple prompt repetition optimization to the user's last message. This command implements the technique from Google Research's "Prompt Repetition Improves Non-Reasoning LLMs" paper.

What This Command Does

  1. Retrieves the user's last message from the conversation history
  2. Applies simple repetition by duplicating the prompt: <QUERY><QUERY>
  3. Processes the repeated prompt to improve model performance
  4. Provides a brief confirmation that repetition was applied

When to Use

Use this command for non-reasoning tasks such as:

  • Multiple choice questions
  • Finding items in lists
  • Simple fact retrieval
  • Pattern matching
  • Basic categorization

Do not emphasize for:

  • Complex planning or analysis
  • Multi-step debugging
  • Creative writing tasks
  • Tasks already using extended thinking

Implementation Instructions

When this command is invoked:

  1. Retrieve the last user message from the conversation history

    • Get the most recent message from the user (not from Claude)
    • If unavailable, inform the user that there's no previous message to repeat
  2. Apply simple repetition

    • Format: <QUERY> <QUERY> (the query repeated twice, separated by a space)
    • No additional framing or text between repetitions (just a single space)
    • Example: If user asked "What's the 5th item?", process it as "What's the 5th item? What's the 5th item?"
  3. Process the repeated prompt

    • Treat the repeated prompt as if it were the original user input
    • Generate response based on the repeated context
    • Do not include the repetition in the visible response
  4. Provide confirmation

    • Briefly note that prompt repetition was applied
    • Example: "Applied prompt repetition optimization to your query."
    • Then provide the actual answer to the query

Example Usage

User's original message:

Here's a list of names:
Alice, Bob, Charlie, David, Emma

What's the 3rd name?

User runs: /repeat-last

Claude processes internally:

Here's a list of names:
Alice, Bob, Charlie, David, Emma

What's the 3rd name? Here's a list of names:
Alice, Bob, Charlie, David, Emma

What's the 3rd name?

Read the full file on GitHub · 126 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. 8d ago First seen · 126 lines · 21 tokens per session scan A 06a432055370

Subscribe to this mod's changes

repeat-last is a command published in the GitHub repository danielraffel/generous-corp-marketplace (11 stars, last pushed 9d ago), licensed MIT. It adds 21 tokens to every session and 864 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-30.