prompt-engineering

A set of instructions for writing prompts that will be read and followed by other AI agents. It focuses on clear structure, plain wording, and guidance that machines can interpret consistently.

In plain words
What is it for?
Use it when creating agent prompts, commands, workflows, or other instructions intended for language models.
Why use it?
It helps reduce ambiguity and accidental behaviors when one AI system is giving instructions to another.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/technickai/ai-coding-config/prompt-engineering
Clone the repo
git clone --depth 1 https://github.com/TechNickAI/ai-coding-config

Made for: Cursor.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,060 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00015 $0.05060
Opus 5 $0.00008 $0.02530
Sonnet 5 $0.00003 $0.01012
Haiku 4.5 $0.00002 $0.00506

Measured 2d ago against content hash 517bac5f6ad7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prompt-engineering 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.

.cursor/rules/prompt-engineering.mdc · 796 lines

How it starts

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

Prompt Engineering Best Practices for LLM-to-LLM Communication

When creating prompts that will be read and executed by other LLMs (commands, workflows, agent prompts), follow these practices. These guidelines are for prompts that LLMs write for other LLMs to consume - not for human-to-LLM interaction.

Why This Document Minimizes Formatting

This document is designed to be read by LLMs, not humans. Therefore:

  • Minimal markdown formatting: No excessive bold, italics, or decorative symbols. These waste tokens and add no semantic value for LLM comprehension.
  • Minimal "bad" examples: LLMs encode patterns from what they see, regardless of labels like "wrong" or "don't do this." Showing anti-patterns teaches the LLM to reproduce them.
  • Simple structure: Headings for organization, code blocks for actual patterns, plain text for instructions.
  • Clear over clever: Direct language that LLMs can parse literally, not stylistic variations.

When you read "avoid X" or see a counterexample in this document, understand that we're violating our own principle for teaching purposes - but minimize this pattern in prompts you create for LLM consumption.

Key Principles for LLM-Readable Prompts

  • Assume the executing model is smarter: The model executing your prompt is likely more capable than the model that created it. Trust its abilities rather than over-prescribing implementation details.
  • Front-load critical information: LLMs give more weight to early content
  • Be explicit: LLMs can't infer context the way humans do
  • Maintain consistency: Use the same terminology throughout
  • Structure matters: Clear boundaries (especially XML tags) help LLMs parse complex prompts
  • Examples teach patterns: What you show is what the LLM will do
  • Clarity over brevity: Never sacrifice unambiguous interpretation for token savings
  • Explain motivation: Tell the LLM why a constraint exists - it generalizes from reasoning better than from bare rules
  • Descriptive over directive: "Use this tool when modifying files" works better than "CRITICAL: You MUST use this tool" - aggressive language can cause over-triggering
  • Positive framing: "Write in flowing prose" is clearer than "Don't use markdown" - positive instructions are unambiguous, negative ones require constructing then negating

Read the full file on GitHub · 796 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. 2d ago First seen · 796 lines · 15 tokens per session scan A 517bac5f6ad7

Subscribe to this mod's changes

prompt-engineering is a cursor rule published in the GitHub repository TechNickAI/ai-coding-config (24 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 5,060 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-30.