Get the FREE Ultimate OpenClaw Setup Guide →

Prompt Engineering Principles

Scanned
npx machina-cli add skill bofrese/bob/prompt-engineering --openclaw
Files (1)
SKILL.md
2.5 KB

Prompt Engineering Principles

Compact reference for writing effective Claude commands. Apply when creating or reviewing commands.


Core Principles

Be explicit — "Write 5 bullets, each under 15 words" beats "be concise." Specify exact success criteria.

Structure clearly — Separate Context, Role, Process, Output. Don't mix in prose.

Minimize tokens — Every token costs money and latency. High-signal only. Cut filler, redundancy, verbose examples.

Load just-in-time — Don't dump context upfront. Load principles/guidelines when they apply.

Allow uncertainty — Give permission to say "I don't know" to reduce hallucinations.

One question at a time — Multi-part questions fragment attention.

Perfect examples — Claude 4.x pays close attention to details. Sloppy examples teach sloppy behavior.

Standalone outputs — Documents must be readable without conversation context. But standalone ≠ verbose. Include essentials only.

Avoid over-constraining — "You are a helpful architect" beats "You are a world-renowned expert who never makes mistakes."

No aggressive language — Claude 4.x is instruction-compliant. "CRITICAL: YOU MUST" causes over-triggering. Use normal language.


Anti-Patterns

Unstructured instructions — Mixing context, constraints, and format in prose.

Aggressive triggers — "CRITICAL!" "MUST!" "NEVER!" cause over-triggering.

Vague constraints — "Be concise" vs "3-5 sentences, under 100 words."

Poor examples — Incomplete, inconsistent, or unrealistic.

Context dumping — Loading everything upfront instead of just-in-time.

Multi-question barrages — Asking 5 things at once instead of one at a time.

Verbose outputs — Generated files become future context. Keep them scannable and token-efficient.


Command Structure Pattern

## Context
{Date, project state, protocol loads}

## Role
{Who Claude is — architect, reviewer, coach}

## Process
{Step-by-step, numbered phases}

## Output
{Path, format, template}

Output Template Philosophy

Include:

  • Date and identifier
  • Status/verdict
  • Issues/decisions (bulleted, brief)
  • Next actions (if applicable)

Exclude:

  • Prose methodology explanations
  • Percentage calculations
  • Verbose rationales
  • Repeated context
  • Introductions/acknowledgments

Source

git clone https://github.com/bofrese/bob/blob/master/skills/prompt-engineering/SKILL.mdView on GitHub

Overview

Prompt Engineering Principles provide a compact guide for writing effective Claude commands. It emphasizes explicit criteria, clear structure, and token efficiency when creating or reviewing bob commands.

How This Skill Works

Apply core principles: define explicit success criteria, structure prompts into Context, Role, Process, and Output, and minimize tokens. Load guidelines just-in-time, allow for uncertainty, and enforce standalone outputs. Avoid aggressive language and multi-question barrages to keep prompts precise and scannable.

When to Use It

  • Design a new bob command with explicit success criteria.
  • Review an existing command for token efficiency and clarity.
  • Refactor a multi-part prompt into Context, Role, Process, Output.
  • Prepare commands for Claude 4.x with crisp examples.
  • Audit prompts to ensure one question at a time.

Quick Start

  1. Step 1: Write explicit success criteria and a token budget.
  2. Step 2: Structure the prompt into Context, Role, Process, Output.
  3. Step 3: Validate the output is standalone and free of unnecessary context.

Best Practices

  • Be explicit with success criteria (e.g., '5 bullets, under 15 words each').
  • Structure prompts as Context, Role, Process, Output.
  • Minimize tokens by cutting filler and redundant examples.
  • Load guidelines just-in-time rather than upfront context.
  • Ensure standalone outputs are readable without conversation history; avoid aggressive language.

Example Use Cases

  • Example 1: Context: project X date; Role: Architect; Process: draft 3-step plan; Output: structured YAML.
  • Example 2: Convert a vague prompt into a fixed pattern: Context, Role, Process, Output.
  • Example 3: Refactor a multi-question prompt into single-question steps.
  • Example 4: Use a token budget and explicit word limits for each bullet.
  • Example 5: Deliver a standalone instruction doc that requires no prior chat.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers