agentleFS
LucfaceLucface/claude-skills/skills/prompt-engineer/SKILL.md

prompt-engineer

Skill1 starsChanged 5 months agoMITView on GitHub

Turn a rough natural-language ask into a high-quality, Anthropic-spec prompt. Use when the user wants to write, engineer, improve, tighten, or harden a prompt — "write me a prompt for X", "make this prompt better", "rewrite my prompt to spec", "engineer this prompt", "prompt for <task>", or /prompt. ALWAYS reads references/anthropic-prompt-engineering.md (the codified current Anthropic guidance) before writing, instead of relying on memory of prompt-engineering folklore (now partly stale — e.g. prefill is deprecated, budget_tokens → adaptive thinking).

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use secure-code-guardian, fullstack-guardian and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • JeffallanSkill

    secure-code-guardian

    Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities — including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring CORS/CSP headers, validating input with Zod, and setting up JWT tokens. Invoke for authentication, authorization, input validation, encryption, OWASP Top 10 prevention, secure session management, and security hardening. For pre-built OAuth/SSO integrations or standalone security audits, consider a more specialized skill.

    Also in 3 projects that use this

  • JeffallanSkill

    fullstack-guardian

    Builds security-focused full-stack web applications by implementing integrated frontend and backend components with layered security at every level. Covers the complete stack from database to UI, enforcing auth, input validation, output encoding, and parameterized queries across all layers. Use when implementing features across frontend and backend, building REST APIs with corresponding UI, connecting frontend components to backend endpoints, creating end-to-end data flows from database to UI, or implementing CRUD operations with UI forms. Distinct from frontend-only, backend-only, or API-only skills in that it simultaneously addresses all three perspectives—Frontend, Backend, and Security—within a single implementation workflow. Invoke for full-stack feature work, web app development, authenticated API routes with views, microservices, real-time features, monorepo architecture, or technology selection decisions.

    Also in 3 projects that use this

  • AutumnsGroveSkill

    api-designer

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for: (1) Creating API specifications, (2) Designing REST endpoints, (3) GraphQL schema design, (4) API authentication and authorization, (5) API versioning strategies, (6) Documentation generation

    Also in 5 projects that use this

  • +9 more from Jeffallan

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default sensibly and proceed if the user said "just go."

    line 22
  2. Distinctive:

    Add context/motivation ("because …") — Claude generalizes from the why.

    line 26
  3. Distinctive:

    Add the anti-overengineering / anti-hallucination / autonomy-safety snippets when the task warrants them (reference § snippet library).

    line 35

“Common” is measured: kept by at least 6 in 10 of the 40 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Engineer

Rewrite the user's raw intent into a prompt that follows Anthropic's current best practices — grounded in the codified reference, not from memory.

Why this exists

Claude "thinks it knows" how to write a prompt and skips the docs. The docs have also moved: prefill is deprecated, adaptive thinking + effort replaced budget_tokens, and newer models over-trigger on "CRITICAL: You MUST" language. So this skill makes referencing the doc non-optional.

Workflow — do this every time

  1. Read the reference FIRST. Open references/anthropic-prompt-engineering.md before writing anything. This is the entire point of the skill — do not skip it, do not work from memory.
  2. Capture intent. Get the raw ask plus the few things that change the prompt. If any are unclear, ask as a SHORT multiple-choice (not free-text):
    • Target model / harness? (Opus 4.8 API · Claude Code agent · Fable 5 · other)
    • One-shot prompt · system prompt · agentic/long-horizon?
    • Output format? (prose · JSON/structured · code · HTML · a document)
    • Does it use tools / run autonomously? Default sensibly and proceed if the user said "just go."
  3. Engineer it against the reference checklist:
    • Clarity & specificity; state the output + constraints; sequential steps as a numbered list.
    • Add context/motivation ("because …") — Claude generalizes from the why.
    • Examples: 3–5, relevant + diverse, in <example> / <examples> tags.
    • Structure with XML tags (<instructions>, <context>, <input>, <documents>).
    • Give a role (one system sentence).
    • Control output by saying what TO do (not "don't"); match prompt style to desired output.
    • Thinking: rely on adaptive thinking + effort; add a self-check line; avoid prescriptive CoT steps.
    • Tools: be explicit ("make these edits", not "could you suggest"); add the parallel-tools snippet if relevant.
    • Long context (20k+): longform data at the TOP, query at the bottom; ask it to quote first.
    • Don't over-prompt ("CRITICAL: You MUST" → "Use … when …"); don't add prefill; don't use budget_tokens.
    • Add the anti-overengineering / anti-hallucination / autonomy-safety snippets when the task warrants them (reference § snippet library).
  4. Deliver. Output the engineered prompt in ONE clean fenced block, then a 2–4 line "what I changed & why." Keep it copy-paste ready — no placeholders.
  5. Offer to run it (or run it if asked). For high-stakes prompts use generate → review-against-criteria → refine.

Prompt skeleton (assemble only the parts you need, roughly this order)

  1. Role (system) · 2. Task context / goal · 3. Tone & format rules · 4. Background data & documents (XML; at the TOP for long context) · 5. Detailed rules & steps · 6. Examples (<examples>) · 7. Conversation history · 8. The immediate task/question · 9. "Think / self-check" · 10. Output-format spec.

Keep the reference fresh

The Anthropic guidance evolves (prefill got deprecated; adaptive thinking arrived). When models change, re-sync references/anthropic-prompt-engineering.md from: https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/claude-prompting-best-practices

Not this skill

  • Auditing a prompt's factual claims against your codebase/strategy → prompt-grounding.
  • Generating a Ralph autonomous-loop prompt → ralph-prompt-generator.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.