gitmyhub

directional-prompting

★ 111 updated 29d ago

Outcome-first plus directional language. A two-layer skill for writing prompts, agent directives, and skill descriptions. Works in Claude Code and Codex CLI.

Directional Prompting is a skill for AI coding assistants (specifically Claude Code and OpenAI Codex CLI) that helps you write better instructions for AI agents. The core idea is that prompts work better when they combine two things: a clear statement of the goal upfront, and instructions that describe what to do rather than what not to do.

The skill breaks this into two layers. The first layer is the outcome: every prompt should open by naming the destination, what done looks like, when to stop, and what the hard limits are. The second layer is direction: every sentence inside that frame uses a positive verb describing the correct action. Instead of "don't be vague," write "ask before interpreting intent and quote the line." Instead of listing what to avoid, describe what to do.

The README explains why this structure matters for agents in particular. An AI assistant reads its system prompt on every turn of a conversation, so a negation that introduces the wrong concept gets re-introduced dozens of times per session. A vague goal lets the agent's idea of "done" shift over time. Starting with a clear outcome and filling the body with forward-pointing instructions keeps the agent aimed at the same target on every step.

When triggered on prompt-writing tasks, the skill performs a four-step pass: checking whether the outcome block is present, counting negations in the body and rewriting each as its positive equivalent, checking whether absolute words like ALWAYS and MUST are genuinely required or just decorative, and reading the final result to confirm every sentence points toward the goal.

Installation works by dropping the skill directory into the skills folder that Claude Code or Codex reads from. The repository also includes symlink instructions so the same files serve both agents from a single location on disk, and updates flow to both automatically when the repository is pulled. The skill triggers automatically when the agent detects prompt-writing language, or it can be invoked explicitly.