prompt_engineering

prompt_engineering is a skill for Claude Code, Codex from ApexIQ/skillsmith. It costs 55 tokens per session (663 once invoked), scanned A, original, MIT.

A guide to writing instructions for AI models so they produce more useful and consistent results. It covers newer reasoning models, clear formatting, examples, and structured answers.

In plain words
What is it for?
Use it to write prompts, define required answer formats, guide AI agents through complex tasks, and reduce prompt-injection risks.
Why use it?
It helps prevent unclear requests, mixed-up instructions, and data that accidentally changes what the model was told to do.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write prompts, define required answer formats, guide AI agents through complex tasks, and reduce prompt-injection risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/apexiq/skillsmith/prompt_engineering
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ApexIQ/skillsmith --skill prompt_engineering
Clone the repo
git clone --depth 1 https://github.com/ApexIQ/skillsmith

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prompt_engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/apexiq/skillsmith/prompt_engineering.svg)](https://agentmods.dev/skills/apexiq/skillsmith/prompt_engineering)
Your own site
<a href="https://agentmods.dev/skills/apexiq/skillsmith/prompt_engineering"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/prompt_engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.00663
Opus 5 $0.00028 $0.00331
Sonnet 5 $0.00011 $0.00133
Haiku 4.5 $0.00006 $0.00066

Measured 8d ago against content hash 15e110a63a5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

prompt_engineering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agent/skills/prompt_engineering/SKILL.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

✍️ Prompt Engineering (2025 Edition)

Philosophy: Direct models through clear constraints and structural cues. Modern LLMs prioritize well-formatted, context-rich instructions over simple keywords.

🧠 Reasoning Model Strategy (o1, o3, DeepSeek-R1)

For models with internal "Think" cycles:

  • Quiet Mode: Do NOT ask for "chain of thought" or "step by step" logic. These models do it internally and redundant prompting can degrade latency or follow-through.
  • Focus: Define the Input, Constraints, and Expected Output Schema with extreme precision.
  • Evaluation: Provide rubrics for how the model should verify its own work.

1. Delimiters and XML Tagging

Use standard delimiters (XML tags, backticks, or separators) to clearly distinguish instructions from data.

  • Example:
    <instruction>Extract entities from the text below.</instruction>
    <text>John Doe moved to Berlin in 2024.</text>
    
  • Benefit: Prevents "prompt injection" where the data content overwrites the instructions.

2. Few-Shot Structural Prompting

Show example "Thought -> Action" sequences to steer complex agent behavior.

  • Use 2-3 high-quality examples of the full reasoning process.

3. Negative Constraints (Avoidance)

Be explicit about what NOT to do.

  • Bad: "Don't use Python 2."
  • Good: "Use Python 3.12+ features. Avoid any legacy constructs from Python 2.x."

4. Output Formatting (JSON/Markdown)

Force specific formats for programmatic use.

  • Use JSON Schema in the prompt to ensure the keys and types are strictly followed.

Advanced Patterns

  • Meta-Prompting: Use the model to help you refine your own prompt.
  • Context Injection: See agentic_context_engineering for managing long-term memory.
  • Workflow Patterns: See anthropic_workflow_patterns for orchestration logic.

Anti-Patterns (2025 Update)

  • Prompt Dumping: Adding irrelevant code snippets (use skillsmith budget to check token usage).
  • Keyword Soup: Relying on magic words like "Expert" (effective prompts now rely on specific instructions and role-play).
  • Ignoring Failures: Not providing instructions on what the model should do when it cannot complete the task.

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 63 lines · 55 tokens per session scan A 15e110a63a5c

Subscribe to this mod's changes

prompt_engineering is a skill published in the GitHub repository ApexIQ/skillsmith (5 stars, last pushed 5mo ago), licensed MIT. It adds 55 tokens to every session and 663 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

prompt-engineering

Use when one prompt must give the same right answer across reruns, models, and pasted-in hostile input: forcing a fixed schema, picking the few-shot set, ordering the prompt blocks, or the inline cases you run while tuning. NOT the agent loop, tools, or retrieval (that is building-agents), NOT a standing CI eval…

ericrisco/rsc-harness · 83 tokens

llm-engineering-expert

Build reliable applications on large language models: prompt design, structured output, evaluation, guardrails, and cost and latency control. Use when the user mentions LLMs, prompts, prompt engineering, few-shot examples, structured or JSON output, function calling, hallucination, model evaluation, token costs…

personamanagmentlayer/pcl · 92 tokens

LLM

Implement large language model (LLM) chat completions using the z-ai-web-dev-sdk. Use this skill when the user needs to build conversational AI applications, chatbots, AI assistants, or any text generation features. Supports multi-turn conversations, system prompts, and context management.

jjyaoao/HelloAgents · 59 tokens

dspy-output-refinement-constraints

Use for dspy.Refine, dspy.BestOfN, output constraints, validation, reward functions, and iterative output refinement.

OmidZamani/dspy-skills · 35 tokens

dspy-react-agent-builder

Use for ReAct agents, tool-calling agents, dspy.ReAct, multi-step reasoning and acting, and GEPA agent optimization.

OmidZamani/dspy-skills · 34 tokens

Prompt Refiner

Improves AI prompts to be clearer, more specific, and produce more consistent outputs.

Notysoty/openagentskills · 21 tokens