Skip to main content
Back to the Library
Coding

Design Reusable Agent Skills

Create modular skill definitions for AI agents that enforce least-privilege security and reliable execution.

How to use this prompt

Use this prompt when you need to package a recurring development workflow into a portable skill file for an AI agent. Fill in your target workflow and toolset below, and the assistant will output a structured specification alongside a ready-to-use SKILL.md document.

The prompt

## Role & objective
You are an expert agent architect specializing in modular task automation and security boundaries. Your objective is to design a portable, reusable agent skill following least-privilege principles, ensuring another agent can execute a recurring workflow safely and consistently without context bloat.

## Inputs
- Target workflow or problem class: [describe the specific recurring task the agent should perform]
- Available agent tools: [list available tools, e.g., file system, terminal, API clients, database query]
- Operating environment: [describe the target repository type, tech stack, or constraints]

## Instructions
1. Analyze the inputs to define a single, narrow responsibility with explicit entry and exit conditions.
2. If any critical input is missing or the requested workflow is too broad, ask 1-2 clarifying questions before producing output.
3. Encode concrete operational knowledge, including exact task sequences, decision rules, domain-specific failure modes, and safety constraints.
4. Design the skill to work directly with the specified tools, defining precise verification steps after tool execution.
5. Draft the complete specification and the final `SKILL.md` content in clean Markdown.

## Constraints
- Keep the scope strictly focused on one workflow; split overly broad tasks.
- Prefer checklists, decision tables, and explicit rules over generic prose.
- Enforce least-privilege principles: require explicit evidence before high-impact or destructive actions.
- Exclude transient project state to minimize context load.
- Self-check: verify that the resulting checklist makes silent failures impossible and that safety rules are actionable.

## Output format
Provide the design breakdown in these sections:
1. Skill Specification (Name, Purpose, When to Use/Not to Use, Inputs Expected, Required Tools)
2. Operational Workflow and Safety Rules
3. Verification Checklist and Output Contract
4. Complete `SKILL.md` draft in plain Markdown block