prompt-engineering-1-zero-shot-prompting
Sub-skill of prompt-engineering: 1. Zero-Shot Prompting (+1).
Best use case
prompt-engineering-1-zero-shot-prompting is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of prompt-engineering: 1. Zero-Shot Prompting (+1).
Teams using prompt-engineering-1-zero-shot-prompting should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/1-zero-shot-prompting/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How prompt-engineering-1-zero-shot-prompting Compares
| Feature / Agent | prompt-engineering-1-zero-shot-prompting | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of prompt-engineering: 1. Zero-Shot Prompting (+1).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 1. Zero-Shot Prompting (+1)
## 1. Zero-Shot Prompting
**Basic Zero-Shot:**
```python
def zero_shot_prompt(task: str, input_text: str) -> str:
"""
Zero-shot prompting: Direct instruction without examples.
Best for simple, well-defined tasks.
"""
prompt = f"""
Task: {task}
Input: {input_text}
Output:
"""
return prompt
# Usage
prompt = zero_shot_prompt(
task="Classify this text as positive, negative, or neutral",
input_text="The mooring analysis passed all safety requirements."
)
# Output: positive
```
**Zero-Shot with Role:**
```python
def zero_shot_with_role(role: str, task: str, input_text: str) -> str:
"""
Zero-shot with explicit role definition.
"""
system = f"You are a {role}. You provide expert analysis."
user = f"""
{task}
{input_text}
"""
return system, user
# Usage
system, user = zero_shot_with_role(
role="senior offshore engineer with 20 years experience",
task="Review this mooring design and identify any concerns:",
input_text="8-line spread mooring in 150m water depth..."
)
```
**Zero-Shot Classification:**
```python
CLASSIFICATION_TEMPLATE = """
Classify the following engineering report into one of these categories:
- ANALYSIS: Technical analysis or simulation results
- INSPECTION: Field inspection or survey findings
- DESIGN: Design specifications or requirements
- INCIDENT: Incident reports or failure analysis
- MAINTENANCE: Maintenance records or procedures
Report:
{report_text}
Category:
"""
def classify_report(report_text: str) -> str:
prompt = CLASSIFICATION_TEMPLATE.format(report_text=report_text)
# Send to LLM
return prompt
```
## 2. Few-Shot Prompting
**Basic Few-Shot:**
```python
def few_shot_prompt(
task_description: str,
examples: list,
input_text: str
) -> str:
"""
Few-shot prompting with examples.
Generally 2-5 examples work best.
"""
prompt = f"{task_description}\n\n"
# Add examples
for i, ex in enumerate(examples, 1):
prompt += f"Example {i}:\n"
prompt += f"Input: {ex['input']}\n"
prompt += f"Output: {ex['output']}\n\n"
# Add actual input
prompt += f"Now process this:\n"
prompt += f"Input: {input_text}\n"
prompt += f"Output:"
return prompt
# Usage
examples = [
{
"input": "Tension: 2500 kN, Limit: 2800 kN",
"output": "PASS - Tension is 89% of limit, within acceptable range."
},
{
"input": "Tension: 3100 kN, Limit: 2800 kN",
"output": "FAIL - Tension exceeds limit by 11%. Redesign required."
},
{
"input": "Tension: 2750 kN, Limit: 2800 kN",
"output": "WARNING - Tension is 98% of limit, minimal margin."
}
]
prompt = few_shot_prompt(
task_description="Evaluate mooring line tension against limits.",
examples=examples,
input_text="Tension: 2200 kN, Limit: 2800 kN"
)
```
**Few-Shot with Diverse Examples:**
```python
def create_balanced_few_shot(examples_by_category: dict, input_text: str) -> str:
"""
Create few-shot prompt with balanced examples across categories.
"""
prompt = "Classify engineering documents into categories.\n\n"
# Include one example from each category
for category, examples in examples_by_category.items():
ex = examples[0] # Take first example from each
prompt += f"Document: {ex['text']}\n"
prompt += f"Category: {category}\n\n"
prompt += f"Document: {input_text}\n"
prompt += f"Category:"
return prompt
# Usage
examples_by_category = {
"ANALYSIS": [
{"text": "FEA results show stress concentration at weld..."}
],
"INSPECTION": [
{"text": "Visual inspection revealed corrosion on flange..."}
],
"DESIGN": [
{"text": "The platform shall be designed for 100-year storm..."}
]
}
prompt = create_balanced_few_shot(
examples_by_category,
input_text="Fatigue analysis indicates 35-year service life..."
)
```Related Skills
plan-review-prompt-refresh-after-plan-edits
Refresh reviewer prompt files from the latest on-disk plan before every adversarial re-review. Prevents Codex/Gemini from critiquing stale plan text after local edits.
label-driven-prompt-generation-architecture
Pattern for building automation scripts that classify GitHub issues into prompt templates using label-based routing and extract contextual data for batch processing
agent-team-prompt-generation
Create self-contained execution prompts that define multi-role workflows for Codex sessions without external dependencies
live-state-aware-overnight-implementation-prompts
Design overnight implementation prompts that begin with a live repo/CI precheck so workers continue from partial progress instead of replaying stale handoffs.
single-terminal-gh-issue-prompts
Generate live issue-specific Codex prompts for a single terminal, with repo-aware path contracts and plan-gate safety checks.
provider-review-prompt-path-guard
Prevent adversarial review dispatch failures caused by sandbox/tmp path mismatches and provider CLI working-directory drift when launching Codex or Gemini with prompt files.
plan-resubmit-wave-prompts
Run a planning-only multi-terminal wave to harden blocked `status:plan-review` issues for fresh adversarial re-review, with zero implementation work and explicit path ownership.
overnight-parallel-agent-prompts
Design self-contained prompts for 3-5 terminals to run overnight without supervision. Ensures zero git contention, provider-optimal allocation, and a clear morning deliverable summary.
adversarial-review-prompt-refresh-guard
Prevent stale plan/code review prompts from being sent to Codex/Gemini after the underlying artifact changed.
absolute-path-review-prompt-dispatch
Prevent adversarial review dispatch failures caused by relative prompt paths, superseded background sessions, and stale completion notices when launching Codex/Gemini review jobs.
engineering-solver-domain-recon
Deep reconnaissance of an engineering solver domain (OrcaWave, OrcaFlex, CalculiX, OpenFOAM, etc.) across a multi-repo ecosystem — map infrastructure, issues, skills, data artifacts, machine constraints, and solver queue state before planning work.
engineering-domain-reconnaissance
Class-level external engineering domain reconnaissance: field development, external drive ingest planning, and source-to-artifact conversion.