factory-prompt

factory-prompt is a skill for Claude Code from nonlinear-xyz/factory-kit. It costs 22 tokens per session (1,116 once invoked), scanned A, original, MIT.

A prompt-rewriting tool that turns a rough request into a structured prompt using named sections such as role, instructions, context, input, and constraints. The result is ready to paste into another task.

In plain words
What is it for?
Use it to organize short or incomplete requests, include source material clearly, and define the expected response format.
Why use it?
It makes implicit requirements easier to see and reduces the chance that important details or output rules are missed.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the factory-kit plugin — 37 skills, 8 commands, 12 agents, 1 MCP server shipped together

Good fit Use it to organize short or incomplete requests, include source material clearly, and define the expected response format.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nonlinear-xyz/factory-kit/factory-prompt
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 nonlinear-xyz/factory-kit --skill factory-prompt
Clone the repo
git clone --depth 1 https://github.com/nonlinear-xyz/factory-kit

Made for: Claude Code.

Or install factory-kit, the plugin that ships this one along with the rest of its 37 skills, 8 commands, 12 agents, 1 MCP server.

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 factory-prompt

README.md
[![agentmods](https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-prompt.svg)](https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-prompt)
Your own site
<a href="https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-prompt"><img src="https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-prompt.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,116 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.
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.00022 $0.01116
Opus 5 $0.00011 $0.00558
Sonnet 5 $0.00004 $0.00223
Haiku 4.5 $0.00002 $0.00112

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

Security

Grade A, and why

factory-prompt 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 8d 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/factory-prompt/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You're rewriting a rough ask into a structured prompt. The goal is a ready-to-paste prompt that uses the canonical XML tag vocabulary from factory-prompting.md, with nothing decorative and nothing missing.

Invocation input: the rough ask. It may be a one-liner, a paragraph, or include literal input material. If empty, ask the user for it and stop.

What to do

  1. Load the vocabulary. Load the canonical factory-prompting skill through the host's skill capability if it is not already active. The canonical tag set is: <role>, <instructions>, <context>, <input>, <examples>, <output_format>, <constraints>, <thinking>. Do not invent tags outside this set; for multiple inputs, nest descriptive child tags inside <input>.

  2. Parse the rough ask. Identify which canonical roles are actually present:

    • Instructions — the verb of the ask ("summarize", "extract", "rewrite", "decide")
    • Context — background about why or for whom, distinct from the material itself
    • Input — literal material to operate on (notes, email, code, query). If multiple, plan child tags
    • Output format — shape constraints (length, schema, bullets, tone)
    • Constraints — hard rules (must-include, must-exclude, length caps)
    • Examples — only if the user provided demonstrations
    • Role — only if the rough ask explicitly invokes a persona
    • Thinking — only if the task has hidden criteria the model should expose
  3. Apply the minimum-tagging rule. Skip any tag whose content would be empty or trivially derivable. A one-line ask with no input, no constraints, and no shape needs no tags — say so and return the prose. Tags exist to disambiguate; if there's nothing to disambiguate, don't add them.

  4. Decide literal vs template form.

    • If the rough ask contains concrete material (real notes, real code, a real question), produce the literal form with that material inline.
    • If the rough ask describes a kind of prompt for reuse ("a prompt to summarize any meeting notes"), produce the template form with {{snake_case_variable}} placeholders.
    • If ambiguous, default to literal and offer to re-emit as a template.
  5. Order the tags canonically. <role><instructions><context><input><examples><output_format><constraints><thinking>. Deviate only if the input is very long, in which case place <instructions> last and say why.

  6. Emit the prompt. Put it in a single fenced code block, no preamble, ready to copy. Indentation: two spaces inside nested tags.

  7. One-line rationale. After the code block, a single line of the form:

    Tags: <list>. Skipped: <list, if any>, because <one reason>.
    

    This is the learning aid — it shows which roles you saw in the ask and which you deliberately left out. Keep it to one line; no further commentary.

  8. No narration. Don't explain what you're about to do, don't summarize the rough ask back, don't close with "let me know if you'd like changes." The code block plus the one-line rationale is the entire response.

Read the full file on GitHub · 84 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. 8d ago First seen · 84 lines · 22 tokens per session scan A a376bdf36692

Subscribe to this mod's changes

factory-prompt is a skill published in the GitHub repository nonlinear-xyz/factory-kit (9 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 1,116 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-31.

Related

Other skills, from other repositories

prompt-sensei

Stage-aware prompt coaching, prompt improvement, lookback analysis, prompting habit feedback, and local reports about prompt quality for AI coding agents such as Claude Code or Codex.

chengzhongwei/Prompt-sensei · 39 tokens

kanso-prompting

Use when rewriting, sharpening, or producing a prompt for Claude or another current frontier model. Sets standing rules for getting better LLM output through better prompts. Loaded by /kanso-task; not directly invoked by the user.

blakecyze/kanso · 51 tokens

cost-aware-llm-pipeline

A planning guide for choosing language models and managing the amount of conversation context used by an AI coding workflow. It groups tasks by complexity and gives rules for avoiding context overflow during long sessions.

hashgraph-online/awesome-codex-plugins · 42 tokens

llm-patterns

AI-first application patterns, LLM testing, prompt management.

alinaqi/maggy · 16 tokens

813-regulations-iso-42001

Use when reviewing, designing, or modifying Java enterprise systems that use GenAI, LLMs, AI-assisted coding, RAG, AI agents, generated code, generated dependencies, prompt workflows, external model providers, or AI-enabled business logic and need ISO/IEC 42001 AI management system-aware engineering guidance. Part of…

jabrena/plinth · 77 tokens

prompt-engineering

Universal prompt engineering techniques for any LLM. Use when crafting, optimizing, or reviewing prompts for AI models. Triggers on requests like "improve this prompt", "write a system prompt", "optimize my instructions", "help me prompt engineer", "audit this prompt", "review my prompt", or when building agentic…

CodeAlive-AI/ai-driven-development · 76 tokens