prompt-engineering-architect

Designs, audits, and optimizes production prompts for in-app AI features.

1|Updated May 4, 2026
One-click install
npx skills add https://github.com/Scardubu/SwarmXQ --skill prompt-engineering-architect-scardubu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-engineering-architect
Source: https://github.com/Scardubu/SwarmXQ/tree/main/.ai/skills/prompt-engineering-architect
Command: npx skills add https://github.com/Scardubu/SwarmXQ --skill prompt-engineering-architect-scardubu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI features embedded in applications often produce inconsistent outputs, hallucinated data, or unreliable JSON because their prompts lack structure, examples, and explicit constraints. This Skill provides a systematic protocol for writing, versioning, and testing prompts so LLM features behave predictably in production. ## Core Features & Use Cases - Structured System Prompts: Builds prompts from four components — role, goal, constraints, and output format — with TypeScript templates for extraction, classification, summarization, RAG, and code generation tasks. - Few-Shot & Chain-of-Thought Patterns: Supplies few-shot example design for extraction and classification, plus structured reasoning formats for multi-step advisory tasks. - RAG & Tool Description Design: Provides context-injection templates with boundary instructions to prevent hallucination, and precise tool description patterns that disambiguate similar functions. - Versioning & Evaluation: Includes a versioned prompt registry with changelogs and an eval harness pattern that tests prompts against fixed input sets. - Use Case: Your invoice extraction feature returns inconsistent dates and invents missing fields. Use this Skill to rewrite the prompt with explicit null handling, ISO date constraints, few-shot edge cases, and an eval suite that measures accuracy before deployment. ## Quick Start Ask the AI to audit your existing system prompt for an extraction or classification feature and rewrite it using the role, goal, constraints, and format structure with few-shot examples.

Frequently Asked Questions about prompt-engineering-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a better system prompt for an LLM feature?

Structure every system prompt with four components: role, goal, constraints, and output format. Detailed instructions outperform short ones, and positive phrasing like "respond only in JSON" works better than negative rules like "don't use markdown".

How do I make an LLM output JSON reliably?

Combine an explicit output schema with 2-3 few-shot examples covering edge cases, and instruct the model to respond with a single JSON object with no markdown or preamble. Use temperature 0 for deterministic extraction tasks.

How do few-shot examples improve extraction accuracy?

Few-shot examples are the strongest signal for format tasks, outperforming written instructions alone. Provide 2-3 examples that cover edge cases such as ambiguous dates, missing fields, and varied input phrasings.

How do I reduce hallucinations in a RAG application?

Add boundary instructions telling the model to answer only from the provided context and to respond with an exact fallback message when the answer is not present. Explicitly forbid using outside knowledge, extrapolation, or speculation.

Why does my AI give inconsistent results across runs?

Inconsistency usually comes from vague output formats, missing null-handling instructions, or high temperature settings. Specify an exact schema, instruct the model to use null for missing fields, and set temperature to 0 for factual tasks.

When should I use chain-of-thought prompting?

Use chain-of-thought for multi-step reasoning tasks like tax calculations or diagnostics, where the model should identify rules, analyze, and compute before answering. For simple extraction or classification, instruct the model to skip reasoning and return only the answer.