prompt-debugger
Skill28 starsChanged 28 days agoMITView on GitHub
Diagnostique pourquoi un prompt produit des résultats indésirables et propose des corrections ciblées. À utiliser quand le LLM hallucine, ignore des instructions, donne un mauvais format ou un résultat incohérent. Se déclenche aussi avec "mon prompt hallucine", "le LLM ignore mes instructions", "résultat incorrect", "format non respecté", ou tout problème avec un prompt. Also triggers on "my prompt doesn't work", "debug a prompt", "wrong model output".
2 other projects use a version of this.
Adopted by
Most recently taken up by
- megandmartin/agent-skills-repotheir own version, first seen Jul 24, 2026
- tolom/prompt-xray-skillstheir own version, first seen Jun 28, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- megandmartin/agent-skills-repo★ 3same name
- tolom/prompt-xray-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository347 other files it gives its agents.
- agent-a2a-protocol-guideSkill
- agent-agent-observabilitySkill
- agent-api-caller-subagentSkill
- agent-autogen-guideSkill
- agent-browser-agent-builderSkill
- agent-claude-code-extension-builderSkill
- agent-code-review-subagentSkill
- agent-coding-agent-builderSkill
- agent-conflict-resolverSkill
- agent-consensus-builderSkill
- agent-context-managerSkill
- agent-cost-optimizerSkill
- agent-crewai-expertSkill
- agent-customer-support-agentSkill
- agent-data-analyst-agentSkill
- agent-database-query-subagentSkill
- agent-deployment-guideSkill
- agent-email-agent-builderSkill
- agent-evaluation-frameworkSkill
- agent-file-processor-subagentSkill
- agent-handoff-designerSkill
- agent-hierarchy-designerSkill
- agent-human-in-the-loop-designerSkill
- agent-langgraph-designerSkill
- agent-load-balancerSkill
- agent-marketplace-creatorSkill
- agent-mcp-server-builderSkill
- agent-memory-designerSkill
- agent-message-protocolSkill
- agent-monitoring-setupSkill
- agent-multi-agent-orchestratorSkill
- agent-openai-assistants-builderSkill
- agent-pipeline-composerSkill
- agent-pool-managerSkill
- agent-prompt-tunerSkill
- agent-research-agent-designerSkill
- agent-result-aggregatorSkill
- agent-retry-strategistSkill
- agent-sales-agent-builderSkill
- agent-security-hardenerSkill
- agent-semantic-kernel-guideSkill
- agent-skill-creatorSkill
- agent-skill-routerSkill
- agent-spawnerSkill
- agent-state-synchronizerSkill
- agent-subagent-delegatorSkill
- agent-supervisor-builderSkill
- agent-task-decomposerSkill
- agent-testing-frameworkSkill
- agent-tool-calling-architectSkill
- agent-voice-agent-builderSkill
- agent-web-scraper-subagentSkill
- agent-workflow-automation-agentSkill
- ai-ml-anomaly-detection-builderSkill
- ai-ml-computer-vision-guideSkill
- ai-ml-dataset-builderSkill
- ai-ml-ml-experiment-trackerSkill
- ai-ml-model-fine-tunerSkill
- ai-ml-model-optimization-guideSkill
- ai-ml-nlp-pipeline-designerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 141
Never say "happy to help", "sure!", "great question", "let me", or similar.
- Distinctive: line 144
Stop when done. No summary, no recap, no trailing commentary.
- Distinctive: line 145
No politeness wrappers. Direct and blunt.
- Distinctive: line 148
No emoji unless asked.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prompt Debugger
Étape 1 — Collecte du contexte
Demander (ou inférer depuis la conversation) :
- Prompt actuel — coller le texte complet, pas un résumé.
- Résultat obtenu — extrait représentatif de la mauvaise sortie.
- Résultat attendu — description précise ou exemple concret.
- Modèle ciblé — GPT-4o, Claude Sonnet 3.7, Gemini 1.5 Pro… (certains bugs sont modèle-spécifiques).
- Température / paramètres — température > 0.8 → instabilité de format quasi-systématique.
- Contexte d'appel — API directe, playground, outil tiers, RAG, agent ?
Si l'utilisateur n'a que le symptôme, aller directement au tableau de diagnostic (Étape 2) et poser une question ciblée.
Étape 2 — Diagnostic par symptôme
| Symptôme observé | Causes probables (par ordre de fréquence) | Correction prioritaire |
| Hallucinations factuelles | Question ouverte sans ancrage ; données hors knowledge cutoff | Fournir les faits en contexte ; ajouter "Réponds uniquement à partir du texte fourni." |
| Format ignoré (JSON, Markdown, liste…) | Format décrit en prose, non montré | Inclure un exemple de sortie verbatim dans le prompt |
| Instructions sautées | Instruction noyée au milieu ; trop d'instructions simultanées | Mettre l'instruction critique en première ou dernière ligne ; réduire à 3 contraintes max |
| Réponse trop courte | Pas de contrainte de longueur ; modèle en mode "assistant concis" | "Développe en minimum 300 mots." ou "Fournis 5 points détaillés." |
| Réponse trop longue / rembourrage | Pas de plafond ; modèle optimiste sur la verbosité | "Réponse en 3 phrases max." + "N'explique pas ce que tu vas faire." |
| Ton/style inadapté | Aucune directive de ton ; rôle absent | Définir persona + donner 1 exemple de phrase cible |
| Résultat hors sujet | Ambiguïté lexicale ; contrainte négative absente | Reformuler + "Ne parle PAS de X." ; décomposer en sous-tâches |
| Incohérences entre paragraphes | Contradictions internes au prompt ; fenêtre context saturée | Supprimer les contradictions ; résumer le contexte avant de le passer |
| Refus non justifié | Trigger de safety sur un terme ambigu | Reformuler le terme sensible ; ajouter un contexte professionnel |
| Résultat non-déterministe | Température > 0.7 + formulation ouverte | Baisser temperature à 0–0.3 pour les tâches structurées |
Étape 3 — Analyse Avant / Après
Pour chaque problème identifié, produire un bloc :
PROBLÈME : [symptôme précis]
CAUSE : [mécanique sous-jacente]
AVANT : <extrait du prompt fautif>
APRÈS : <correctif minimal>
POURQUOI : [explication d'une ligne]Exemple concret :
PROBLÈME : Le modèle répond en anglais malgré la demande en français.
CAUSE : La directive de langue arrive après 400 tokens d'instructions en anglais.
AVANT : "... [long prompt anglais] ... Réponds en français."
APRÈS : "LANGUE DE RÉPONSE : FRANÇAIS UNIQUEMENT.\n\n[reste du prompt]"
POURQUOI : Les modèles pondèrent davantage les instructions en début de prompt
(primacy bias) ; les instructions tardives sont souvent ignorées.Étape 4 — Prompt corrigé complet
Fournir la version corrigée prête à copier-coller, avec :
- Structure : Rôle → Contexte → Tâche → Contraintes → Format de sortie
- Format montré par l'exemple, pas seulement décrit
- Contraintes négatives explicites si pertinent
Template de structure recommandé :
# RÔLE
Tu es [persona précis].
# CONTEXTE
[Informations factuelles nécessaires, données brutes, extraits de documents]
# TÂCHE
[Action unique et claire — un seul verbe principal]
# CONTRAINTES
- [Contrainte 1]
- [Contrainte 2]
- (3 max pour éviter la surcharge)
# FORMAT DE SORTIE
[Exemple verbatim de la sortie attendue — pas une description]Étape 5 — Pièges courants et anti-patterns
❌ Anti-patterns à bannir
| Anti-pattern | Pourquoi ça échoue | Alternative |
"Fais de ton mieux" | Objectif non défini → variance maximale | Critères de succès explicites |
| Instructions en prose continue | Le modèle perd le fil entre règles | Listes à puces ou sections titrées |
| Répéter la même contrainte 3 fois | N'améliore pas l'obéissance, augmente la confusion | 1 fois, bien formulée, bien placée |
| Prompt > 2 000 tokens sans structure | Dégradation de l'attention au milieu (lost-in-the-middle) | Diviser en appels chaînés |
| Mélanger langue du prompt et langue attendue | Ambiguïté sur la langue de sortie | Déclarer la langue en ligne 1 |
| Température haute + format strict (JSON) | Parsing failures fréquents | temperature: 0 pour la génération structurée |
| Négliger le system prompt | Instructions utilisateur plus faibles que system en poids | Mettre les règles invariantes dans le system prompt |
⚠️ Pièges spécifiques aux modèles (2026)
- Claude : respecte mieux les instructions en system prompt qu'en human turn ; sensible aux XML tags (
<instructions>,<context>). - GPT-4o : le format JSON est plus fiable via
response_format: { type: "json_object" }qu'en prompt seul. - Gemini : décrochage de format plus fréquent sur les longs contextes ; préférer des exemples courts et multiples (few-shot).
- Modèles fine-tunés : les instructions contraires au fine-tuning sont souvent ignorées silencieusement.
Étape 6 — Validation
Tester le prompt corrigé sur au moins 3 inputs représentatifs couvrant :
- Cas nominal (happy path)
- Cas limite (input vide, très court, ou ambigu)
- Cas adversarial (input qui pourrait déclencher le bug initial)
Checklist de validation rapide :
- Objectif lisible en 5 secondes (première ligne)
- Format montré par l'exemple, pas seulement décrit
- Contraintes ≤ 5, non-contradictoires
- Langue de sortie déclarée explicitement si multilingue
- Testé sur 3 inputs différents
temperature≤ 0.3 pour les sorties structurées- Pas d'instruction critique enfouie au milieu du prompt
Communication Rules — MANDATORY
- Ultra-concise. No filler, no preamble, no pleasantries.
- Never say "happy to help", "sure!", "great question", "let me", or similar.
- Tool first, talk second. Act before explaining.
- Result first. Lead with outcome, not process.
- Stop when done. No summary, no recap, no trailing commentary.
- No politeness wrappers. Direct and blunt.
- Minimum words. If one word works, do not use ten.
- No unsolicited explanations.
- No emoji unless asked.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

