prompt-engineering

prompt-engineering is a skill for Claude Code, Codex from alphacornutum/layercake. It costs 171 tokens per session (4,030 once invoked), scanned B, original, MIT.

A guide for writing and improving prompts, which are the instructions given to AI models and coding agents. It covers agent roles, tool use, output formats, and ways to make responses more reliable.

In plain words
What is it for?
It is for designing or debugging system prompts, agent instructions, skills, slash commands, and other directions for AI tools.
Why use it?
It helps when an AI gives vague, incomplete, unsafe, or incorrectly formatted results because its instructions are unclear.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions AGENTS.md.

Good fit It is for designing or debugging system prompts, agent instructions, skills, slash commands, and other directions for AI tools.

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

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/alphacornutum/layercake/prompt-engineering/github.svg)](https://agentmods.dev/skills/alphacornutum/layercake/prompt-engineering)
Your own site
<a href="https://agentmods.dev/skills/alphacornutum/layercake/prompt-engineering"><img src="https://agentmods.dev/badge/skills/alphacornutum/layercake/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/alphacornutum/layercake/prompt-engineering"><img src="https://agentmods.dev/badge/skills/alphacornutum/layercake/prompt-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 171 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,030 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00171 $0.04030
Opus 5.5 $0.00068 $0.01612
Sonnet 5.5 $0.00034 $0.00806
Haiku 4.5 $0.00017 $0.00403

Measured 1mo ago against content hash 87bb56e80da2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

prompt-engineering scanned grade B with 1 finding 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 1mo 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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

- **Golden rule**: show your prompt to a colleague with no context. If they'd be confused, the model will be too.
.ai/src/skills/prompt-engineering/SKILL.md · 123 lines

How it starts

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

Prompt Engineering

A workflow and toolbox for writing prompts that steer modern LLMs reliably — system prompts, slash commands, skills, rules, agent personas, and one-off queries.

Bundled references (load on demand)

  • references/snippets.md — read when you need a copy-paste prompt fragment for a recurring concern: anti-overengineering, parallel tool calls, default-to-action / do-not-act, investigate-before-answering, code-review coverage, frontend aesthetics, frontend variety / propose-options, subagent control, persistence across context windows, multi-context state tracking, reversibility/safety, verbosity, long-document grounding, keep-going stop rules, and the GPT-6 Astra steering set. ~25 vetted blocks.
  • references/metaprompting.md — read when a prompt under-performs and the cause is unclear: full metaprompting template, filtering procedure for the model's suggestions, when to use vs. skip.
  • references/agent-persona.md — read when designing or auditing the system prompt of an autonomous agent: identity, autonomy posture, tool-use rules, editing constraints, full Friendly and Pragmatic personality blocks, final-message format, plan discipline.

Workflow

  1. Define success first — write one sentence: what must the output be, and for whom. Define the eval criteria before the prompt. If you can't, the prompt isn't ready.
  2. Draft with the minimal components — Objective + Instructions + (if needed) Context, Role, Format, Examples. Add a component only when you can justify it.
  3. Build a test set — 3+ diverse inputs: happy path, edge cases, malformed input. Tiny is fine; some signal beats none.
  4. Run and grade — code-grade where possible (JSON/regex/Python parse, length, keyword presence), model-grade for quality, human-grade for nuance. Always demand reasoning + score from a model grader, not a bare score.
  5. Diagnose before patching — name the cause (ambiguous scope? missing context? conflicting instruction? wrong format?). Fix the cause, not the symptom. When the cause is unclear, run metaprompting (see references/metaprompting.md).
  6. Change one thing at a time — otherwise you won't know what worked.
  7. Iterate — re-run the same test set, compare versions; stop when stable across all of them, not when "looks good once".
  8. Pin and version — for production, pin to a specific model snapshot (e.g., claude-opus-5-5, gpt-6-astra) and re-run evals when upgrading — a model upgrade shifts behaviour silently and your evals are the only signal.

Read the full file on GitHub · 123 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed 87bb56e80da2
  2. 2mo ago First seen · 123 lines · 171 tokens per session scan B 7abbefd2748a

Subscribe to this mod's changes

prompt-engineering is a skill published in the GitHub repository alphacornutum/layercake (1 stars, last pushed 1mo ago), licensed MIT. It adds 171 tokens to every session and 4,030 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-26.

Related

prompt-engineering compared with skills from other repositories

prompt-engineering next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
prompt-engineeringalphacornutum/layercakeSkill11mo agoMITB171Claude Code, Codex
after-effects-scriptingMaciejdziuba/youtube-skillsSkill54d agoMITA148Claude Code, Codex
like-burstnexu-io/motion-anythingSkill1.1k14d agoApache-2.0A79Claude Code, Codex
magnetic-buttonnexu-io/motion-anythingSkill1.1k14d agoApache-2.0A63Claude Code, Codex
ripple-pressnexu-io/motion-anythingSkill1.1k14d agoApache-2.0A60Claude Code, Codex
scroll-revealnexu-io/motion-anythingSkill1.1k14d agoApache-2.0A63Claude Code, Codex
border-beamnexu-io/motion-anythingSkill1.1k14d agoApache-2.0A60Claude Code, Codex