prompt-engineering

prompt-engineering is a skill for Claude Code, Codex from cosmicstack-labs/mercury-agent-skills. It costs 44 tokens per session (3,732 once invoked), scanned A, original, MIT.

Guidance for writing instructions, called prompts, that produce more consistent results from large language models. It covers clear wording, roles, output formats, constraints, testing, and repeated refinement.

In plain words
What is it for?
It is for drafting prompts, improving existing instructions, specifying structured outputs, testing one change at a time, and building reusable prompt patterns.
Why use it?
It helps reduce ambiguous or inconsistent model responses by making the task, context, and expected answer explicit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit It is for drafting prompts, improving existing instructions, specifying structured outputs, testing one change at a time, and building reusable prompt patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cosmicstack-labs/mercury-agent-skills/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 cosmicstack-labs/mercury-agent-skills --skill prompt-engineering
Clone the repo
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills

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/cosmicstack-labs/mercury-agent-skills/prompt-engineering/github.svg)](https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/prompt-engineering)
Your own site
<a href="https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/prompt-engineering"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent-skills/prompt-engineering/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prompt-engineering

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/prompt-engineering"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent-skills/prompt-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,732 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. ✓ AI security review Sonnet 5 · 6 Sept 2026 📄 Read the review Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high YARA Match · line 3
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
  • high Anti-Refusal · line 290
    Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.
    Fix: Remove any instruction telling the agent to never refuse or always comply. The agent must retain the ability to decline unsafe, out-of-scope, or harmful requests.
  • high Anti-Refusal · line 385
    Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
    Fix: Remove jailbreak framing that nullifies safety policies or restrictions. Skill content must not instruct the agent to ignore its guidelines or operate without guardrails.
  • high Prompt Injection · line 385
    This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
    Fix: Remove or rewrite any text that instructs the agent to ignore prompts, override safety rules, or trust unverified content. Ensure skill content cannot be injected to alter agent behavior.
How audits are shown
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.00044 $0.03732
Opus 5 $0.00022 $0.01866
Sonnet 5 $0.00009 $0.00746
Haiku 4.5 $0.00004 $0.00373

Measured 9d ago against content hash e336bda11c3b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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.

categories/ai-ml/prompt-engineering/SKILL.md · 444 lines

How it starts

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

Prompt Engineering

Core Principles

1. Clarity Over Cleverness

A clear, direct prompt always outperforms a clever but ambiguous one. State exactly what you want, in what format, and with what constraints. Ambiguity is the enemy of consistent output.

2. Context is Everything

Models have no inherent context beyond their training data. Every prompt must establish:

  • Who the model should be (role)
  • What the task is (instruction)
  • How to respond (format, tone, length)
  • Why the task matters (optional but helpful for complex tasks)

3. Iterate, Don't Expect Perfection First Time

The first prompt is rarely the best. Prompt engineering is an iterative discipline. Each refinement teaches you something about how the model interprets your instructions.

4. Constrain to Liberate

Paradoxically, more constraints (format, length constraints, guardrails) lead to better outputs. Open-ended prompts invite hallucination and inconsistency.

5. Test Systematically

Change one variable at a time. Track what works. Build a personal library of prompt patterns that reliably produce good results.


Prompt Engineering Scorecard

Level Characteristics Typical Output Quality Refinement Approach
Beginner Single-sentence prompts, no role definition, no format specification Inconsistent, often misses the mark, requires manual editing Trial and error, adds more words hoping for improvement
Proficient Clear instructions, role assignment, basic format constraints, some examples Mostly correct, occasionally deviates, needs minor edits Systematic A/B testing, adjusts temperature, adds few-shot examples
Expert Multi-layered instructions, chain-of-thought reasoning, structured output schemas, temperature calibration, guardrails Highly consistent, follows complex constraints, minimal editing needed Uses prompt chains, dynamic few-shot selection, automated evaluation, version-controlled prompts

Read the full file on GitHub · 444 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. 9d ago First seen · 444 lines · 44 tokens per session scan E e336bda11c3b

Subscribe to this mod's changes

prompt-engineering is a skill published in the GitHub repository cosmicstack-labs/mercury-agent-skills (471 stars, last pushed 15d ago), licensed MIT. It adds 44 tokens to every session and 3,732 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

agent-platform-prompt-management

Manages and orchestrates prompts in Agent Platform. Use when you need to create, list, retrieve, version, or delete managed prompts in Agent Platform. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform prompts.

google/skills · 55 tokens

gemini-api-dev

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best…

google-gemini/gemini-skills · 73 tokens

ml-kit-genai-prompt-api

Analyzes Android codebases to implement ML Kit GenAI Prompt API. Use this skill to send natural language requests on-device to Gemini Nano, use structured output with Prompt API, implement prefix caching, optimize the current prompt, or apply best practices.".

android/skills · 57 tokens

prompt-lab

LLM prompt engineering: analyzes failure modes, generates variants (direct, few-shot, CoT), designs rubrics, produces test suites. Triggers on: "prompt engineering", "generate prompt variants", "A/B test prompts", "optimize prompt", "improve this prompt". NOT for SKILL.md files, use skill-evaluator.

Mathews-Tom/armory · 74 tokens

prompt-engineering

Provides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection, chain-of-thought structuring, system prompt design, and template composition. Use when the user asks to write or improve a prompt, wants help with few-shot examples, chain-of-thought, system prompts, prompt…

giuseppe-trisciuoglio/developer-kit · 82 tokens

qianwen-text

Generate text, have conversations, write code, reason, and call functions with Qwen models. TRIGGER when: user asks to chat with Qwen, generate text, write code with Qwen, use Qwen function calling, or explicitly invokes this skill by name (e.g. use qianwen-text). DO NOT TRIGGER when: general coding questions without…

QianWen-AI/qianwen-ai · 111 tokens