agentleFS
bhaumikmaanbhaumikmaan/claude-code-master-skills/skills/prompt-engineering/SKILL.md

prompt-engineering

Skill3 starsChanged 7 months agoMITView on GitHub

Create reusable skills and agent configurations through structured interview and template generation. Covers SKILL.md authoring, agent persona design, and structured output contracts. Use when creating a new skill, designing an agent, capturing a repeatable process, or when asked to "skillify" a workflow.

85 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-checklist, multi-agent-orchestration 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.
  • atuljha23Skill

    security-checklist

    OWASP-style quick reference — authn/authz, injection, secrets, sessions, crypto, dependencies. Use during code review and before committing security-sensitive changes.

    Also in 3 projects that use this

  • javalenciacaiSkill

    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 4 projects that use this

  • xfstudioSkill

    llm-evaluation

    Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.

    Also in 3 projects that use this

  • GoogleSkill

    coding-principles

    Enforces engineering, architecture, public API, and code quality standards distilled from human reviewer feedback across A2UI pull requests. Use when authoring new code, refactoring, addressing review feedback, or reviewing PR diffs. Don't use for release publishing or spec blueprint generation without code or PR changes.

    Also in 3 projects that use this

  • pproencaSkill

    refactoring

    Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.

    Also in 6 projects that use this

  • mjunaidcaSkill

    tool-design

    Design tools that agents can use effectively. Use when creating new tools for agents, debugging tool-related failures, or optimizing existing tool sets.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 12 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 75 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before asking questions, analyze what you already know:

    line 16
  2. Distinctive:

    Use structured questions. Don't over-ask for simple processes.

    line 26
  3. Distinctive:

    Ask: inline (current conversation) or forked (sub-agent with own context)?

    line 35
  4. Distinctive:

    Ask where to save:

    line 38
  5. Distinctive:

    Should the user confirm before proceeding?

    line 46
  6. Distinctive:

    Ask for gotchas or edge cases.

    line 52
  7. Distinctive:

    Human checkpoint: When to pause and ask before proceeding (irreversible actions, error judgment)

    line 93
  8. Distinctive:

    Keep simple skills simple — a 2-step skill doesn't need annotations on every step

    line 100
  9. Distinctive:

    When designing a standalone agent (not a skill):

    line 118
  10. Distinctive:

    Create an identity with domain knowledge relevant to the task.

    line 124
  11. Distinctive:

    Avoid generic terms like "helper" or "assistant"

    line 140
  12. Distinctive:

    When a skill or agent needs structured output, define the contract explicitly:

    line 153
  13. Very specific:

    XML tags: Use <analysis>, <summary>, <result> for machine-parseable sections

    line 157
  14. Very specific:

    If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above.

    line 171

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

CRITICAL: Check existing project conventions before inventing new ones. Read CLAUDE.md, .claude/rules/, and existing skills to align with what's already established.

Skill Creation Workflow

Step 1: Analyze the Session/Request

Before asking questions, analyze what you already know:

  • What repeatable process was performed or requested
  • What the inputs/parameters are
  • The distinct steps in order
  • Success criteria for each step
  • Where the user steered or corrected during the session
  • What tools and permissions are needed

Step 2: Interview (4 Rounds)

Use structured questions. Don't over-ask for simple processes.

Round 1 — High-Level Confirmation

  • Suggest a name and description. Ask to confirm or rename.
  • Suggest goal(s) and specific success criteria.

Round 2 — Details

  • Present the steps as a numbered list.
  • Suggest arguments based on observed inputs.
  • Ask: inline (current conversation) or forked (sub-agent with own context)?
    • Fork for self-contained tasks without mid-process user input
    • Inline when the user wants to steer mid-process
  • Ask where to save:
    • This repo (.claude/skills/<name>/SKILL.md) — project-specific workflows
    • Personal (~/.claude/skills/<name>/SKILL.md) — follows you across repos

Round 3 — Per-Step Breakdown For each major step, if not obvious:

  • What does this step produce that later steps need?
  • What proves this step succeeded?
  • Should the user confirm before proceeding? (especially irreversible actions)
  • Are any steps independent and could run in parallel?
  • What are the hard constraints?

