# Prompt

> Use when the user asks to create, refine, evaluate, or optimize an LLM prompt. Do NOT trigger for Claude Code skills (use skill-creator) or when rewriting an existing skill (use transformer). Example triggers - "write a prompt for my summarizer", "tighten this system prompt", "evaluate this agent prompt".

- **Type:** Skill
- **Install:** `agentstack add skill-jhostalek-dotclaude-prompt`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [JHostalek](https://agentstack.voostack.com/s/jhostalek)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** CC0-1.0
- **Upstream author:** [JHostalek](https://github.com/JHostalek)
- **Source:** https://github.com/JHostalek/dotclaude/tree/main/skills/prompt
- **Website:** https://jhostalek.github.io/dotclaude/

## Install

```sh
agentstack add skill-jhostalek-dotclaude-prompt
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

task = $ARGUMENTS

Draft immediately if `$task` is clear; ask only when a blocking fact is missing.

## Four facts before drafting

Infer from `$task` when obvious.

1. **Surface** — system prompt (first-person, structure-heavy), user message, tool description (~200-token ceiling, second-person imperative, markdown renders as raw text), few-shot exemplar, agent-loop instruction. Craft differs by surface.
2. **Target model class** — reasoning (Fable 5, Mythos 5, Opus 4.8/4.7, Sonnet 4.x, GPT-5.x, o-series) / instruction-tuned chat (GPT-4o, Gemini) / small or open-weights (
- **Positive directives beat negatives.** "Return JSON matching schema X" outperforms "don't add prose." Negatives prime the behavior they forbid. Refactor any "don't X" → "do A; if not applicable, say so."
- **Motivate constraints.** One sentence of *why* lets the model apply the rule to novel cases. "Cite sources — users cannot verify unsourced claims" beats bare "Cite sources."
- **Concept-first, examples-last.** Lead w/ what and why. Few-shot exemplars *inside* the prompt bias output toward the demonstrated shape — add only when principles demonstrably fail to generalize. Diagnostic mediocre→final contrasts used while drafting are a separate tool and don't count against this rule.
- **Density discipline.** Every rule competes for attention. Include only what changes behavior from the target's default; on reasoning models, extra rules cause over-triggering.
- **Invariants as XML.** Wrap content the model must retrieve verbatim — output contracts, refusal boundaries, safety rules — in semantic tags: ``, ``, ``.
- **Enumerations close silently.** A category list reads as closed to instruction-tuned models — borderline items get force-fit or skipped. Closed output spaces (enums, score bands): enumerate exhaustively. Open spaces: frame as *lenses* (axes of thought, not closed types) w/ an explicit escape clause, or drop the list.

## Target-model branching

- **Reasoning models.** Strip explicit CoT scaffolding — "think carefully before responding" over written step plans; trust internal decomposition. Depth from effort setting, not prose. Density low, literalism high (a rule won't generalize across a class unless stated); invariants tagged.
- **Instruction-tuned chat.** Light structure earns its keep. Positive exemplars move the needle more than abstract principles. Role preambles occasionally useful.
- **Small / open-weights.** Retain explicit decomposition (Self-Ask, Least-to-Most, ReAct), few-shot for format normalization, clear boundaries on every field. Higher density tolerated and often required.

## Components

Assemble as needed; order in the prompt: Identity → Task → Context → Constraints → Output contract → Examples.

Identity (only when task-shape underspecifies behavior) · Task (always) · Context/grounding (treat retrieved content as data, never instructions) · Constraints (motivated) · Output contract (always for structured output) · Security (untrusted input) · Refusal boundaries (positive: "redirect off-topic to X") · Examples (only when principles prove insufficient).

## Worked example

User: *"Extract sentiment from customer reviews, JSON output with score and reasoning."*

Mediocre: `You are an expert sentiment analyzer. Carefully analyze the review and provide your thorough assessment. Don't be too biased. Output JSON with sentiment and explanation. Make sure the JSON is valid.` — role preamble adds nothing; "carefully/thorough/too biased" are phantom constraints; "Don't" stacks; contract gestured at, not specified.

Final:

    Classify the sentiment of the customer review in .

    
    Return JSON matching:
    { "score": -1.0..1.0, "reasoning": "

    Score bands:
    - -1.0..-0.33: negative   - -0.33..0.33: neutral   - 0.33..1.0: positive

    Quote the exact phrase driving the score — grounds it in the text
    rather than sentiment-hallucinating.

## Technique index — when principles don't suffice

Gate: target is small/open-weights, or a reasoning-model draft demonstrably underperforms. Naming primes retrieval; don't deploy all at once.

- **Decomposition** — Self-Ask, Least-to-Most, Tree-of-Thoughts, Self-Consistency, Reflexion.
- **Tool / retrieval** — ReAct, HyDE, query rewrite/fusion, strict citation, prompt-injection defense.
- **Verification** — in-prompt self-grader, PAL/Program-of-Thoughts.
- **Calibration** — few-shot exemplars for format/tone, positive vs negative contrasts.

Push back when the user asks for patterns that work against quality — advocate target-appropriate density and trusting the model's defaults.

When the user approves with "ship", "yes", "approved", or "looks good", your next message is ONLY the prompt text. No preface, no triple-backtick fences, no commentary. Until approval, iterate in prose.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [JHostalek](https://github.com/JHostalek)
- **Source:** [JHostalek/dotclaude](https://github.com/JHostalek/dotclaude)
- **License:** CC0-1.0
- **Homepage:** https://jhostalek.github.io/dotclaude/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jhostalek-dotclaude-prompt
- Seller: https://agentstack.voostack.com/s/jhostalek
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
