agentleFS
sefaertuncsefaertunc/Worclaude/.claude/skills/prompt-engineering/SKILL.md

prompt-engineering

Skill4 starsChanged 7 months agoMITView on GitHub

Effective prompting patterns for working with Claude, demanding quality, writing specs

63 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use nextjs-app-router, llm-evaluation and 9 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.
  • desilokesh1Skill

    nextjs-app-router

    Next.js App Router best practices, Server Components, Server Actions, routing patterns, and data fetching strategies. Use when building Next.js applications with the App Router.

    Also in 3 projects that use this

  • stefan-jansenSkill

    llm-evaluation

    LLM evaluation and testing patterns including prompt testing, hallucination detection, benchmark creation, and quality metrics. Use when testing LLM applications, validating prompt quality, implementing systematic evaluation, or measuring LLM performance.

    Also in 3 projects that use this

  • rohitg00Skill

    data-engineering

    Data engineering patterns for ETL pipelines, data warehousing, Apache Spark, and data quality validation

    Also in 3 projects that use this

  • qodex-aiSkill

    multi-agent-orchestration

    Design and coordinate multi-agent systems where specialized agents work together to solve complex problems. Covers agent communication, task delegation, workflow orchestration, and result aggregation. Use when building coordinated agent teams, complex workflows, or systems requiring specialized expertise across domains.

    Also in 3 projects that use this

  • mrgoonieSkill

    context-engineering

    Master context engineering for AI agent systems. Use when designing agent architectures, debugging context failures, optimizing token usage, implementing memory systems, building multi-agent coordination, evaluating agent performance, or developing LLM-powered pipelines. Covers context fundamentals, degradation patterns, optimization techniques (compaction, masking, caching), compression strategies, memory architectures, multi-agent patterns, LLM-as-Judge evaluation, tool design, and project development.

    Also in 7 projects that use this

  • CloudAI-XSkill

    database-design

    Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 56 edited versions we read keep these.

  • 6

    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:

    When Claude produces a working but mediocre solution, push back:

    line 24
  2. Distinctive:

    Don't accept the first output as final.

    line 31
  3. Distinctive:

    Test case generation (give the categories, let Claude enumerate)

    line 44
  4. Distinctive:

    Every feature described with concrete examples

    line 52
  5. Distinctive:

    If Claude keeps making the same mistake, the problem is probably in your instructions, not in Claude.

    line 94
  6. Distinctive:

    When Claude says "I'll do X" but you wanted Y, correct immediately.

    line 98

“Common” is measured: kept by at least 6 in 10 of the 56 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 Engineering

Challenge Claude to Do Better

Claude will give you a reasonable answer. You often want an excellent one. The difference is in how you ask.

Weak: "Write a function to parse dates." Strong: "Write a date parser that handles ISO 8601, RFC 2822, and common US/EU formats. It should return a consistent internal representation and throw specific error types for invalid input. Make it elegant — no regex spaghetti."

The strong version sets quality expectations, specifies edge cases, and demands craft. Claude responds to these signals.

Demand Elegance

When Claude produces a working but mediocre solution, push back:

  • "This works but it's not elegant. Simplify it."
  • "There's duplication between these three functions. Refactor."
  • "This is too clever. Make it readable."
  • "A junior engineer should understand this. Rewrite for clarity."

Don't accept the first output as final. Iterate.

When to Be Specific vs When to Delegate

Be specific about:

  • Requirements (what the code MUST do)
  • Constraints (performance, compatibility, patterns to follow)
  • Verification criteria (how to know it works)

Delegate to Claude:

  • Implementation approach (unless you have a strong preference)
  • Variable naming and code organization details
  • Which standard library functions to use
  • Test case generation (give the categories, let Claude enumerate)

Writing Detailed Specs

A good spec eliminates ambiguity. The SPEC.md pattern works because it forces specificity before implementation begins.

Spec checklist:

  • Every feature described with concrete examples
  • Input/output pairs for non-obvious behavior
  • Error cases listed explicitly
  • "Out of scope" section to prevent feature creep
  • Success criteria that can be mechanically verified

The IMPLEMENTATION-PROMPT as a Prompt

The implementation prompt IS your prompt to Claude for a work session. Write it like you're briefing a skilled contractor:

  1. Here's what exists (context)
  2. Here's what we need (goal)
  3. Here's how to do it (plan)
  4. Here's how to check your work (verification)
  5. Here's what NOT to do (constraints)

Prompting Anti-Patterns

  • Vague asks: "Make the code better" — better HOW?
  • Kitchen sink: asking for 10 things at once with no priority order
  • Assuming context: referencing decisions made 500 messages ago without restating them
  • Over-constraining: specifying the exact implementation when only the interface matters
  • Under-specifying errors: "handle errors appropriately" — define what appropriate means

Working with Models at Different Levels

Opus: Use for judgment calls, architectural decisions, plan review. Give it the full picture and ask for analysis.

Sonnet: Use for implementation, testing, code review. Give it specific tasks with clear scope.

Haiku: Use for validation, formatting checks, simple queries. Give it narrow tasks with yes/no or pass/fail outcomes.

Match the task complexity to the model capability.

Gotchas

  • Claude remembers everything in the conversation. You don't need to repeat instructions that are already in context. But after /compact, re-state critical constraints.
  • If Claude keeps making the same mistake, the problem is probably in your instructions, not in Claude. Rephrase, add an example, or add a rule to CLAUDE.md.
  • Long prompts aren't always better. A focused 3-line instruction often outperforms a rambling paragraph. Be concise about what matters.
  • When Claude says "I'll do X" but you wanted Y, correct immediately. Don't let wrong assumptions propagate through a chain of actions.

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.