prompt-tuner

prompt-tuner is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 88 tokens per session (1,960 once invoked), scanned A, original, MIT.

A systematic guide for improving the instructions given to a software agent.

In plain words
What is it for?
Use it to create a test set, measure success and error rates, group failures, and revise prompts when creating or changing an agent.
Why use it?
It replaces guesswork with measured testing when an agent gives incorrect, inconsistent, expensive, or slow results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create a test set, measure success and error rates, group failures, and revise prompts when creating or changing an agent.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/prompt-tuner
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.

Any agent
npx skills add khalilbenaz/claude-skills-collection --skill prompt-tuner
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

Made for: Claude Code, Codex.

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 prompt-tuner

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/prompt-tuner/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/prompt-tuner)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/prompt-tuner"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/prompt-tuner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prompt-tuner

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/prompt-tuner"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/prompt-tuner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,960 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00088 $0.01960
Opus 5 $0.00044 $0.00980
Sonnet 5 $0.00018 $0.00392
Haiku 4.5 $0.00009 $0.00196

Measured 12d ago against content hash 21abac47d151, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

prompt-tuner 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 12d 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.

agent-skills/prompt-tuner/SKILL.md · 204 lines

How it starts

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

Agent Prompt Tuner

Quand utiliser ce skill

  • Agent produit des sorties incorrectes, incohérentes ou mal formatées
  • Taux d'erreur en production dépasse un seuil acceptable
  • Migration vers un nouveau modèle LLM (recalibration nécessaire)
  • Création d'un nouvel agent : structurer les instructions dès le départ
  • Coût ou latence trop élevés sans gain de qualité

Workflow

1. Constituer la baseline

Avant toute modification, mesurer les métriques actuelles :

taux_succes   = nb_sorties_correctes / nb_total  (par catégorie de tâche)
hallucination = nb_faits_inventés / nb_total
tool_error    = nb_mauvais_appels_outils / nb_appels
latence_p95   = percentile 95 du temps de réponse
coût/req      = tokens_in * prix_in + tokens_out * prix_out

Constituer un dataset d'évaluation de 50 à 200 cas représentatifs avant d'écrire la première ligne révisée. Sans baseline, toute modification est une intuition.

2. Classifier les erreurs

Trier les échecs dans ces catégories (quantifier chacune) :

Catégorie Symptôme typique Priorité si fréquent
Formatage JSON invalide, champs manquants Haute
Raisonnement Logique fausse, mauvaise inférence Haute
Hallucination Faits inventés, sources inexistantes Critique
Mauvais outil Mauvais tool appelé, mauvais args Haute
Hors-domaine Refus inapproprié, réponse off-topic Moyenne
Verbosité Réponse trop longue ou trop courte Basse

3. Restructurer le system prompt

Ordre optimal des sections (ne pas mélanger) :

1. Rôle / persona (1-2 phrases max)
2. Capacités disponibles (liste des outils, contexte)
3. Contraintes et interdictions EXPLICITES
4. Format de sortie attendu + exemple inline
5. Comportement sur erreur / cas ambigus

Exemple concret (agent de support) :

Tu es un agent de support bancaire. Tu traites UNIQUEMENT les demandes
liées aux comptes, virements et cartes.

Outils disponibles : get_account_balance, list_transactions, open_ticket.

INTERDIT : donner des conseils d'investissement ou des informations
sur des tiers non liés au compte du client.

Format de réponse :
{"status": "ok|error|escalate", "message": "...", "ticket_id": null|"XXX"}

Si la demande est ambiguë : réponds avec status="escalate" et explique
pourquoi dans "message". Ne devine jamais.

Read the full file on GitHub · 204 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. 12d ago First seen · 204 lines · 88 tokens per session scan A 21abac47d151

Subscribe to this mod's changes

prompt-tuner is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 18d ago), licensed MIT. It adds 88 tokens to every session and 1,960 once invoked, about $0.0004 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.