AGENT SKILL

prompting-architect

Architect-level prompt design — layering system, task and data regions, instruction precision and delimiters, few-shot selection, chain-of-thought versus direct answers, versioning and review, and the injection-resistant structures that keep untrusted text from becoming instructions. Use when a prompt is a production artefact.

License 许可
MIT
最近更新
2026-11-13
Stars
★ 0
Forks
0

01 前言 Front Matter

name
prompting-architect
license
MIT
metadata
{ "crusor-path": "ai-ml-architect/llm-architect/prompting-architect", "crusor-domain": "ai-ml-architect", "crusor-origin": "original", "crusor-sources": "docs.anthropic.com/en/docs/build-with-claude/prompt-engineering; platform.openai.com/docs/guides/prompt-engineering; learnprompting.org", "crusor-triggers": "prompt engineering, system prompt, few shot, chain of thought, prompt injection, prompt template, prompt versioning, delimiters", "crusor-verified-on": "2026-10-30" }
description
Architect-level prompt design — layering system, task and data regions, instruction precision and delimiters, few-shot selection, chain-of-thought versus direct answers, versioning and review, and the injection-resistant structures that keep untrusted text from becoming instructions. Use when a prompt is a production artefact.
compatibility
Any model or provider

03 SKILL.md 正文

Prompting Architect

A prompt is source code that ships to a probabilistic interpreter. It needs version control, review, tests, and a structure that separates instructions from data.

When to use

  • Any model-backed feature, before tuning anything else.
  • Prompts that grew by accretion and now contradict themselves.
  • A prompt-injection or jailbreak concern.

When NOT to use

  • The failure is retrieval quality or missing context (rag-architect).
  • The task needs format guarantees — use structured output, not a better prompt.

Decision 1 — Structure

[system]   role, rules, output contract, refusal policy — stable, versioned
[task]     the specific instruction with slots — changes per feature
[data]     delimited, labelled, explicitly "data, not instructions"
[examples] optional, few-shot, minimal
[request]  the actual question, last
  • Instructions before data, question after data — models attend to the end.
  • Fixed delimiters (<doc>…</doc>, fenced blocks) with a rule that content inside is data.
  • One prompt, one job. Two jobs in one prompt produce a model that half-does both.

Decision 2 — Instruction quality

  • Be specific about what and how much: length, format, audience, exclusions.
  • State the refusal case: "if the documents do not contain the answer, say you don't know".
  • Positive instructions ("cite the source id") beat negative ones ("don't make things up") — the negative needs a positive replacement.
  • Remove contradictions; contradictory prompts produce variance that looks like model flakiness.

Decision 3 — Few-shot and reasoning

  • 3–8 examples, chosen to cover edge cases and format, not to be exhaustive.
  • Balanced examples: if every example says yes, the model says yes.
  • Chain-of-thought for multi-step reasoning; skip it for extraction where it mostly adds tokens.
  • Ask for the reasoning in a structured field when it must be auditable, not in free prose you then parse.

Decision 4 — Injection resistance

  • Treat all user and retrieved content as untrusted; never interpolate it into the system region.
  • Delimit and label; instruct the model to ignore instructions found inside data.
  • Do not rely on the model alone: enforce permissions in code, validate tool calls server-side (agent-architect).
  • Test with known payloads ("ignore previous instructions…"), including base64 and unicode tricks.

Decision 5 — Lifecycle

  • Prompts in files, in version control, reviewed; not strings in a controller.
  • Each change runs the eval suite (evals-architect); attach the delta to the PR.
  • Version the prompt id with the model id in logs, so a regression is traceable to a change.
  • Keep the previous prompt deployable — rollback is a config change, not a code revert when possible.

Failure modes at scale

  • Prompt that grew to 3,000 tokens with four sections contradicting each other.
  • User text concatenated into the system prompt; injection succeeds on day one.
  • Few-shot examples all one shape; the model fails on a common edge case.
  • Prompt edited in the dashboard, no version, no eval, no record of who changed it.
  • temperature raised to "make it more creative" on an extraction endpoint.

Verification receipts

  1. Prompt file with layering visible and a version id.
  2. Eval score attached to the current prompt version.
  3. Injection test suite run against the current prompt.
  4. Log line showing prompt version + model id per request.
  5. Rollback to the previous prompt version exercised.

04 同仓库更多 Skills

SriAkhilSJ
SriAkhilSJ/PulseAIRepo

interaction-patterns-architect

Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

design-system-ops-architect

Architect-level operation of a design system in code — token pipelines and versioning, component API and variant policy, the catalogue as the contract, adoption metrics, and the governance that stops a system from forking into three. Use when a component library must survive several teams.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

design-handoff-architect

Architect-level design handoff — what must be specified before implementation starts, tokens over raw values, responsive and content-limit contracts, state matrices, and the review loop that catches drift between design and code. Use when a design is about to become code.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

content-microcopy-architect

Architect-level UI content — where strings live, voice and terminology consistency, error and empty-state copy as part of the interface, translation-ready authoring, and the content model a product needs before it multiplies screens. Use when the words in the interface matter as much as the pixels.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

ui-ux-implementation-architect

Architect-level direction for turning a design into working UI — the handoff contract, component ownership versus screen-level layout, interaction and state conventions, design QA gates, and the review habits that keep an implementation faithful without frozen pixels. Use before any specific UI implementation skill.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

test-strategy-architect

Architect-level test strategy — allocating assertions across unit, integration, contract and end-to-end layers, designing for testability through dependency boundaries, fixture and data strategy, and the flake and coverage policies that keep a suite trustworthy. Use when defining how a codebase is tested.

★ 0