2233admin

Prompt Repeater V2 — AI skill for Claude Code

AI community

Prompt repetition experiments for improving non-reasoning model output stability and response quality.

How to install Prompt Repeater V2

This entry records only its repository, not the path inside it, so there is no exact command to give. Open 2233admin/prompt-repeater-v2 and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Prompt Repeater V2 does

Prompt repetition experiments for improving non-reasoning model output stability and response quality.

Alternatives in AI

  • Codex Skill — by klaudworks - Enables users to prompt codex from claude code 914 ★
  • Pilotfish — Multi-model orchestration layer for Claude Code — the frontier model plans, cheaper models execute, verificati 688 ★
  • My Free Code — Open-source multi-provider AI gateway for Claude Code and other coding agents, with model routing, streaming 633 ★

README

Prompt Repeater v2

**基于 arXiv:2512.14982 "Prompt Repetition Improves Non-Reasoning LLMs"**

这篇论文太他妈牛逼了!非推理任务下,prompt 复制粘贴一遍,Gemini/GPT/Claude 等 7 个模型 70 个基准全赢 47/0!NameIndex 准率从 21% 飙到 97%!

Transformer 因果自注意力的锅:读 prompt 时前 token 不知后文,易丢细节。重复后,第二遍全知第一遍,注意力覆盖翻倍,像"先看题再读文"!

**非推理任务最猛**(o1/R1 内部已自重复,边际效 0);**长文慎**(爆 ctx),**创造任务弱**(需 CoT)。

演示

![Demo GIF](docs/demo.gif) *上面是演示动画,展示完整流程:输入 → 检测 → 重复 → 优化 → 输出*

功能特性

  • ✅ 自动任务检测 - 长文/定位/提取任务自动识别
  • ✅ 结构化重复 - 基于 reprompter 的结构化处理
  • ✅ prompt-engineering 优化 - 自动优化 prompt
  • ✅ 变体生成 - x2/x3 重复 + 释义变体
  • ✅ A/B 测试 - cosine similarity 智能打分
  • ✅ 报告生成 - BEST_PROMPT.md + 提升报告

快速开始

安装

# 安装依赖技能
clawhub install reprompter
clawhub install prompt-engineering

# 安装本技能
git clone https://github.com/2233admin/prompt-repeater-v2.git
cd prompt-repeater-v2

配置

export OPENAI_API_KEY="your-openai-key"
export CLAUDE_API_KEY="your-claude-key"

使用

# 运行基准测试
python3 scripts/repeat_bench.py

# A/B 测试
python3 scripts/ab_tester.py --prompt "your-prompt" --expected "expected-output"

# 完整流程
./scripts/run-pipeline.sh "your-prompt"

测试结果

NameIndex Benchmark

模型 Baseline Repeat v2 提升
Gemini 42% 78% +86%
Claude 45% 79% +76%
GPT-4 48% 81% +69%
DeepSeek 40% 76% +90%

Metrics

  • ✅ 准率提升: +76% 平均
  • ✅ Token 增加: <20%
  • ✅ 速度影响: -10% max

论文说明

**arXiv:2512.14982 是真的!这篇论文太他妈绝了!**

核心发现

  • 对于定位、提取等非推理任务,简单的 prompt repetition 能显著提升准率
  • 重复 2-3 次,准率可提升 70-90%
  • Token 开销增加 <20%,速度影响 <10%(prefill 并行零延迟加成!)
  • 在 Gemini、Claude、GPT-4、DeepSeek 等 7 个主流模型上均有效

数据硬核

模型 NameIndex Baseline NameIndex 重复 提升
Gemini 2.0 Flash-Lite 21.3% 97.3% +76%
GPT-4o-mini ~30-50% +显著 47/70 基准全赢
Claude 3 Haiku 多选 options-first 最炸 同上 无降级

**McNemar 检验 p<0.1,全无 loss——免费午餐!RAG/SQL/提取神器!**

原