# Best Practices

Transforms vague prompts into optimized Claude Code prompts.

- Repository: https://github.com/MoizIbnYousaf/ai-agent-skills (1155 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-09-21
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add MoizIbnYousaf/ai-agent-skills --skill best-practices -g -a claude-code -y`
Codex: `npx skills add MoizIbnYousaf/ai-agent-skills --skill best-practices -g -a codex -y`
Cursor: `npx skills add MoizIbnYousaf/ai-agent-skills --skill best-practices -g -a cursor -y`
Gemini CLI: `npx skills add MoizIbnYousaf/ai-agent-skills --skill best-practices -g -a gemini-cli -y`

## Description

Transforms vague prompts into optimized Claude Code prompts. Adds verification, specific context, constraints, and proper phasing. Invoke with /best-practices.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Best Practices, Prompt Transformer

> Transform prompts by adding what Claude needs to succeed.

## Start Here

Based on user's request:

**User provides a prompt to transform:**
→ Ask using AskUserQuestion:
  - **Question:** "How should I improve this prompt?"
  - **Header:** "Mode"
  - **Options:**
    1. **Transform directly**, "I'll apply best practices and output an improved version"
    2. **Build context first**, "I'll gather codebase context and intent analysis first"

**User asks to learn/understand:**
→ Show the 5 Transformation Principles section

**User asks for examples:**
→ Link to references/before-after-examples.md

**User asks to evaluate a prompt:**
→ Use the Success Criteria eval rubric at the end of this document

---

## If "Transform directly"

Apply the 5 principles below and output the improved prompt immediately.

## If "Build context first"

Launch 3 parallel agents to gather context:

```
Run these agents IN PARALLEL using the Task tool:

- Task task-intent-analyzer("[user's prompt]")
- Task best-practices-referencer("[user's prompt]")
- Task codebase-context-builder("[user's prompt]")
```

### What Each Agent Returns

| Agent | Mission | Returns |
|-------|---------|---------|
| **task-intent-analyzer** | Understand what user is trying to do | Task type, gaps, edge cases, transformation guidance |
| **best-practices-referencer** | Find relevant patterns from references/ | Matching examples, anti-patterns to avoid, transformation rules |
| **codebase-context-builder** | Explore THIS codebase | Specific file paths, similar implementations, conventions |

### After Agents Return

The rest: https://github.com/MoizIbnYousaf/ai-agent-skills/blob/HEAD/skills/best-practices/SKILL.md
