Generate-LLM-Prompt

Generate-LLM-Prompt is a cursor rule for Cursor from TheSethRose/DevRules. It costs 30 tokens per session (980 once invoked), scanned A, original, MIT.

A rule for designing and improving prompts for large language models, the software behind tools such as chat assistants and code generators. It structures the goal, context, constraints, output format, and audience.

In plain words
What is it for?
Use it to write prompts for code generation, summarization, data extraction, planning, or question answering, including the desired response format and limits.
Why use it?
It turns an unclear request into instructions that are easier for an AI system to follow accurately and efficiently.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to write prompts for code generation, summarization, data extraction, planning, or question answering, including the desired response format and limits.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/thesethrose/devrules/generate-llm-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.

Clone the repo
git clone --depth 1 https://github.com/TheSethRose/DevRules

Made for: Cursor.

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 Generate-LLM-Prompt

README.md
[![agentmods](https://agentmods.dev/badge/rules/thesethrose/devrules/generate-llm-prompt/github.svg)](https://agentmods.dev/rules/thesethrose/devrules/generate-llm-prompt)
Your own site
<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.

agentmods 80×15 button for Generate-LLM-Prompt

Your own site · 80×15
<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>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 980 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.00030 $0.00980
Opus 5.5 $0.00012 $0.00392
Sonnet 5.5 $0.00006 $0.00196
Haiku 4.5 $0.00003 $0.00098

Measured 1mo ago against content hash 40074b04c810, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.cursor/rules/tasks/Generate-LLM-Prompt.mdc · 100 lines

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.

Read the full file on GitHub · 100 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. 1mo ago First seen · 100 lines · 30 tokens per session scan A 40074b04c810

Subscribe to this mod's changes

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.