Agent skill

Prompt Engineering

by spencerpauly in spencerpauly/awesome-cursor-skills

Write effective prompts for LLMs — structure, few-shot examples, chain-of-thought, system prompts, and output parsing.

CC0-1.0Auto-check passedAI & LLM Engineering

Install Prompt Engineering

skills CLI
$ npx skills add spencerpauly/awesome-cursor-skills --skill prompt-engineering -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install spencerpauly/awesome-cursor-skills prompt-engineering --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/resources/prompt-engineering .claude/skills/prompt-engineering && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
prompt-engineering
GitHub stars
843
Token cost
~915 tokens
SKILL.md length
204 words
Files
1
Skills in repo
60
Repo updated
First seen
Licence
CC0-1.0

At a glance

Write effective prompts for LLMs — structure, few-shot examples, chain-of-thought, system prompts, and output parsing.

  • Works in 4 steps: Be specific — vague prompts get vague… → Show, don't tell — examples beat… → Structure the output — tell the model… → …
  • Tasks that involve Prompt engineering
  • SKILL.md covers Core Principles, Techniques, Patterns for Code and Anti-Patterns, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Prompt Engineering is an agent skill from spencerpauly/awesome-cursor-skills. Write effective prompts for LLMs — structure, few-shot examples, chain-of-thought, system prompts, and output parsing.

Its SKILL.md is about 920 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Prompt engineering. The repository describes itself as: A curated list of awesome skills for Cursor. The licence is CC0-1.0.

When your agent uses it

  • Tasks that involve Prompt engineering

Example prompts

  • “/prompt-engineering”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Be specific — vague prompts get vague results
  2. Show, don't tell — examples beat instructions
  3. Structure the output — tell the model exactly what format you want
  4. Iterate — prompts are code; test and refine them

What it can do on your machine

Read from SKILL.md and the folder at commit 99cd265. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Prompt Engineering loads about 915 tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 204 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~915

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from spencerpauly/awesome-cursor-skills at commit 99cd265, republished under its CC0-1.0 licence (© spencerpauly). 204 words, ~915 tokens.

