Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add cosmix/loom --skill loom-prompt-engineeringgit clone --depth 1 https://github.com/cosmix/loomWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cosmix/loom/loom-prompt-engineering)<a href="https://agentmods.dev/skills/cosmix/loom/loom-prompt-engineering"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-prompt-engineering.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.01936 |
| Opus 5 | $0.00014 | $0.00968 |
| Sonnet 5 | $0.00006 | $0.00387 |
| Haiku 4.5 | $0.00003 | $0.00194 |
Grade A, and why
loom-prompt-engineering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prompt Engineering
Overview
Craft prompts for LLMs and orchestrated agents (system prompts, agent signals, few-shot). Optimize for output quality, consistency, and injection-resistance. Bias toward measurable iteration over intuition.
Prompt anatomy
Use named sections to make the contract inspectable. The best order and amount of context are model- and task-dependent; evaluate them for the target system. A structured prompt has:
- Role — who the model is ("You are a Rust reviewer"). Sets vocabulary and priors; keep it short.
- Instructions — the task as explicit, ordered directives. Positive imperatives ("Return X") beat prohibitions.
- Context — data, code, conventions the task needs, clearly delimited (below).
- Examples — few-shot demonstrations when format/behavior must be consistent.
- Output contract — exact format, schema, length, and what to do on failure.
Tell the model what TO do, not just what to avoid. Replace vague verbs ("analyze") with the concrete deliverable ("list each bug as file:line — description").
Delimiters & structure
Separate instructions from data with unambiguous delimiters. XML-like tags or clear headings both work; choose the convention the target model and application already use. Delimiters improve inspection, but are not a security boundary and do not make hostile text safe by themselves.
<instructions>
Summarize the article for engineers in 2-3 sentences.
</instructions>
<article>
{article_text}
</article>
Prefer tags/headings over prose for multi-part prompts. Keep untrusted content visibly distinct from the task, but do not treat a delimiter as isolation or authorization; enforce authority and tool permissions outside the prompt.
Few-shot: selection over quantity
Use examples when the required behavior or output shape remains ambiguous after clear instructions. Start with the smallest representative set, then add or remove examples only when the eval shows a material effect.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed · -21 tokens per session 8d1b1b3b7e0e
- 8d ago First seen · 193 lines · 49 tokens per session scan A 03c6132b9a8a
loom-prompt-engineering is a skill published in the GitHub repository cosmix/loom (54 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 1,936 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
prompt-engineering
Provides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection, chain-of-thought structuring, system prompt design, and template composition. Use when the user asks to write or improve a prompt, wants help with few-shot examples, chain-of-thought, system prompts, prompt…
metaprompt
Generate a complete, ready-to-use prompt for a target model and harness. Triggers: metaprompt, generate a prompt for, write me a prompt, create a system prompt, prompt engineer this, optimize this prompt.
improve-prompt
Critique and rewrite a prompt using prompt engineering best practices: clarity, examples, XML structure, role, explicit output format, and positive-over-negative instructions. Asks 1-3 targeted questions to fill missing context, then returns a short critique plus a drop-in rewritten prompt. Use when the user wants to…
write-a-prompt
Creates a copy-ready prompt from a rough request, notes, source material, or the current conversation using OpenAI's prompting guidance. Use when the user invokes $write-a-prompt or /write-a-prompt, types a common misspelling such as /write-a-promopt or /wite-a-prompt, asks to "write a prompt for me," asks to turn the…
add-ai
Use when adding an AI/LLM feature to a product - chat, generation, summarization, extraction, semantic search - or when the user says add AI, use Claude, chatbot, embeddings.
agent-orchestration-improve-agent
Systematic improvement of existing agents through performance analysis, prompt engineering, and continuous iteration.