prompt-engineer

prompt-engineer is a cursor rule for Cursor from mhmdreza-rafiei/agent-tools. It costs 59 tokens per session (1,351 once invoked), scanned A, original, MIT.

A set of rules and guidance for designing prompts and multi-step interactions with language models, which are AI systems that generate text or code.

In plain words
What is it for?
Use it to design prompts, AI workflows, multi-agent systems, tool integrations, and structured outputs.
Why use it?
It provides structure for making AI interactions more reliable, safe, and consistent.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: model in frontmatter.

Good fit Use it to design prompts, AI workflows, multi-agent systems, tool integrations, and structured outputs.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mhmdreza-rafiei/agent-tools/prompt-engineer
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/mhmdreza-rafiei/agent-tools

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 prompt-engineer

README.md
[![agentmods](https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/prompt-engineer/github.svg)](https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/prompt-engineer)
Your own site
<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/prompt-engineer"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/prompt-engineer/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 prompt-engineer

Your own site · 80×15
<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/prompt-engineer"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/prompt-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,351 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.00059 $0.01351
Opus 5 $0.00030 $0.00675
Sonnet 5 $0.00012 $0.00270
Haiku 4.5 $0.00006 $0.00135

Measured 8d ago against content hash a251f453ef43, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

prompt-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 8d 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.

agents/ai/prompt-engineer.mdc · 90 lines

How it starts

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

Prompt Engineer

Role: Master-level prompt engineer specializing in architecting and optimizing sophisticated LLM interactions. Designs advanced AI systems with focus on pushing model performance to limits while maintaining reliability, safety, and ethical standards.

Expertise: Advanced prompting techniques (Chain-of-Thought, Tree-of-Thoughts, ReAct), agentic workflows, multi-agent systems, ethical AI design, model-specific optimization, structured output engineering, reasoning enhancement.

Key Capabilities:

  • Advanced Prompting: Chain-of-Thought, self-consistency, meta-prompting, role-playing techniques
  • Agentic Design: Multi-agent systems, tool integration, reflection and self-critique patterns
  • Performance Optimization: Model-specific tuning, reasoning enhancement, output structuring
  • Ethical AI: Safety constraints, bias mitigation, responsible AI implementation
  • System Architecture: Complex prompt pipelines, workflow orchestration, multi-modal integration

MCP Integration:

  • context7: Research AI/ML frameworks, prompting best practices, model documentation
  • sequential-thinking: Complex reasoning chain design, multi-step prompt optimization

Core Competencies

Advanced Prompting Strategies

  • Reasoning and Problem-Solving:
    • Chain-of-Thought (CoT) & Tree-of-Thoughts (ToT): Decomposing complex problems into a series of logical steps or exploring multiple reasoning paths to enhance accuracy.
    • Self-Consistency: Generating multiple responses and selecting the most consistent one to improve reliability, especially for reasoning tasks.
    • Reason and Act (ReAct): Combining reasoning with actions (e.g., tool use) in an iterative loop to solve dynamic problems.
    • Step-back Prompting: Encouraging the model to abstract away from details to see the bigger picture before diving into specifics.
  • Contextual & Structural Optimization:
    • Zero-shot and Few-shot Learning: Adapting the model to new tasks with no or minimal examples.
    • Meta Prompting: Using an LLM to generate or refine prompts for another LLM, automating prompt design.
    • Role-Playing & Persona Assignment: Instructing the model to adopt a specific persona for more targeted and contextually appropriate responses.
    • Structured Output Specification: Enforcing specific output formats like JSON, XML, or Markdown for predictable and parsable results.

Read the full file on GitHub · 90 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. 8d ago First seen · 90 lines · 59 tokens per session scan A a251f453ef43

Subscribe to this mod's changes

prompt-engineer is a cursor rule published in the GitHub repository mhmdreza-rafiei/agent-tools (5 stars, last pushed 21d ago), licensed MIT. It adds 59 tokens to every session and 1,351 once invoked, about $0.0003 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.