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 nonlinear-xyz/factory-kit --skill factory-llm-workflow-engineergit clone --depth 1 https://github.com/nonlinear-xyz/factory-kitWrote 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/nonlinear-xyz/factory-kit/factory-llm-workflow-engineer)<a href="https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-llm-workflow-engineer"><img src="https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-llm-workflow-engineer.svg" alt="Measured on agentmods" height="20"></a>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.00104 | $0.01615 |
| Opus 5 | $0.00052 | $0.00807 |
| Sonnet 5 | $0.00021 | $0.00323 |
| Haiku 4.5 | $0.00010 | $0.00161 |
Grade A, and why
factory-llm-workflow-engineer 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 7d 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 — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Apply the llm-workflow-engineer specialist workflow. Build LLM workflows that fit the factory's conventions, not generic LangChain code. Load factory-llm-workflows through the host's skill capability when needed.
How to think (in order)
-
What kind of LLM workflow is this? Pick one:
- Single LLM call with structured output (intent classification, extraction) — no graph needed
- Multi-step workflow with state (chat, claim verification, document Q&A) — LangGraph
- RAG pipeline (retrieval + answer) — LangGraph with rag/general routing
- Agent with tool calls (function calling, iterative reasoning) — LangGraph with tool dispatch
- Streaming chat — LangGraph + SSE If it's not graph-shaped, don't reach for LangGraph.
-
State shape? TypedDict with
total=FalseandNotRequiredfor optional fields. Nested TypedDicts for complex types (e.g.RetrievedChunk). Never Pydantic — LangGraph merges shallowly. -
Node structure? Each node is a function returned by a factory that injects deps (LLM client, vector store, etc.).
create_<node_name>_node(deps) -> async (state) -> partial_state. Don't put deps in module scope. -
Routing? If you have ≥2 paths, write a named
_should_continue_after_<node>(state) -> strfunction. Don't inline conditionals inadd_conditional_edges. -
Structured output? Define a JSON schema dict that serves both as LLM tool definition AND validation contract. One source of truth.
-
RAG specifics:
- Hybrid search (alpha = BM25 vs semantic blend, default 0.5)
- Reranker if available (optional port —
Port | None) - Confidence threshold gating (default 0.3)
- Fallback supplement RAG (one-attempt-only, flagged in state)
- Per-tenant vector store isolation (Weaviate tenant API or equivalent)
-
Streaming? SSE with typed events. Backend yields
{event, data}dicts viaEventSourceResponse. Frontend registers callbacks per event name. Names must match exactly — share a constant module if possible. -
Multi-tenancy? Every vector store operation takes
project_id/tenant_id. Never share an index across tenants. -
Prompts? Local template is source of truth. Optional
PromptHuboverride wrapped in try/except so offline dev works. -
Ports/adapters? Only if you're actually swapping implementations (vector store, storage). Don't reach for hexagonal from day one.
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.
- 7d ago First seen · 160 lines · 104 tokens per session scan A 07068d524c10
factory-llm-workflow-engineer is a skill published in the GitHub repository nonlinear-xyz/factory-kit (9 stars, last pushed 1mo ago), licensed MIT. It adds 104 tokens to every session and 1,615 once invoked, about $0.0005 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.
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.
ai-ml
· Build/review AI apps: LLMs, RAG, embeddings, agents, evals, local inference. Triggers: 'llm', 'rag', 'embedding', 'openai sdk', 'agent loop', 'fine-tune', 'ollama', 'vllm'. Not for MCP (use mcp).
routine-writer
· Write Claude Code routine prompts for schedules, APIs, and GitHub events. Triggers: 'routine', 'claude routine', 'scheduled claude task', 'unattended claude', '/schedule', '/fire'. Not one-off prompts: prompt-generator.
prompt-generator
· Turn notes into structured LLM prompts or improve existing prompts. Triggers: 'write a prompt', 'system prompt', 'prompt template', 'evaluator prompt', 'delegation prompt', 'rewrite this prompt'. Not for skills or routines.
anti-ai-prose
· Strip AI tells from prose in docs, PRs, emails, and your own replies. Filters every response once loaded; full audit on request. Triggers: 'unslop', 'ai writing', 'sounds like chatgpt', 'llm voice'. Not for code (use anti-slop).
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.