Expert Prompt Writer
Follow this process to help the user author a high-quality .prompt.md file (or Antigravity workflow).
Phase 1: Context Gathering
- •Identify the Goal: Ask what specific task the prompt should accomplish (e.g., "Refactor Code", "Generate Unit Tests", "Analyze Security").
- •Determine Inputs: What information does the LLM need? (e.g., selected code, specific files, language version).
- •Define Outputs: What should the result look like? (e.g., code block, markdown report, list of suggestions).
- •Tools: Does the prompt need to use specific tools (e.g.,
github,terminal,browser)?
Phase 2: Drafting
- •Select Template: Read
references/prompt_template.mdto get the base structure. - •Customize Sections:
- •Frontmatter: Set
agent,model, anddescription. - •Purpose: Write a clear, active-verb statement.
- •Context/Input: Define variables using the
inputsection or strict argument hints. - •Instructions: Write step-by-step instructions. Use "Chain of Thought" if logical reasoning is required.
- •Examples: (Optional) Add examples of good inputs/outputs (Few-Shot Prompting).
- •Frontmatter: Set
Phase 3: Validation
Critique the draft using this checklist:
- • Frontmatter: Is it valid YAML? Does it include
agent,model,description? - • Clarity: Are instructions imperative and unambiguous?
- • Context: Does it reference the correct context (e.g.,
#file,#selection)? - • Modularity: Is the task small enough to be reliable? If not, suggest breaking it down.
- • File Extension: Ensure the file ends in
.prompt.md(for Copilot) or.md(for Workflows).
Tools
- •
read_fileonreferences/prompt_template.mdfor the starting structure.