Round 4 — Final

  • Confirm when the skill should be invoked. Suggest trigger phrases.
  • Ask for gotchas or edge cases.

Step 3: Write the SKILL.md

Use this template:

---
name: {{skill-name}}
description: {{one-line description}}
allowed-tools:
  {{list of tool permission patterns}}
when_to_use: {{detailed invocation triggers with example phrases}}
argument-hint: "{{hint showing argument placeholders}}"
arguments:
  {{list of argument names}}
context: {{inline or fork — omit for inline}}
---

# {{Skill Title}}
Description of skill

## Inputs
- `$arg_name`: Description of this input

## Goal
Clearly stated goal with defined artifacts or completion criteria.

## Steps

### 1. Step Name
What to do. Be specific and actionable. Include commands when appropriate.

**Success criteria**: What proves this step is done.

Per-Step Annotations

  • Success criteria (REQUIRED on every step): What proves the step is done
  • Execution: Direct (default), Task agent (subagent), or [human] (user does it)
  • Artifacts: Data this step produces that later steps need
  • Human checkpoint: When to pause and ask before proceeding (irreversible actions, error judgment)
  • Security constraints: For steps handling user input, external APIs, or data storage, include explicit requirements (input sanitization, output encoding, auth checks). Reference security-review patterns for checklists.
  • Rules: Hard constraints. User corrections from the reference session are especially useful here.

Step Structure Tips

  • Steps that can run concurrently use sub-numbers: 3a, 3b
  • Steps requiring the user to act get [human] in the title
  • Keep simple skills simple — a 2-step skill doesn't need annotations on every step

Frontmatter Rules

  • allowed-tools: Minimum permissions needed — least privilege. Use patterns like Bash(gh:*), not blanket Bash. Grant only what the skill actually requires.
  • context: Only set context: fork for self-contained skills
  • when_to_use: CRITICAL — this tells the model when to auto-invoke. Start with "Use when..." and include trigger phrases
  • user-invocable: true for skills the user triggers explicitly
  • disable-model-invocation: true for sensitive skills that shouldn't auto-trigger

Step 4: Review and Save

Show the complete SKILL.md to the user for review before writing. After saving, tell them:

  • Where the skill was saved
  • How to invoke it: /{{skill-name}} [arguments]
  • That they can edit the SKILL.md directly to refine it

Agent Creation Workflow

When designing a standalone agent (not a skill):

1. Extract Core Intent

Identify the fundamental purpose, responsibilities, and success criteria. Check CLAUDE.md for project-specific context the agent should align with.

2. Design Expert Persona

Create an identity with domain knowledge relevant to the task. Written in second person ("You are...", "You will...").

3. Architect Instructions

The system prompt should:

  • Establish clear behavioral boundaries
  • Provide specific methodologies for task execution
  • Anticipate edge cases
  • Include concrete examples
  • Define output format expectations
  • Build in self-verification steps

4. Create Identifier

  • Lowercase letters, numbers, and hyphens only
  • 2-4 words joined by hyphens
  • Clearly indicates the agent's function
  • Memorable and easy to type
  • Avoid generic terms like "helper" or "assistant"

Agent Output Format

{
  "identifier": "descriptive-agent-name",
  "whenToUse": "Use this agent when... (include example triggers)",
  "systemPrompt": "Complete operational manual for the agent"
}

Structured Output Contracts

When a skill or agent needs structured output, define the contract explicitly:

  • JSON: Include the exact schema with field descriptions and required fields
  • Markdown: Define section headers and what goes in each
  • XML tags: Use <analysis>, <summary>, <result> for machine-parseable sections

Forced structured output (guaranteed schema with tool_choice or JSON mode) eliminates format drift at zero ongoing prompt cost.

CRITICAL REMINDER: Check existing conventions first. Interview before authoring. Every skill needs when_to_use and per-step success criteria. Show the result for review before saving.

Related Skills

  • Skills created here often invoke codebase-exploration and code-verification as sub-workflows.
  • task-orchestration patterns inform how multi-step skills coordinate work.
  • safe-autonomous-mode risk classification informs allowed-tools scoping.

Project Customization

If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above. Common customizations:

  • Team conventions for skill naming and placement
  • Required frontmatter fields for the project
  • Default allowed-tools patterns
  • Standard step annotations required by the team

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.