ardurai/god-skill-suite/god-ai-prompting
Claude Code and agent skill by ardurai/god-skill-suite
- community
Checking that the SKILL.md file is still in the repository.
God-level prompt engineering and LLM interaction skill. Covers systematic prompt design, chain-of-thought (CoT) and its variants (zero-shot CoT, few-shot CoT, self-consistency, tree of thought, graph of thought), structured output extraction, few-shot example design, instruction following optimization, prompt robustness testing, DSPy for programmatic prompt optimization, meta-prompting, system prompt design for production, prompt injection defense at the prompt level, evaluation of prompt quality, and the mindset that prompt engineering is applied ML research — not trial and error.
Install
npx vskill@latest install ardurai/god-skill-suite/god-ai-promptingSKILL.md
The same SKILL.md was published earlier as ardurai/god-skill-suite/god-ai-prompting.
God-Level Prompt Engineering
A prompt that "seems to work" is not a prompt. It is a hypothesis. Your job is to design, measure, break, rebuild, and prove. Prompt engineering is applied ML research. Treat it like one.
Researcher-Warrior Mindset
You do not write prompts by feel. You define a success criterion, build an evaluation set, run experiments, measure results, and iterate based on data. You try to break your own prompts before the model's users do. You document what you tried, what failed, and why. When a prompt works for the happy path but fails on edge cases, that is not a success — that is a partial success that will become a production incident.
Anti-hallucination rules for this domain:
- The paper citation for zero-shot CoT ("Let's think step by step") is: Kojima et al. "Large Language Models are Zero-Shot Reasoners" (NeurIPS 2022). Cite it correctly or not at all.
- Tree of Thought is from: Yao et al. "Tree of Thoughts: Deliberate Problem Solving with Large Language Models" (NeurIPS 2023).
- DSPy is from: Khattab et al. "DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines" (ICLR 2024).
- Never claim a prompting technique "always works." Every technique has failure modes and model-dependent behavior.
- Never describe a specific model's behavior as universal. Prompting techniques generalize imperfectly across models and versions.
1. Prompt Engineering Is Not Magic
The Core Principle
Prompt engineering is systematic experimentation. The process is:
- Define the task precisely: what is the input? What is the output? What does "correct" mean?
- Define the success metric: accuracy on a test set? Human preference? Latency? Cost?
- Build an evaluation set: at minimum 50 examples covering the distribution of inputs, including edge cases. (More is better. 200+ for production prompts.)
- Establish a baseline: even "summarize this text" with no additional instructions is a baseline.
- Experiment: change one thing at a time. Measure on the eval set.
- Document: what you tried, what changed, what the delta was.
- Ship the best measured prompt, not the most clever prompt.
What "Seems to Work" Actually Means
If you test your prompt on 5 examples and it works on 4, you have n=5 data points. You do not know how it performs on the actual distribution of inputs. You have a hypothesis, not a result. The production system will give you the real distribution, but by then it's too late to be careful.
Build your eval set from real user inputs (or sampled synthetic inputs that match the real distribution) before shipping.
2. The Anatomy of a Production System Prompt
Order matters. Models attend differently to different positions in the context. The structure below is battle-tested for instruction-following models:
Why Order Matters
Models (especially older ones) show recency bias — content near the end of the prompt has disproportionate influence. Put the most important constraints and output format specifications both early (in the role/task section) AND late (in the safety section). Repeat critical instructions.
3. Chain-of-Thought and Its Variants
Why Chain-of-Thought Works
CoT prompting causes the model to generate intermediate reasoning steps before producing the final answer. This works because:
- The model's "computation" is proportional to the tokens it generates before the answer.
- Generating intermediate steps reduces the logical distance between the problem and the answer.
- Errors in individual steps are more visible and can be caught by the model itself.
Empirical result: CoT significantly improves performance on multi-step reasoning tasks (arithmetic, commonsense reasoning, symbolic reasoning). It does NOT consistently help on tasks that don't require multi-step reasoning (simple classification, pattern matching).
Zero-Shot CoT
Append "Let's think step by step." (or equivalent) to the prompt. Verified to work by Kojima et al. "Large Language Models are Zero-Shot Reasoners" (NeurIPS 2022).
Without "Let's think step by step": models often answer 8 (incorrectly, by ignoring the multiplication).
Variants: "Think this through step by step." / "Work through this carefully." / "Reason through this before answering." All work similarly.
Few-Shot CoT
Provide examples that include full reasoning chains, not just input-output pairs.
Few-shot CoT outperforms zero-shot CoT on complex tasks, at the cost of more tokens and the need for curated examples.
Self-Consistency
Run the same CoT prompt N times (N = 5-40 depending on task). Collect all answers. Return the majority vote answer.
Why it works: different reasoning paths may reach the same correct answer from different directions. Errors tend to produce diverse wrong answers. The correct answer has higher probability of being the plurality.
When to use: high-stakes reasoning tasks where accuracy is worth the cost of N calls. N=10 is a common sweet spot.
Cost: N × (single call cost). Only justified when accuracy improvement is worth the cost increase. Measure the accuracy improvement on your eval set before committing.
Tree of Thought (ToT)
Source: Yao et al. "Tree of Thoughts: Deliberate Problem Solving with Large Language Models" (NeurIPS 2023).
At each step, the model generates multiple candidate next thoughts (branches). Each branch is evaluated (by the model itself or by a separate evaluator). The most promising branches are expanded further. Search strategies: breadth-first (explore all branches at depth d before going deeper), depth-first with backtracking.
When to use: creative tasks requiring exploration (story writing, puzzle solving); mathematical reasoning where early wrong turns need correction; any task with many valid intermediate states.
Cost: very high (branching factor × depth × eval calls). Profile cost before using in production. Often best reserved for offline processing, not real-time interaction.
4. Few-Shot Example Design
Diversity of Examples
Examples should cover the distribution of inputs the model will see:
- Different lengths (short and long inputs)
- Different complexity levels (easy and hard cases)
- Different edge cases (empty input, malformed input, unusual input)
- Failure modes you want to avoid (include an example of a wrong approach followed by the correct one)
Avoiding Bias in Example Selection
The model learns the pattern from your examples. If all your examples use formal language, it will use formal language. If all your classification examples come from one category, it will be biased toward that category. Balance your examples deliberately.
Format Consistency
Every example must follow the exact same format. Inconsistent formatting in examples produces inconsistent output. The model is a pattern matcher at its core — give it a consistent pattern.
Example Count
- 1-3 examples: minimal improvement, low token cost
- 5-10 examples: significant improvement for most tasks
- 20+ examples: diminishing returns for prompting (consider fine-tuning at this point)
- The "sweet spot" depends on the task and model. Measure on your eval set.
5. Structured Output Extraction
JSON Mode
OpenAI and most modern LLMs support a "JSON mode" or "response_format: json_object" parameter that forces the output to be valid JSON. Always use this when you need structured output.
Important: JSON mode does not enforce a schema — it only ensures valid JSON. The model may still include or exclude fields. Use function calling or Structured Outputs (OpenAI) for schema enforcement.
Function Calling for Structured Extraction
Pydantic Schema Enforcement with Retry
Feeding the validation error back to the model in the retry prompt is highly effective. The model understands its own error messages.
6. Instruction Following Optimization
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/god-ai-prompting/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ardurai/god-skill-suite/god-ai-prompting)