{
  "markdown": "<div align=\"center\">\n\n<img src=\"assets/banner.png\" alt=\"Prompt Engineering — an AI skill that turns a raw draft into a production-grade prompt\" width=\"100%\">\n\n<br><br>\n\n**An AI skill that turns a raw draft into a production-grade prompt.**\n\nIt rewrites and optimizes prompts using proven techniques, then hands you a ready-to-paste result plus a short changelog of what changed and why — calibrated to your task type and target model.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Validate](https://github.com/PhAlves23/prompt-engineering-skill/actions/workflows/validate.yml/badge.svg)](https://github.com/PhAlves23/prompt-engineering-skill/actions/workflows/validate.yml)\n[![Version](https://img.shields.io/badge/version-1.1.0-green.svg)](https://github.com/PhAlves23/prompt-engineering-skill/releases)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)\n\nWorks with **Claude Code · GitHub Copilot · OpenAI Codex · Gemini CLI · OpenCode · Cursor · Windsurf · Cline**\n\n</div>\n\n---\n\n## Table of contents\n\n- [Why this skill](#why-this-skill)\n- [How it works](#how-it-works)\n- [Example](#example)\n- [Installation](#installation)\n- [Verify installation](#verify-installation)\n- [Usage](#usage)\n- [What's inside](#whats-inside)\n- [Updating](#updating)\n- [Uninstall](#uninstall)\n- [Contributing](#contributing)\n- [Project structure](#project-structure)\n- [License](#license)\n\n---\n\n## Why this skill\n\nMost prompt advice is a handful of generic tips. This skill is different in three ways:\n\n- **Grounded in primary sources.** Every technique is traceable to a cited source — Anthropic's prompting best practices and prompt improver, OpenAI's GPT-5/reasoning guides, Google's Gemini PTCF, and *The Prompt Report*'s academic taxonomy of 58 techniques. See [`sources.md`](plugins/prompt-engineering/skills/prompt-engineering/references/sources.md).\n- **Model-aware.** The rules differ by model family. The skill adapts to Claude 4.x, OpenAI GPT/reasoning (o-series), and Gemini — e.g. it removes \"think step by step\" for reasoning models, which actively hurts them.\n- **Anti-overengineering.** It calibrates effort to complexity. A simple prompt gets a lean rewrite; it won't bloat it with chain-of-thought and examples it doesn't need.\n\n> It **improves the prompt** — it does not run it, unless you explicitly ask.\n\n## How it works\n\nYou paste a draft (or describe what you want). The skill runs a five-phase workflow:\n\n1. **Diagnose** — real intent, task type, target model, audience, output format, constraints, and the draft's weaknesses.\n2. **Select techniques** — only those that add value for this task and model.\n3. **Rewrite** — assemble the prompt in a canonical structure (role, context+motivation, XML-tagged data, positive instructions, few-shot, output contract).\n4. **Self-review** — run a quality checklist; the golden test is \"could a colleague with no context run this without doubt?\"\n5. **Deliver** — the optimized prompt + a changelog mapping each change to the weakness it fixes.\n\n## Example\n\n<table>\n<tr>\n<th>Your draft (before)</th>\n<th>After the skill</th>\n</tr>\n<tr>\n<td valign=\"top\">\n\n```\nclassify the sentiment\nof this comment:\n{{comment}}\n```\n\n</td>\n<td valign=\"top\">\n\n```\nYou are a sentiment analyst\nspecialized in customer feedback.\n\nClassify the sentiment of the comment\nbelow into one of these categories:\npositive, negative, neutral.\n\n<comment>\n{{comment}}\n</comment>\n\nFollow these steps:\n1. Identify expressions that carry emotion.\n2. Weigh the overall tone, accounting\n   for irony and negation.\n3. Choose the predominant sentiment.\n\nPut your reasoning in <analysis>. On the\nlast line, answer ONLY one word:\npositive, negative, or neutral.\n```\n\n</td>\n</tr>\n</table>\n\n**What the skill changed, and why:** added a **role** (calibrates interpretation), a strict **enum output contract** (`ONLY one word` — parseable), a short **chain-of-thought** (catches irony/negation, the top error source in sentiment), and **XML** around the input (robust to comments with line breaks). Every rewrite ships with this changelog.\n\nSee six more cases — coding, extraction, research, agentic, long-context, and an already-good prompt — in [`worked-examples.md`](plugins/prompt-engineering/skills/prompt-engineering/references/worked-examples.md).\n\n## Installation\n\nPick your tool. Claude Code is the primary target; the rest are fully supported.\n\n<details open>\n<summary><b>Claude Code</b></summary>\n\n**One-line installer** (copies the skill into `~/.claude/skills/`, backs up any existing install, touches nothing else):\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/PhAlves23/prompt-engineering-skill/main/install.sh | bash\n```\n\n**Or as a plugin** (versioned, updatable):\n\n```\n/plugin marketplace add PhAlves23/prompt-engineering-skill\n/plugin install prompt-engineering\n```\n\nRestart Claude Code after installing.\n</details>\n\n<details>\n<summary><b>GitHub Copilot CLI</b></summary>\n\nThe plugin marketplace works in Copilot CLI too:\n\n```bash\ncopilot plugin marketplace add PhAlves23/prompt-engineering-skill\ncopilot plugin install prompt-engineering@prompt-engineering-marketplace\n```\n</details>\n\n<details>\n<summary><b>OpenAI Codex</b></summary>\n\nCodex discovers the full skill from `~/.agents/skills/`. Full guide: [`docs/INSTALL.codex.md`](docs/INSTALL.codex.md).\n\n```bash\ngit clone https://github.com/PhAlves23/prompt-engineering-skill.git ~/.codex/prompt-engineering-skill\nmkdir -p ~/.agents/skills\nln -s ~/.codex/prompt-engineering-skill/plugins/prompt-engineering/skills/prompt-engineering ~/.agents/skills/prompt-engineering\n```\n</details>\n\n<details>\n<summary><b>Gemini CLI</b></summary>\n\n```bash\ngemini extensions install https://github.com/PhAlves23/prompt-engineering-skill\n```\n</details>\n\n<details>\n<summary><b>OpenCode</b></summary>\n\nReads `AGENTS.md` natively. Quickest path (full guide: [`docs/INSTALL.opencode.md`](docs/INSTALL.opencode.md)):\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/PhAlves23/prompt-engineering-skill/main/adapters/codex/AGENTS.md -o AGENTS.md\n```\n</details>\n\n<details>\n<summary><b>Cursor / Windsurf / Cline</b></summary>\n\nCopy the rule for your tool from [`adapters/`](adapters/):\n\n- **Cursor** → `adapters/cursor/.cursor/rules/prompt-engineering.mdc` into your project's `.cursor/rules/` (invoke with `@prompt-engineering`). A native Cursor plugin manifest is also provided at `.cursor-plugin/plugin.json`.\n- **Windsurf** → `adapters/windsurf/.windsurf/rules/prompt-engineering.md` into `.windsurf/rules/` (activates by intent).\n- **Cline** → `adapters/cline/.clinerules/prompt-engineering.md` into `.clinerules/prompt-engineering.md` (workspace rule; ask explicitly).\n\nSee [`adapters/README.md`](adapters/README.md) for details and other tools (Roo, Continue, Zed).\n</details>\n\n## Verify installation\n\nStart a new session and ask for something that should trigger the skill — for example, paste a draft with \"improve this prompt\", or run `/prompt-engineering` in Claude Code. You should get an optimized prompt + a changelog.\n\n```bash\n# Claude Code / curl install:\ntest -f ~/.claude/skills/prompt-engineering/SKILL.md && echo \"installed\" || echo \"not found\"\n```\n\n## Usage\n\nType `/prompt-engineering` (Claude Code / Copilot), or simply say:\n\n- \"improve this prompt\"\n- \"optimize this prompt\"\n- \"rewrite this prompt\"\n- or paste a draft and ask to make it better.\n\nThe skill activates automatically (where the tool supports intent-based activation) and returns the rewritten prompt plus a changelog.\n\n## What's inside\n\n| Component | What it gives you |\n|-----------|-------------------|\n| **Canonical structure** | Role, context+motivation, sequential instructions, XML, few-shot, CoT, output contract, success criteria |\n| **Technique selection** | By task type (classification, extraction, generation, coding, reasoning, research, agentic, summarization) and model |\n| **Technique index** | All 58 techniques from *The Prompt Report* plus vendor/post-2024 extras |\n| **Worked examples** | 7 full draft → optimized → changelog cases |\n| **Quality checklist** | Pre-delivery self-review |\n| **Evaluation guide** | How to A/B test that the rewrite is actually better |\n| **Prompt security** | Defenses against injection/jailbreak |\n| **Auto-optimization** | APE, OPRO, DSPy, MIPRO references for when you have an eval set |\n\n## Updating\n\n| Install method | Update command |\n|----------------|----------------|\n| curl installer | re-run the installer |\n| Claude / Copilot plugin | `/plugin update prompt-engineering` |\n| Codex symlink | `cd ~/.codex/prompt-engineering-skill && git pull` |\n| Gemini extension | `gemini extensions update prompt-engineering` |\n\n## Uninstall\n\n- curl / manual: `rm -rf ~/.claude/skills/prompt-engineering`\n- Claude plugin: `/plugin uninstall prompt-engineering`\n- Codex: `rm ~/.agents/skills/prompt-engineering`\n\n## Contributing\n\nIssues and pull requests are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) — it covers the dev setup, how the adapters are generated from a single source, and the review process. Please also read the [Code of Conduct](CODE_OF_CONDUCT.md). Security reports go through [SECURITY.md](SECURITY.md).\n\nThe skill stays grounded in cited sources: **if you change a technique claim, cite it.**\n\n## Project structure\n\n```\nprompt-engineering-skill/\n├── plugins/prompt-engineering/        # the Claude Code plugin\n│   └── skills/prompt-engineering/     # the skill itself (source of truth)\n│       ├── SKILL.md                   # entry point + workflow\n│       ├── references/                # technique catalog, model profiles, examples, etc.\n│       └── assets/                    # canonical XML template\n├── adapters/                          # other-tool versions (generated from _core.md)\n│   ├── _core.md                       # single source for the lean adapter body\n│   ├── cursor/  windsurf/  copilot/  codex/\n│   └── README.md\n├── scripts/build-adapters.sh          # regenerate adapters from _core.md\n├── docs/                              # per-platform install guides + website snippets\n├── .github/                           # CI, issue/PR templates, funding\n├── .claude-plugin/marketplace.json    # Claude Code / Copilot marketplace\n├── .cursor-plugin/plugin.json         # native Cursor plugin manifest\n├── gemini-extension.json + GEMINI.md  # Gemini CLI extension\n├── install.sh                         # one-line curl installer\n├── CHANGELOG.md  CONTRIBUTING.md  CODE_OF_CONDUCT.md  SECURITY.md  LICENSE\n```\n\n## License\n\n[MIT](LICENSE) — free to use, modify, and redistribute with attribution.\n",
  "bytes": 10605,
  "sha": "98cbf12d3362cf2dc30b14f77434a079c7a3dab5df845bc601e631a068db10f7",
  "repo_slug": "phalves23/prompt-engineering-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_phalves23_prompt_engineering_skill_221a5e03/readme"
}