Skip to content
Back to skills

Writing System Prompts

ASecurity

Writes and reviews system prompts for AI tools, agents, chatbots, and LLM products using a fixed section order and a quality checklist. Use when drafting a system prompt or auditing one for missing stop criteria, tool rules, constraints, or examples. Not for compressing an existing prompt; use improving-prompts.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 21, 2026
ai-agentsgosecurity

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned October 21, 2026

npx -y skills add bostonaholic/skills --skill writing-system-prompts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Writing System Prompts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Writing System Prompts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bostonaholic-writing-system-prompts/badge)](https://www.skillsdirectory.com/skills/bostonaholic-writing-system-prompts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: writing-system-prompts
description: Writes and reviews system prompts for AI tools, agents, chatbots, and LLM products using a fixed section order and a quality checklist. Use when drafting a system prompt or auditing one for missing stop criteria, tool rules, constraints, or examples. Not for compressing an existing prompt; use improving-prompts.
---

# System Prompt Engineering

**Structure beats cleverness. Concrete examples beat abstract instructions.**

A system prompt is a contract with the model. Every line must change its
behavior in a way someone could test; cut the rest, including anything the
model or its harness already does by default.

## Section order

Follow this order and skip sections that don't apply. Read
[section guidance](references/section-guidance.md) for each section's rules
and good and bad examples.

```text
1. Identity and role
2. Mission and stop criteria
3. Communication style
4. Core workflow
5. Tool usage rules
6. Domain-specific rules
7. Safety and constraints
8. Edge cases and error handling
9. Examples
10. Runtime context (injected at run time)
```

## What a good prompt has

- A specific role, not "AI assistant".
- Explicit completion criteria: when to stop, and when to ask instead.
- Response length capped with a number ("fewer than 4 lines"), never an
  adjective ("be concise").
- A retry limit with an escalation path for agents.
- Constraints on security-critical and destructive actions, each with its
  reason, stated once.
- 3-10 concrete examples showing length and tone, tool-call decisions, and edge
  cases, with at least one bad-to-good pair. Examples are the highest-return
  part of the prompt.
- A runtime context section for values that change per session.

## Write

Infer what the conversation and supplied files already answer. Ask only the
rest, in one message, and wait: what the AI does, who its user is, which tools
it has, what "done" looks like, what must never happen, and the expected output
format. Deliver the prompt in a fenced block, followed by one line per
assumption you made.

## Review

Map the prompt to the section order, noting missing and misplaced sections.
Flag each [review anti-pattern](references/review-anti-patterns.md) present.
Then revise. Unless the user asked for another format, report:

````markdown
## Findings

| Section | Issue | Fix |
| ------- | ----- | --- |

## Revised prompt

```text
<the full revised prompt>
```
````

Files in this skill

  • SKILL.md2.4 KB
  • agents/openai.yaml212 B
  • references/review-anti-patterns.md1.7 KB
  • references/section-guidance.md4.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.