Download SKILL.mdSave it as .claude/skills/prompt-engineering/SKILL.md (or your agent's skills folder).
name
prompt-engineering
description
Write effective prompts for LLMs — structure, few-shot examples, chain-of-thought, system prompts, and output parsing.
user-invocable
true

Prompt Engineering

Write prompts that get reliable, high-quality output from LLMs.

Core Principles

  1. Be specific — vague prompts get vague results
  2. Show, don't tell — examples beat instructions
  3. Structure the output — tell the model exactly what format you want
  4. Iterate — prompts are code; test and refine them

Techniques

System Prompts

Set the model's role and constraints:

You are a senior code reviewer. Review the provided code for:
1. Security vulnerabilities
2. Performance issues
3. Readability problems

For each issue found, provide:
- Severity (critical/warning/info)
- Line number
- Description
- Suggested fix

If no issues are found, respond with "No issues found."
Few-Shot Examples

Provide 2-3 examples of input → output:

Convert the user's natural language query to a SQL query.

Example 1:
Input: "How many users signed up last month?"
Output: SELECT COUNT(*) FROM users WHERE created_at >= DATE_TRUNC('month', NOW() - INTERVAL '1 month') AND created_at < DATE_TRUNC('month', NOW());

Example 2:
Input: "Show me the top 5 products by revenue"
Output: SELECT p.name, SUM(o.amount) as revenue FROM products p JOIN orders o ON o.product_id = p.id GROUP BY p.name ORDER BY revenue DESC LIMIT 5;

Now convert this query:
Input: "{user_query}"
Output:
Chain-of-Thought

Ask the model to reason step by step:

Analyze this error and suggest a fix. Think step by step:
1. What does the error message mean?
2. What could cause this error?
3. What is the most likely root cause given the code context?
4. What is the fix?
Structured Output

Request JSON or a specific format:

Respond with a JSON object matching this schema:
{
  "summary": "string - one sentence summary",
  "sentiment": "positive | negative | neutral",
  "key_topics": ["string"],
  "confidence": 0.0-1.0
}
Constraints and Guardrails
Rules:
- Only use information from the provided context
- If you don't know the answer, say "I don't know" — do not guess
- Keep responses under 200 words
- Do not include any PII in your response

Patterns for Code

Code generation:

Write a TypeScript function that {description}.

Requirements:
- {requirement 1}
- {requirement 2}

Use these libraries: {libraries}
Follow this pattern from the codebase: {example}

Code transformation:

Refactor this code to {goal}. Keep the same behavior.
Do not change the public API (function signatures, exports).

Bug fixing:

This code has a bug: {description of bug}

Error: {error message}

Fix the bug. Explain what caused it in a comment.

Anti-Patterns

  • Too vague: "Make this better" → Be specific about what "better" means
  • Too long: Giant prompts with everything → Split into focused prompts
  • Contradictory: "Be concise but thorough" → Pick one or define the tradeoff
  • No examples: Complex formatting without showing what you want → Add 1-2 examples
  • Prompt injection risk: Including raw user input without delimiting → Use clear delimiters like <user_input>...</user_input>

Tips

  • Temperature 0 for deterministic tasks (code, classification), 0.7+ for creative tasks
  • Test prompts with edge cases, not just the happy path
  • Version control your prompts — they're as important as code
  • Use structured output (JSON) when parsing the response programmatically
  • Shorter prompts often outperform longer ones if they're precise enough

© spencerpauly, CC0-1.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in resources/prompt-engineering of spencerpauly/awesome-cursor-skills.

Open the folder on GitHubat commit 99cd265

Compare with similar skills

Prompt Engineering next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Prompt Engineering compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Prompt Engineering this skillspencerpauly/awesome-cursor-skills843—~915Automated safety check: PassCC0-1.0
Prompt Improverseverity1/claude-code-prompt-improver1.9k1 repos~1.7kAutomated safety check: PassMIT
Prompt Engineering Patternsynulihao/AgentSkillOS61714 repos~1.7kAutomated safety check: PassNone
Patch CreationPiebald-AI/tweakcc2.5k—~1.6kAutomated safety check: PassMIT
Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit2603 repos~1.4kAutomated safety check: PassCustom licence
Codex Fable5baskduf/FableCodex437—~1.6kAutomated safety check: PassAGPL-3.0

Similar skills

  • Prompt Improver

    severity1/claude-code-prompt-improver

    This skill enriches vague prompts with targeted research and clarification before execution.

    1.9k GitHub starsUsed in 1 repo~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Prompt Engineering Patterns

    ynulihao/AgentSkillOS

    Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.

    617 GitHub starsUsed in 14 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Patch Creation

    Piebald-AI/tweakcc

    Create and register new patches for tweakcc. An agent skill from Piebald-AI/tweakcc.

    2.5k GitHub stars~1.6k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Senior Prompt Engineer

    maslennikov-ig/claude-code-orchestrator-kit

    Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.

    260 GitHub starsUsed in 3 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Codex Fable5

    baskduf/FableCodex

    Apply a Claude Fable 5 inspired operating style inside Codex.

    437 GitHub stars~1.6k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.

    40k GitHub stars~1.3k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed

More from spencerpauly/awesome-cursor-skills

All 60 skills in this repo
  • Generating Images

    spencerpauly/awesome-cursor-skills

    Generate or edit images using the OpenAI Image API (gpt-image-2).

    843 GitHub stars~3.7k tokensUpdated 2 mo ago
    Auto-check: notes
  • Babysitting PR

    spencerpauly/awesome-cursor-skills

    Monitor a pull request for CI failures, review comments, and merge conflicts — then fix them automatically.

    843 GitHub stars~930 tokensUpdated 2 mo ago
    Auto-check passed
  • Best Of N Solving

    spencerpauly/awesome-cursor-skills

    Solve a hard problem by trying multiple approaches in parallel using isolated git worktrees.

    843 GitHub stars~698 tokensUpdated 2 mo ago
    Auto-check passed
  • Grinding Until Pass

    spencerpauly/awesome-cursor-skills

    Keep iterating on code changes until the tests pass, the build succeeds, or linting is clean.

    843 GitHub stars~796 tokensUpdated 2 mo ago
    Auto-check passed
  • Parallel CI Triage

    spencerpauly/awesome-cursor-skills

    When GitHub Actions fails, fetch failing job logs and assign each failing job to a separate subagent that fixes its slice of the problem in parallel.

    843 GitHub stars~793 tokensUpdated 2 mo ago
    Auto-check passed
  • Parallel Exploring

    spencerpauly/awesome-cursor-skills

    Explore a large codebase in parallel by launching multiple explore subagents that each investigate a different area simultaneously.

    843 GitHub stars~787 tokensUpdated 2 mo ago
    Auto-check: notes

Questions about Prompt Engineering

What does Prompt Engineering do?

Write effective prompts for LLMs — structure, few-shot examples, chain-of-thought, system prompts, and output parsing. Prompt Engineering is an agent skill from spencerpauly/awesome-cursor-skills. Write effective prompts for LLMs — structure, few-shot examples, chain-of-thought, system prompts, and output parsing.

When should I use Prompt Engineering?

Prompt Engineering fits situations like: tasks that involve Prompt engineering.

How do I install Prompt Engineering in Claude Code?

Run `npx skills add spencerpauly/awesome-cursor-skills --skill prompt-engineering -a claude-code`. Or copy the skill folder (resources/prompt-engineering in spencerpauly/awesome-cursor-skills) into .claude/skills/prompt-engineering in your project. Claude Code loads it when a task matches its description.

How do I install Prompt Engineering in Codex?

Run `npx skills add spencerpauly/awesome-cursor-skills --skill prompt-engineering -a codex`. Or copy the skill folder (resources/prompt-engineering in spencerpauly/awesome-cursor-skills) into .agents/skills/prompt-engineering in your project. Codex loads it when a task matches its description.

Can I use Prompt Engineering in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add spencerpauly/awesome-cursor-skills --skill prompt-engineering -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/prompt-engineering, .gemini/skills/prompt-engineering, .github/skills/prompt-engineering and .opencode/skills/prompt-engineering in your project.

What does Prompt Engineering need to run?

SKILL.md names no scripts, command-line tools or credentials: Prompt Engineering is instructions for the agent only.

Does Prompt Engineering access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Prompt Engineering safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Prompt Engineering use?

Prompt Engineering is published under the CC0-1.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Prompt Engineering use?

About 915 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Prompt Engineering?

Skills that share tags, products or a category with Prompt Engineering: Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars), Prompt Engineering Patterns (ynulihao/AgentSkillOS, 617 stars), Patch Creation (Piebald-AI/tweakcc, 2.5k stars) and Senior Prompt Engineer (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Prompt Engineering?

spencerpauly (a GitHub user) maintains it in spencerpauly/awesome-cursor-skills, which has 843 GitHub stars. The repository holds 60 skills in this directory. The repository was last updated on August 2, 2026.

Source: spencerpauly/awesome-cursor-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.