loom-prompt-engineering

loom-prompt-engineering is a skill for Claude Code from cosmix/loom. It costs 28 tokens per session (1,936 once invoked), scanned A, original, MIT.

Prompt engineering designs instructions for large language models and coding agents, including examples, task structure, and output requirements.

In plain words
What is it for?
Use it to write system prompts, agent instructions, few-shot examples, structured tasks, reasoning workflows, and injection-resistant output contracts.
Why use it?
It helps make model responses more consistent, easier to inspect, and less vulnerable to confusing or malicious input.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it to write system prompts, agent instructions, few-shot examples, structured tasks, reasoning workflows, and injection-resistant output contracts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cosmix/loom/loom-prompt-engineering
View source ↗ cosmix/loom
Install

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.

Any agent
npx skills add cosmix/loom --skill loom-prompt-engineering
Clone the repo
git clone --depth 1 https://github.com/cosmix/loom

Made for: Claude Code.

Wrote 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.

agentmods badge for loom-prompt-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/cosmix/loom/loom-prompt-engineering.svg)](https://agentmods.dev/skills/cosmix/loom/loom-prompt-engineering)
Your own site
<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>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,936 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 4d ago against content hash 8d1b1b3b7e0e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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.

skills/loom-prompt-engineering/SKILL.md · 193 lines

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:

  1. Role — who the model is ("You are a Rust reviewer"). Sets vocabulary and priors; keep it short.
  2. Instructions — the task as explicit, ordered directives. Positive imperatives ("Return X") beat prohibitions.
  3. Context — data, code, conventions the task needs, clearly delimited (below).
  4. Examples — few-shot demonstrations when format/behavior must be consistent.
  5. 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.

Read the full file on GitHub · 193 lines

Changes

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.

  1. 4d ago Changed · -21 tokens per session 8d1b1b3b7e0e
  2. 8d ago First seen · 193 lines · 49 tokens per session scan A 03c6132b9a8a

Subscribe to this mod's changes

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.

Related

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…

giuseppe-trisciuoglio/developer-kit · 82 tokens

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.

JairoTorregrosa/jaiskills · 48 tokens

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…

tomimor/skills · 80 tokens

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…

bastos/skills · 113 tokens

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.

T4LEL/Claude-Arsenal · 43 tokens

agent-orchestration-improve-agent

Systematic improvement of existing agents through performance analysis, prompt engineering, and continuous iteration.

lingxling/awesome-skills-cn · 25 tokens