APIエンドポイントの追加・変更で、DTO、入力検証、OpenAPI仕様、MCPツールの説明や公開範囲を揃え、エージェントからも扱いやすいAPIに整えます。
- APIエンドポイントを追加したいとき
- DTOと入力検証を整えたいとき
- MCPツールとしてAPIを公開したいとき
目的や評価基準を先に定め、指示の明確化、例示、XMLタグ、役割設定などを使って、AIの回答を望む形式に近づけるプロンプトを設計するスキルです。
Prompt engineering best practices - invoke with @prompt-engineering
実行スコア 未検証
インストール方法を見るAIに頼みたい作業の成功条件や評価方法を決め、指示文を試しながら改善するための考え方をまとめたスキルです。作業内容を明確に書き、出力形式や文字数、対象読者、含める内容と除外する内容を指定する方法を扱います。入力と出力の例を示す方法、複雑な課題で段階的な検討を促す方法、<context>や<task>などのXMLタグで情報を整理する方法も説明します。役割や専門性、話し方を指定する方法や、回答の書き出しを与えて形式を導く方法も含まれます。プロンプトを調整するか、追加の学習(ファインチューニング)を行うかを考える際の観点も示します。
AIの回答が曖昧で、指示を具体化したいときに役立ちます。分類や要約などで、望む形式の例を示したい場合にも使えます。複数の条件や背景情報を整理して伝えたい人、数値や論理を含む複雑な依頼の指示を工夫したい人にも向いています。
特記事項はありません。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Source Cursor rule: .cursor/rules/prompt-engineering.mdc.
Original file scope: .cursor/rules/*.mdc.
Original Cursor alwaysApply: false.
Based on Claude's Prompt Engineering Documentation
Before writing prompts:
Prompt engineering is preferred because:
Principle: Provide explicit, unambiguous instructions.
❌ Bad: "Tell me about it"
✅ Good: "Summarize the following article in three bullet points, focusing on key findings"
❌ Bad: "Help with code"
✅ Good: "Debug this Python function that should return the sum of even numbers in a list"
Tips:
Principle: Show the model what you want through examples.
<examples>
<example>
<input>The movie was absolutely terrible, waste of time</input>
<output>{"sentiment": "negative", "confidence": 0.95}</output>
</example>
<example>
<input>Decent film, not great but watchable</input>
<output>{"sentiment": "neutral", "confidence": 0.7}</output>
</example>
<example>
<input>Best movie I've seen this year!</input>
<output>{"sentiment": "positive", "confidence": 0.9}</output>
</example>
</examples>
Now analyze: "The special effects were amazing but the plot was confusing"
Tips:
Principle: Encourage step-by-step reasoning for complex tasks.
<instruction>
Solve this problem step by step. Show your reasoning before giving the final answer.
</instruction>
<problem>
A train leaves Station A at 9:00 AM traveling at 60 mph. Another train leaves
Station B at 10:00 AM traveling at 80 mph toward Station A. The stations are
280 miles apart. When will the trains meet?
</problem>
<thinking>
[Let Claude work through the problem here]
</thinking>
<answer>
[Final answer after reasoning]
</answer>
Tips:
<thinking> tags to separate reasoning from outputPrinciple: Structure prompts with clear delimiters for better parsing.
<context>
You are helping debug a penetration testing tool that automates security scans.
</context>
<task>
Analyze the following error log and identify the root cause.
</task>
<error_log>
[2024-01-15 10:23:45] ERROR: Connection timeout after 30s
[2024-01-15 10:23:45] DEBUG: Target: 192.168.1.1:443
[2024-01-15 10:23:45] DEBUG: Retry attempt 3 of 3
</error_log>
<output_format>
Provide your analysis in this format:
- Root cause: [one sentence]
- Evidence: [relevant log lines]
- Recommended fix: [actionable steps]
</output_format>
Common XML Tags:
<context> - Background information<task> or <instruction> - What to do<examples> - Sample inputs/outputs<constraints> - Limitations or rules<output_format> - Expected response structure<thinking> - Reasoning section<answer> - Final responsePrinciple: Assign a persona to influence response style and expertise.
<role>
You are a senior security researcher with 15 years of experience in penetration
testing. You specialize in web application security and have discovered multiple
CVEs. You communicate findings clearly and prioritize actionable recommendations.
</role>
<task>
Review this HTTP response and identify potential security vulnerabilities.
</task>
Effective Role Elements:
Principle: Start the response to guide format and direction.
Human: List the top 3 security vulnerabilities in this code.
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
APIエンドポイントの追加・変更で、DTO、入力検証、OpenAPI仕様、MCPツールの説明や公開範囲を揃え、エージェントからも扱いやすいAPIに整えます。
既存コードのデザインシステム利用状況を調べ、旧UI部品やlucide-reactのアイコンを@trycompai/design-systemの部品・Carbonアイコンへ置き換えるスキルです。
指定されたファイルのフックやAPI利用を点検し、禁止パターンをSWRやapiClientなどの指定方式へ修正するための監査手順と実装規約をまとめています。
NestJSのAPIとフロントエンドを調べ、権限チェックや監査ログのルール違反を修正するための確認項目を示します。
権限で表示や操作が変わるコンポーネントの単体テストを点検し、不足分の追加や失敗の修正を行って、管理者と閲覧専用ユーザーの動作を確かめます。
Better Authを使ったTypeScript認証の設定を支援し、データベース接続、セッション管理、メール認証、OAuth、プラグインやセキュリティ項目を整理します。