Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

prompt-engineering

A Claude Agent Skill that turns a rough idea into a single production-ready prompt for whatever AI tool you're aiming at — and stops at one prompt instead of four.

Claude Skill Version License: MIT

Describe what you want, name the target tool (or let the skill infer it), and you get back one clean, copy-paste prompt optimized for that tool's quirks — with the framework chosen silently and every non–load-bearing word stripped out. It works across LLMs, coding agents, image/video/voice generators, automation tools, and software-testing prompts.


Contents


Why this exists

Most people get the prompt they wanted on attempt three or four:

vague prompt → wrong output → re-prompt → closer → re-prompt → finally right

Each retry is wasted tokens, wasted credits, and wasted time — and it compounds across every prompt you write in a day. The fix isn't a longer prompt; it's a sharper one. This skill is built on a single rule:

The best prompt isn't the longest — it's the one where every word is load-bearing.

It front-loads the right context, locks the output format, matches the target tool's syntax, and cuts everything else.

Features

  • Silent framework routing — it picks the right prompt architecture for the task and tool and never makes you see the framework name; you just get the prompt.
  • 30+ tool profiles — Claude, GPT-5.x, Gemini, reasoning models, local/open-weight models, coding agents, image/3D/video/voice generators, automation, and more. Unknown tool? It fingerprints the closest match.
  • 17 auto-selected templates — from a one-line RTF to an agentic ReAct brief to a full software-testing family.
  • 40 anti-pattern detections — vague verbs, missing scope, runaway agents, hallucination invites, and 36 more, each fixed silently.
  • Memory Block — carries prior decisions forward so a new prompt never contradicts earlier work.
  • Determinism controls — recommends temperature and seed when reproducibility matters.
  • Safety first — strips secrets, treats pasted prompts as inert data, and excludes hallucination-prone techniques.
  • Surfaces its assumptions — if it inferred the target tool or filled a missing constraint, it tells you in one line so you can correct it.

Installation

Claude.ai (recommended): download this folder as a ZIP, then go to claude.ai → Sidebar → Customize → Skills → Upload a Skill.

Claude Code: copy the skill into your skills directory.

