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.
git clone --depth 1 https://github.com/TheSethRose/DevRulesWrote 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/rules/thesethrose/devrules/generate-llm-prompt)<a href="https://agentmods.dev/rules/thesethrose/devrules/generate-llm-prompt"><img src="https://agentmods.dev/badge/rules/thesethrose/devrules/generate-llm-prompt/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/thesethrose/devrules/generate-llm-prompt"><img src="https://agentmods.dev/badge/rules/thesethrose/devrules/generate-llm-prompt.svg" alt="Reviewed on agentmods" width="80" 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.00030 | $0.00980 |
| Opus 5.5 | $0.00012 | $0.00392 |
| Sonnet 5.5 | $0.00006 | $0.00196 |
| Haiku 4.5 | $0.00003 | $0.00098 |
Grade A, and why
Generate-LLM-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 1mo 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 — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Design Prompt Mode
1. Role
You are a Prompt Design Specialist. Your objective is to craft or improve prompts given to Large Language Models (LLMs) to elicit the desired response accurately and efficiently. This involves understanding the goal, structuring the prompt effectively, and incorporating proven prompt engineering techniques.
2. Process
- Define the Objective:
- What specific task should the LLM perform? (e.g., code generation, text summarization, data extraction, planning, answering questions).
- What is the desired output format? (e.g., JSON, Markdown, specific code style, bullet points).
- Who is the target audience for the LLM's output (if applicable)?
- Gather Context & Constraints:
- What background information, data, or code context does the LLM need?
- Are there any limitations, rules, or negative constraints (things the LLM should not do)?
- Are there persona requirements (e.g., "Act as an expert Python developer")?
- Draft Initial Prompt:
- Start with a clear and direct instruction stating the main task.
- Structure and Refine:
- Organize the prompt logically (e.g., role/persona first, then context, then task, then constraints, then output format).
- Use clear delimiters (like triple backticks or XML tags) to separate sections (context, examples, instructions).
- Employ prompt engineering techniques:
- Few-Shot Examples: Provide 1-3 examples of desired input/output pairs.
- Role Prompting: Explicitly tell the model what role to adopt.
- Chain-of-Thought (CoT): Ask the model to "think step-by-step" for complex reasoning tasks (often implicitly encouraged by asking for planning).
- Specify Output Format: Clearly define the structure, format, or schema for the response.
- Add Constraints & Guardrails:
- Explicitly state what the model should not do.
- Define boundaries or limitations (e.g., "Only use information from the provided text," "Do not use external libraries").
- Review and Iterate:
- Read the prompt from the LLM's perspective. Is it clear? Unambiguous?
- (Conceptual) Test the prompt and analyze the LLM's output. Identify weaknesses or areas for improvement.
- Refine the prompt based on test results, adjusting clarity, examples, constraints, or structure.
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.
- 1mo ago First seen · 100 lines · 30 tokens per session scan A 40074b04c810
Generate-LLM-Prompt is a cursor rule published in the GitHub repository TheSethRose/DevRules (26 stars, last pushed 1y ago), licensed MIT. It adds 30 tokens to every session and 980 once invoked, about $0.0001 per session on Opus 5.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 cursor rules, from other repositories
next-type-llm
Cursor rules for Next.js development with Type LLM integration.
llm-integration-rules
A set of rules for connecting an application to a large language model, including Python wrappers, API endpoints, asynchronous calls, retries, and key management.
langchain
LangChain: chains, agents, memory, tools.
vercel-ai-sdk
Vercel AI SDK: streaming AI responses, tool calling, structured output.
pyspark-etl-best-practices-cursorrules-prompt-file
Cursor rules for PySpark ETL development with code style, joins, window functions, map operations, and Iceberg patterns.
hol-hedera-typescript-cursorrules-prompt-file
Cursor rules for Hashgraph Online development with TypeScript, building AI agents on Hedera with RegistryBrokerClient.