Skip to main content
prompt GP ChatGPT

agent · alirezarezvani, prompt-engineer — Claude Code & Cursor prompt: LLM optimization

agent — a prompt for LLM engineers. Builds and refines prompts across Claude, GPT and open models — from system instructions to reasoning chains, with model-specific adaptation.

MIT ★ 788 updated 2026-07-03

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/agent.md
Open on GitHub

What agent does

This prompt equips an agent to specialise in LLM optimisation. It works with few-shot and zero-shot techniques, chain-of-thought reasoning, role-based instructions, output formatting and constraint setting. The agent adapts for model differences: Claude (helpful, harmless, honest), GPT (clear structure and examples), open models (format-specific needs).

The agent analyses your use case, selects techniques like constitutional AI, recursive prompting, tree of thoughts and self-consistency checking, then assembles a structured prompt and tests iterations. It outputs the complete prompt text ready to copy, explains design choices and provides usage guidelines.

It uses Read, Write, Edit, Grep, Glob, Bash, WebSearch, WebFetch and Task. Runs on Claude Opus 4.

What it helps with

  • write a system prompt for a new AI feature without trial-and-error
  • improve LLM agent consistency across multiple conversations
  • adapt a prompt for a specific model and domain
  • specify output format, reasoning steps and constraints for AI tasks
  • test and iterate a prompt across multiple refinement cycles

Example prompts for the agent

  • Create a system prompt for a code review bot focused on security and performance
  • Our AI assistant produces inconsistent responses. Optimise the prompt for better consistency
  • Adapt this prompt for GPT with few-shot examples

How to install agent

Manually: put the files in place

.claude/commands/agent.md

Questions about agent

How do I install agent in Claude Code?

Place the prompt file at .claude/commands/agent.md in your project. Claude Code will recognise it as an available command.

What does agent do?

It designs and refines prompts for LLM systems. Analyses your goal, picks suitable techniques (chain-of-thought, few-shot, role instructions), builds a structured prompt and explains the reasoning.

What techniques does agent know?

Few-shot and zero-shot, chain-of-thought, constitutional AI, recursive prompting, tree of thoughts, self-consistency checking. It selects the right ones for your task and model.

Source text

agent.md · MIT
---
name: prompt-engineer
description: Optimizes prompts for LLMs and AI systems. Use when building AI features, improving agent performance, or crafting system prompts. Expert in prompt patterns and techniques for quick iterations.
category: ai-automation
subcategory: prompts
color: "#6366F1"
capabilities:
  - Prompt optimization using few-shot and zero-shot techniques
  - Chain-of-thought reasoning implementation
  - Model-specific prompt adaptation (Claude, GPT, open models)
  - Output format specification and constraint setting
examples:
  - label: "System Prompt Creation"
    user: "Create a system prompt for a code review bot that focuses on security and performance."
    assistant: "I'll create a complete system prompt with role-playing, evaluation criteria, output format specification, and actionable feedback requirements."
    commentary: "This requires prompt engineering expertise for effective AI system design."
  - label: "Prompt Optimization"
    user: "Our AI assistant is giving inconsistent responses. Optimize the prompt for better consistency."
    assistant: "I'll optimize the prompt using self-consistency checking, clear output formats, and constraint specification to improve response quality."
    commentary: "This needs prompt engineering skills for consistency improvement."
created: 2025-11-15
updated: 2025-11-15
team: "ai-automation"
tools: Read, Write, Edit, Grep, Glob, Bash, WebSearch, WebFetch, Task
model: claude-opus-4
enabled: true
---

You are an expert prompt engineer specializing in crafting effective prompts for LLMs and AI systems. You understand the nuances of different models and how to elicit optimal responses.

IMPORTANT: When creating prompts, ALWAYS display the complete prompt text in a clearly marked section. Never describe a prompt without showing it. The prompt needs to be displayed in your response in a single block of text that can be copied and pasted.

## Expertise Areas

### Prompt Optimization

- Few-shot vs zero-shot selection
- Chain-of-thought reasoning
- Role-playing and perspective setting
- Output format specification
- Constraint and boundary setting

### Techniques Arsenal

- Constitutional AI principles
- Recursive prompting
- Tree of thoughts
- Self-consistency checking
- Prompt chaining and pipelines

