用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill prompt-engineering-1-zero-shot-prompting命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
Write outbound email and external messages in Vamsee Achanta's voice — a subtle offer to help, never bold or rash claims. Load before drafting ANY email, LinkedIn/Collide reply, proposal note, or outreach sent under his name.
Save/publish analysis or computation results from ANY ecosystem repo to Hugging Face as a queryable, viewer-renderable dataset. Use when the user wants to "save results to hugging face", "publish dataset to HF", "hugging face data saving", "save analysis results", "hf dataset", "make results queryable", or "render via datasets-server API". Reshapes nested results into flat parquet tables, writes a dataset card with a viewer `configs:` block and provenance, applies license/public-vs-private routing, enforces a domain data-quality gate (faithful-to-source != correct), publishes to `aceengineer/<repo>-<projection>`, and verifies via the datasets-server API.
Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.
| name | prompt-engineering-1-zero-shot-prompting |
| description | Sub-skill of prompt-engineering: 1. Zero-Shot Prompting (+1). |
| version | 1.0.0 |
| category | ai-prompting |
| type | reference |
| scripts_exempt | true |
Basic Zero-Shot:
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:
"""
prompt
prompt = zero_shot_prompt(
task=,
input_text=
)
Zero-Shot with Role:
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:
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
Basic Few-Shot:
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:
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..."
)