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 agentmods add rules/thesethrose/devrules/generate-llm-promptgit clone --depth 1 https://github.com/TheSethRose/DevRulesWhat 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 | $0.00030 | $0.00980 |
| Opus 5 | $0.00015 | $0.00490 |
| Sonnet 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 2d 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.
- 2d 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 (25 stars, last pushed 1y ago), licensed MIT. It adds 30 tokens to every session and 980 once invoked, about $0.0002 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 cursor rules, from other repositories
engineering-ticket-template-cursorrules-prompt-file
Cursor rules for engineering development with ticket template integration.
ankra-cli
Ankra CLI rules and best practices for managing Kubernetes clusters via the Ankra platform.
cypress-integration-testing-cursorrules-prompt-file
Cursor rules for Cypress development with integration testing.
go-backend-scalability-cursorrules-prompt-file
Cursor rules for Go development with backend scalability.
git-conventional-commit-messages
Cursor rules for Git development with conventional commit messages integration.
cypress-accessibility-testing-cursorrules-prompt-file
Cursor rules for Cypress development with accessibility testing.