What does this skill do, and when should you use it?
One of four skills bundled in the Loki Mode repository, located at agent-skills/prompt-optimization/SKILL.md. Based on the paper "Prompt Repetition Improves Non-Reasoning LLMs" (arXiv 2512.14982v1), it automatically duplicates prompts twice (or three times) when a Haiku agent runs structured tasks such as tests, linting, parsing, or list operations. The repetition happens in the parallelizable prefill stage, reportedly improving accuracy 4-5x with no latency penalty. It activates automatically and explicitly does not apply to reasoning models like Opus or Sonnet.
When it detects a Haiku agent executing a structured task — unit test execution, linting and formatting, parsing and extraction, or list find/filter/count — it automatically repeats the prompt 2 times (configurable to 3 via LOKI_PROMPT_REPETITION_COUNT for position-critical tasks). The repeated prompt enables bidirectional attention in the prefill stage to raise accuracy. It also records accuracy-improvement and cost-benefit metrics under .loki/metrics/prompt-optimization/.
- Inside the Loki Mode pipeline, making Haiku subagents reliably run unit tests — self-reported accuracy rises from 65% to 95%.
- When a Haiku agent parses structured data (JSON/YAML extraction), reducing missed fields: reported accuracy from 58% to 94%.
- Running lint and formatting tasks so the agent catches all violations (72% → 98%).
- Finding, filtering, or counting items in long lists with a lower chance of omissions or miscounts.
- For position-critical tasks, raising repetition to 3x to counter non-reasoning models' insensitivity to prompt position.
How do you install this skill?
- Local filesystem
Loki Mode environment (env vars LOKI_PROMPT_REPETITION, LOKI_PROMPT_REPETITION_COUNT; metrics dir .loki/metrics/prompt-optimization/)
The skill ships with the Loki Mode repository. Installing Loki Mode includes it: run bun install -g loki-mode (npm, Homebrew, and Docker also work — see the repo's installation docs). For standalone use, mirror the agent-skills/prompt-optimization/ folder structure into your Agent Skills directory; SKILL.md does not document standalone installation steps for other Agent Skills clients.
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/asklokesh/loki-mode.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/agent-skills/prompt-optimization" ~/.claude/skills/
rm -rf "$tmp"Generated from the source repository and skill path; it copies only this skill's folder. If the author's install steps above differ, follow those first. To scope it to one project, replace ~/.claude/skills with that project's .claude/skills.
How do you use this skill?
It activates automatically for Haiku agents — no manual invocation needed. Control via environment variables: LOKI_PROMPT_REPETITION=true/false toggles it; LOKI_PROMPT_REPETITION_COUNT=2 (default) or =3 sets repetition count. Metrics land in .loki/metrics/prompt-optimization/ as accuracy-improvement. and cost-benefit.. Full documentation is referenced at references/prompt-repetition.md.
What are this skill's strengths and limitations?
- Zero latency impact: repetition occurs in prefill, not generation.
- Fully automatic — agents need no extra instructions and users need no setup to benefit.
- Backed by published research (arXiv 2512.14982v1) with per-task quantitative gains.
- Tunable per workload (repetition count) and can be switched off via env var.
- Only helps non-reasoning models (Haiku); no benefit and no effect for reasoning models like Opus/Sonnet.
- Improvement figures are self-reported by the repo; no independent reproduction is provided.
- Bound to the Loki Mode environment (dedicated env vars and .loki metrics directory); adapting it elsewhere requires work.
- The repo's license field is NOASSERTION (the README states BUSL-1.1 for the overall project) — check terms before commercial use.
How does this skill compare with similar options?
Side by side with related skills; every score comes from the same FSRS standard.
| Skill | FS score | Stars | Last updated | License |
|---|---|---|---|---|
| Loki Prompt Optimization Skill this page | 60 · Recommended | ★ 1.1k | 16d ago | NOASSERTION |
| Agnostic Prompt Standard (APS) v1.0 Skill | 46 · Use with care | ★ 38 | 18d ago | MIT |
| Skill Creator | 70 · Strongly recommended | ★ 2.2k | 12d ago | MIT |
| SkillCheck Free | 64 · Recommended | ★ 41 | 14d ago | MIT |
| FableCodex Evidence-Gated Workflow Skill | 63 · Recommended | ★ 436 | 4mo ago | AGPL-3.0 |
The source names no direct competitor for this skill; it is an internal quality mechanism of Loki Mode and operates at a different level from general prompt-engineering techniques (e.g., few-shot examples), so no head-to-head comparison is warranted.
How did FollowSkills review this skill?
Claims to apply a technique from an arXiv paper (prompt repetition improves non-reasoning-model accuracy), citing specific improvement figures (+46%/+36%/+62%) that weren't independently reproduced or verified in this review.
Open a dimension to read why it scored that way
Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.
This review was completed under FSRS 1.0. Dimension scores are not converted; it is queued for re-review under FSRS 2.0.
See the full review method →