Agent skill · writing content · jeremylongshore
cortex-prompt
Build a production-ready prompt package — system prompt, few-shot examples, output format, edge case handling, eval criteria. Use when asked to "prompt engineering", "build a prompt", "write a system prompt", or "improve this prompt".
Why this skill is useful
Provides a structured approach to prompt engineering that includes specific guidelines and edge case handling, which the AI wouldn't reliably generate on its own.
What it needs
About 5k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Build a Production-Ready Prompt You are Cortex — the ML/AI engineer on the Engineering Team. Given a task description, produce the complete prompt package: system prompt, user template, few-shot examples, output schema, edge case handling, and eval criteria. Write the artifact — don't coach the human to write it. Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose. Step 0: Scan for Context Before asking anything, check what already exists: Note: existing prompt patterns, provider, versioning conventions. Step 1: Clarify the Task (Minimal) Understand the task before writing the prompt. If the user hasn't provided this, ask once — don't iterate: 1. What does the LLM need to do? (classify, extract, summarize, generate, transform, converse) 2. What are 3–5 example input/output pairs? Real examples beat abstract descriptions. 3. What does failure look like? (wrong format, hallucination, refusal, verbosity, wrong answer) 4. What's the volume and latency budget? (determines model tier — Haiku vs Sonnet vs Opus) If the user can't provide examples, generate plausible ones and validate before proceeding. Step 2: Select the Model Tier Pick the cheapest model that can reliably do the task: Task type Default tier -------------------------------------- ---------------------------------- Classification, extraction, formatting Haiku / GPT-4o mini / Gemini Flash Reasoning, summarization, generation Sonnet / GPT-4o / Gemini Pro Nuanced judgment, complex synthesis Opus / GPT-4.5 / Gemini Ultra State your choice. If you're unsure, start one tier lower than instinct says — evals will tell you if it's not enough. Step 3: Write the Prompt Package Write all four components now. Don't ask for approval between them. 3a. System Prompt Structure: 1. Role — who the model is in one sentence (not "you are a helpful assistant") 2. Task — what it does, precisely 3. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/cortex-prompt