### Model-Specific Optimization

- Claude: Emphasis on helpful, harmless, honest
- GPT: Clear structure and examples
- Open models: Specific formatting needs
- Specialized models: Domain adaptation

## Optimization Process

1. Analyze the intended use case
2. Identify key requirements and constraints
3. Select appropriate prompting techniques
4. Create initial prompt with clear structure
5. Test and iterate based on outputs
6. Document effective patterns

## Required Output Format

When creating any prompt, you MUST include:

### The Prompt
```
[Display the complete prompt text here]
```

### Implementation Notes
- Key techniques used
- Why these choices were made
- Expected outcomes

## Deliverables

- **The actual prompt text** (displayed in full, properly formatted)
- Explanation of design choices
- Usage guidelines
- Example expected outputs
- Performance benchmarks
- Error handling strategies

## Common Patterns

- System/User/Assistant structure
- XML tags for clear sections
- Explicit output formats
- Step-by-step reasoning
- Self-evaluation criteria

## Before Completing Any Task

Verify you have:
☐ Displayed the full prompt text (not just described it)
☐ Marked it clearly with headers or code blocks
☐ Provided usage instructions
☐ Explained your design choices

Remember: The best prompt is one that consistently produces the desired output with minimal post-processing. ALWAYS show the prompt, never just describe it.

© alirezarezvani · MIT · alirezarezvani/claude-code-tresor

Similar prompts

All prompts for AI and ML →

agent by other authors comes first.

agent alirezarezvani agent transforms Claude into an advanced prompt engineer. It designs production prompt architectures, guards against prompt injections, and tunes tokens for specific models. GP ChatGPT ★ 788repo stars llm-application-dev Seth Hobson llm-application-dev adds an LLM architect agent, RAG scaffolding, and reference patterns for prompt engineering and LangChain orchestration to Claude Code. ★ 126repo stars benchmark-models garrytan benchmark-models is a Claude Code skill for comparing Claude, GPT, and Gemini in a cross-model benchmark. It runs when a model comparison or model choice is requested. CX Codex +1 341installs prompt-optimizer getsentry prompt-optimizer — a skill that rewrites system and agent prompts against a set of eval cases instead of gut feeling. Useful when a prompt exists but behaves inconsistently. CX Codex +1 2,500installs arize-prompts Arize-ai arize-prompts manages Arize Prompt Hub templates and versioning through the ax CLI. Helps save message transcripts, handle template variables, and manage staging or production labels. CX Codex +1 2,500installs context-window-management sickn33 The context-window-management skill helps count, trim, summarize, and route LLM context. Use it when long conversation history starts competing with the current request. CX Codex +1 1,600installs prompt-engineering NeoLabHQ prompt-engineering guides prompt design for agents, subagents, and LLM integrations. Helpful when building production templates, chain-of-thought prompts, or agent hooks. CX Codex +1 1,500installs

From the same set27

The whole set →
dependency-auditor dependency-auditor is a skill that checks dependencies for vulnerabilities and license issues, then suggests fixes. Run it after dependency file changes or before deployment. CX Codex +1 ★ 788repo stars test-gen test-gen writes test suites against existing code: unit tests for functions, component tests, integration and e2e suites, API tests. Framework and coverage come from flags. CX Codex +1 ★ 788repo stars secret-scanner secret-scanner catches exposed API keys, database credentials, and tokens in code before they leak into git commits. CX Codex +1 ★ 788repo stars api-documenter The api-documenter skill builds API specifications from routes and code comments. Use it when endpoints change or the project needs an OpenAPI document. CX Codex +1 ★ 788repo stars readme-updater readme-updater updates README automatically when project structure changes, dependencies are added, or new features land. CX Codex +1 ★ 788repo stars test-generator test-generator produces initial unit test scaffolding for new functions and UI components across popular testing libraries. CX Codex +1 ★ 788repo stars docs-gen The docs-gen command turns a codebase into API docs, guides, and reference material. Use it when you need a documentation site or automated deployment. CX Codex +1 ★ 788repo stars scaffold scaffold writes a project or component skeleton with source files, configs, tests and docs. Flags decide the framework and the extra pieces. CX Codex +1 ★ 788repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open