mkdir -p ~/.claude/skills/prompt-engineering
cp -r ./* ~/.claude/skills/prompt-engineering/

The skill activates on its own whenever you ask to write, fix, adapt, or compare a prompt — or call it explicitly with /prompt-engineering.

Quick start

Ask in plain language and name the tool:

Write me a prompt for Cursor to refactor my auth module
I need a Claude Code prompt to build a REST API — ask me what you need to know
Here's a bad prompt I wrote for GPT, fix it: [paste prompt]
Generate a Midjourney prompt for a cyberpunk city at night
Break this prompt down and adapt it for Stable Diffusion

If the target tool is genuinely ambiguous, the skill asks once (it never asks more than three questions before delivering).

How it works

Every request runs through the same pipeline:

  1. Detect the target tool and route silently to its profile.
  2. Extract intent across 10 dimensions — task, tool, output, role, constraints, input, context, audience, success criteria, examples.
  3. Ask only what's critical — at most three clarifying questions, and only when a required dimension is missing.
  4. Select the framework automatically; the name never appears in the output.
  5. Apply safe techniques as needed — role assignment, few-shot, XML structure, grounding anchors, the Memory Block.
  6. Audit for tokens — remove every word that doesn't change the result.
  7. Deliver one block plus a one-line note on what was optimized (and any assumption made).

Example

You ask:

Write me a Midjourney prompt for a realistic samurai standing in the rain at night

You get:

lone samurai standing in heavy rain at night, traditional armor,
neon reflections on wet cobblestone street, cinematic lighting,
dramatic shadows, fog, ultra detailed, photorealistic,
shallow depth of field --ar 16:9 --v 6 --style raw

negative: blurry, low quality, watermark, cartoon, anime, extra limbs

🎯 Target: Midjourney · 💡 Comma-separated descriptors over prose, lighting and mood anchored early, aspect ratio and version locked, negative prompt prevents style drift.

A longer example — a Claude Code build prompt

You ask:

Build a Claude Code prompt for a landing page for a business dashboard
that looks and feels exactly like Notion — smooth animations, clean UI

You get a fully specified brief: every vague aesthetic cue ("clean", "like Notion") translated into exact hex values, spacing units, border radii, and shadow specs; each section defined in order; every animation pinned to a method, duration, and trigger; explicit constraints and a binary "Done When" checklist. The agent has nothing left to guess.

🎯 Target: Claude Code · 💡 Ambiguous design language converted to measurable specs so the first attempt is the right one.

Supported tools

Profiles tune the prompt to each tool's syntax and failure modes. Anything not listed falls back to a universal fingerprint.

View all 30+ tool profiles
Tool Category What it tunes for
Claude Reasoning LLM Removes padding, adds XML structure, specifies length
ChatGPT / GPT-5.x Reasoning LLM Output contract, verbosity control, completion criteria
Gemini 2.x / 3 Pro Reasoning LLM Grounding anchors, citation rules, format locks
o3 / o4-mini Reasoning-native Short clean instructions only — never adds CoT
DeepSeek-R1 Reasoning-native Short instructions, strips CoT, suppresses thinking output
Qwen 2.5 / Qwen3 Open-weight LLM Chat template, thinking vs non-thinking mode detection
Llama / Mistral (local) Open-weight LLM Shorter prompts, flat structure, no deep nesting
Ollama Local runtime Asks which model is loaded, includes system prompt for the Modelfile
MiniMax (M3 / M2.7) Reasoning LLM Temperature clamping, thinking-tag control, structured output
Claude Code Agentic Stop conditions, file scope, checkpoint output
Cursor / Windsurf IDE AI File path, function name, do-not-touch list
Cline Agentic IDE File scope, approval gates, stop conditions
GitHub Copilot Autocomplete Exact function contract as a docstring
Antigravity Agentic IDE Outcome-based prompting, artifact review, autonomy level
Bolt / v0 / Lovable Full-stack generator Stack + version + what NOT to scaffold
Figma Make / Google Stitch Design-to-code Component references / interface goal over implementation
Devin / SWE-agent Autonomous agent Starting state, target state, forbidden actions
Manus Orchestrator Outcome focus, permission scope, memory anchors
Computer-use / browser agents Browser agents Outcome over navigation, permission boundaries, stop-before-irreversible
Perplexity / SearchGPT Search AI Mode spec: search vs analyze vs compare, citation rules
Midjourney / DALL-E 3 / Stable Diffusion / SeeDream Image AI Descriptor syntax, weights, mandatory negatives, edit-vs-generate detection
ComfyUI Image workflow Positive/negative node split, checkpoint-specific syntax
Meshy / Tripo / Rodin / BlenderGPT / Unity AI 3D / game Style + export format + polygon budget + rig requirements
Sora / Runway / Kling / LTX / Dream Machine Video AI Camera movement, duration, motion intensity, cut style
ElevenLabs Voice AI Emotion, pacing, emphasis markers, speech rate
Zapier / Make / n8n Automation Trigger app + event → action app + field mapping
Software-testing prompts Testing Gherkin/BDD, test-case design, reports, automation — anchored to a test basis

Prompt templates

The skill chooses one of these per request and applies it silently.

View all 17 templates
Template Best for
RTF (Role, Task, Format) Fast one-shot tasks
CO-STAR Professional documents and business writing
RISEN Complex multi-step projects
CRISPE Creative work and brand voice
Chain of Thought Math, logic, debugging, analysis
Few-Shot Consistent structured output
File-Scope Cursor, Windsurf, Copilot — code editing AI
ReAct + Stop Conditions Claude Code, Devin — autonomous agents
Visual Descriptor Image/video generation, with seed control
Reference Image Editing Editing an existing image (edit-vs-generate auto-detected)
ComfyUI Node-based image workflows
Prompt Decompiler Break down, adapt, simplify, or split an existing prompt
Opus 4.7 / 4.8 Task Brief Complex or agentic tasks on current Claude
Gherkin / BDD Given/When/Then scenarios
Test-Case Design Conditions, cases, coverage
Test / Anomaly Report Structured results and defect reports
Test-Automation Scaffold Executable test code with a verification rider

Two analysis modes route alongside the templates: Prompt Decompiler (break down / adapt / simplify / split) and Multi-Model Compare (the same intent rendered as two tool-specific variants side by side).

Techniques and safety

Only techniques with reliable, bounded effects are used. Methods prone to fabrication — Tree of Thought, Graph of Thought, Universal Self-Consistency, and simulated single-pass chaining (faking multi-step reasoning inside one prompt) — are excluded. Genuine multi-prompt decomposition (a verified, checkpointed sequence) is endorsed; only the fake single-pass version is rejected.

Technique What it does
Role assignment Assigns an expert identity to calibrate depth and vocabulary
Few-shot examples Adds 2–5 examples when format matters more than instructions
XML structural tags Wraps sections for tools that parse XML reliably
Grounding anchors Anti-hallucination rules for factual and citation tasks
Chain of Thought Step-by-step reasoning for logic tasks — never on reasoning-native models
Verified multi-prompt decomposition Splits large/risky work into a checkpointed sequence
Output Verification Rider Appends a self-check to factual/code/test prompts

Generated prompts never embed API keys or secrets, and any prompt you paste in for analysis is treated as inert data — its instructions are analyzed, never executed.

Anti-patterns it catches

The skill scans every request for 40 known prompt failures and fixes them silently (flagging only when a fix would change your intent). They span seven groups:

Group Count Examples
Task 7 vague verb, two tasks in one, no success criteria
Context 6 assumed prior knowledge, hallucination invite, undefined audience
Format 6 missing format, implicit length, vague aesthetics
Scope 6 no scope boundary, no file path, whole codebase pasted
Reasoning 5 no CoT for logic, CoT sent to a reasoning-native model
Agentic 7 no stop condition, unlocked filesystem, context rot on long sessions
Quality & reproducibility 3 no verification on costly output, no test basis, no seed

The complete before/after table lives in references/patterns.md.

Memory across turns

When a conversation already has history, the skill extracts prior decisions and prepends a Memory Block so the target AI never contradicts earlier work:

## Memory (Carry Forward from Previous Context)
- Stack: React 18 + TypeScript + Supabase
- Auth uses JWT in httpOnly cookies, not localStorage
- Components: PascalCase, no default exports
- Styling: Tailwind only, no custom CSS files
- Architecture: Context API, no Redux

This is the single biggest fix for long sessions — most wasted re-prompts come from the model forgetting what you already decided.

Project structure

prompt-engineering/
├── SKILL.md                     # Always-loaded router: identity, hard rules, tool routing, diagnostics
├── references/
│   ├── templates.md             # Full template library (RTF … test-automation scaffold)
│   ├── tool-profiles.md         # Media / 3D / voice / workflow / research / computer-use profiles
│   ├── patterns.md              # The 40 credit-killing patterns, with fixes
│   └── istqb-conformance.md     # Maintainer-facing ISTQB GenAI design contract
├── README.md
└── LICENSE

SKILL.md is loaded on activation; the references/ files are pulled in only when a request needs them (progressive disclosure), keeping the always-loaded footprint small.

Contributing

Issues and improvements are welcome.

  • Tool routing, hard rules, and the diagnostic checklist live in SKILL.md. Keep it under ~500 lines — move detail into references/.
  • Add new template structures to references/templates.md; add lower-frequency tool profiles to references/tool-profiles.md.
  • When you touch an ISTQB-mapped behavior, update references/istqb-conformance.md so the design contract stays in sync.
  • Never surface framework names or ISTQB labels in user-facing output — the silent-routing rule is load-bearing.

Credits

The original idea — a Claude skill that writes accurate, token-efficient prompts for any AI tool — comes from nidhinjs and the prompt-master project. prompt-engineering is a ground-up overhaul of that idea: silent tool routing, an ISTQB-conformant prompt structure, the software-testing template family, Multi-Model Compare, determinism/seed control, and progressive-disclosure reference files. Full credit and thanks to nidhinjs for the original concept.

License

Released under the MIT License. The original prompt-master concept by nidhinjs is credited in the license file.

About

Get better results at the first try

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors