agentleFS
roronoazoroshao369roronoazoroshao369/vibe-coding-os/skills/core/prompt-architecture/SKILL.md

prompt-architecture

Skill1 starsChanged 5 months agoMITView on GitHub

Provide a structural recipe for authoring multi-section prompts (Persona, Context, Constraints, Toolset, Output Schema, Examples, Anti-patterns) that compose cleanly across our prompts/, agents/, and skills/core/ layers. The recipe is load-bearing: the Anti-patterns section is the single biggest predictor of prompt quality because it blocks the most common failure modes before the model generates. Use when authoring a new prompt, refactoring a sprawling prompt that drifts in quality, or migrating a hard-coded prompt into the prompts/ skill layer. Choose this skill…

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    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:

    Write the Persona section in one or two sentences: who is the model in this prompt, and what is its scope.

    line 32
  2. Distinctive:

    Write the Context section: the inputs the model has, the inputs it does not have, and the assumptions it should make.

    line 33
  3. Distinctive:

    Write the Constraints section: hard limits (token budget, time, scope), soft preferences (style, verbosity), and non-goals (what the prompt …

    line 34
  4. Very specific:

    Write the Toolset section: which tools the model may call, in what order, and with what guard rails (e.g., npm run validate:all before …

    line 35
  5. Distinctive:

    Write the Output Schema section: the exact shape the caller expects.

    line 36
  6. Distinctive:

    Write the Examples section: at least one positive example (desired output) and one negative example (a common wrong output to avoid).

    line 37
  7. Distinctive:

    Write the Anti-patterns section: at least 3 concrete failure modes the prompt is known to fall into, with the corrective action for each.

    line 38
  8. Very specific:

    Verify the prompt under the verification-before-done 5-axis framework: DOM (output structure), Console (errors/warnings), Network (tool …

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Skill: Prompt Architecture

Purpose

Provide a structural recipe for authoring multi-section prompts (Persona, Context, Constraints, Toolset, Output Schema, Examples, Anti-patterns) that compose cleanly across our prompts/, agents/, and skills/core/ layers. The recipe is load-bearing: the Anti-patterns section is the single biggest predictor of prompt quality because it blocks the most common failure modes before the model generates.

When to use

Use when authoring a new prompt, refactoring a sprawling prompt that drifts in quality, or migrating a hard-coded prompt into the prompts/ skill layer. Choose this skill when you need a documented structure with concrete section contracts — not a freeform "be a good prompt engineer" hand-wave.

Inputs

  • The prompt's purpose (one sentence, verb-first).
  • The model profile (lean = short, standard = balanced, heavy = structured).
  • The agent or skill that will invoke the prompt.
  • The output schema the caller expects (markdown, JSON, YAML, plain text).
  • Known failure modes to block in the Anti-patterns section.

Workflow

  1. Write the Persona section in one or two sentences: who is the model in this prompt, and what is its scope. Avoid role-playing a real person.
  2. Write the Context section: the inputs the model has, the inputs it does not have, and the assumptions it should make. List them — do not bury them in prose.
  3. Write the Constraints section: hard limits (token budget, time, scope), soft preferences (style, verbosity), and non-goals (what the prompt explicitly does not try to do).
  4. Write the Toolset section: which tools the model may call, in what order, and with what guard rails (e.g., npm run validate:all before declaring done).
  5. Write the Output Schema section: the exact shape the caller expects. Use a fenced block with a worked example.
  6. Write the Examples section: at least one positive example (desired output) and one negative example (a common wrong output to avoid).
  7. Write the Anti-patterns section: at least 3 concrete failure modes the prompt is known to fall into, with the corrective action for each. This section is load-bearing.
  8. Verify the prompt under the verification-before-done 5-axis framework: DOM (output structure), Console (errors/warnings), Network (tool calls), Performance (latency), Visual (rendered output).

Outputs

  • A prompt artifact with the 7 sections in order: Persona, Context, Constraints, Toolset, Output Schema, Examples, Anti-patterns.
  • A short rationale comment at the top documenting why each section was included.
  • A passing run under verification-before-done with all 5 axes captured.

Failure modes

  • Skipping the Anti-patterns section (the model falls into known failure modes with no corrective action).
  • Writing Constraints as prose instead of bullet points (the model ignores soft prose).
  • Writing Output Schema without a worked example (the model invents a slightly different shape).
  • Persona written as "You are a helpful assistant" (no scope, no differentiation).
  • Mixing multiple personas in one prompt (the model averages them and produces mush).

Verification checklist

  • All 7 sections present and in order.
  • Persona states scope in one sentence, not a role-play.
  • Context lists inputs and assumptions as bullets, not prose.
  • Constraints distinguish hard limits from soft preferences.
  • Toolset lists tool names, order, and guard rails.
  • Output Schema includes a worked example.
  • Examples section has ≥ 1 positive and ≥ 1 negative example.
  • Anti-patterns section has ≥ 3 concrete failure modes with corrective actions.
  • Prompt verified under verification-before-done 5-axis framework.

Related skills

  • skills/meta/write-reusable-skill/SKILL.md — author skill files (the sister skill to this one for prompts)
  • skills/core/clarify-before-code/SKILL.md — restate goal + assumptions before authoring
  • skills/core/grill-user-before-building/SKILL.md — interview loop until 95% confidence

Attribution

Inspired by RohitG00/awesome-claude-code-toolkit (Apache-2.0). Adapted in original wording with Vibe Coding OS-specific 5-axis verification.

See also

  • templates/prompt-template-7-section.md — drop-in 7-section prompt template.
  • commands/vibe-prompt-architect.md — companion command that drives the 7-section authoring workflow interactively.

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.