framework/engineering/skills/flowai-engineer-prompts-for-reasoning/SKILL.md
Guide for writing prompts for reasoning/smart models (Gemini Pro, GPT-4o, Claude 3.5 Sonnet), focused on structure and context.
npx skillsauth add korchasa/flowai flowai-engineer-prompts-for-reasoningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This guide helps you get the best out of "smart" models (like Gemini 1.5 Pro, Claude 3.5 Sonnet, GPT-4o). These models are capable of complex logic, coding, and creative work, but they need Context and Structure to stay on track.
Reasoning models thrive when you organize information clearly. Think of it like briefing a senior colleague. You don't just give an order; you explain the Background, the Goal, and the Constraints.
We use XML-style tags (like <context>, <rules>) to help the model
understand the structure of your prompt.
Copy this structure for complex tasks.
# ROLE
You are an expert [Role Name].
# GOAL
<objective>
[Clearly state what you want to achieve in 1-2 sentences]
</objective>
# CONTEXT (The "Why" and "What")
<context>
[Provide background info. Who is the audience? What is the current state? What are the definitions?]
</context>
# RULES & CONSTRAINTS
<rules>
1. [Constraint 1 - e.g., Code style]
2. [Constraint 2 - e.g., Word count limit]
3. [Constraint 3 - e.g., "Do not use external libraries"]
</rules>
# INSTRUCTIONS (The "How")
<instructions>
1. First, analyze the request and the context.
2. Think step-by-step about the best approach.
3. [Specific Step 1]
4. [Specific Step 2]
5. Output the final result in [Format].
</instructions>
Tags like <context>, <code_snippet>, <examples> help the model separate
different parts of your prompt. It prevents the model from getting confused
between instructions and data.
For coding or writing tasks, ask the model to outline its plan or "think" before generating the final output.
<plan> tags, then write the code."Tell the model exactly what "good" looks like.
# ROLE
You are a Senior TypeScript Engineer.
# GOAL
<objective>
Refactor the provided legacy function to be more readable and performant.
</objective>
# CONTEXT
<context>
This function is part of a high-traffic e-commerce checkout. It handles cart validation.
We are moving to functional programming patterns.
</context>
# RULES
<rules>
1. Use arrow functions.
2. Add JSDoc comments.
3. Do not change the external API signature.
4. Return early to avoid deep nesting.
</rules>
# INPUT CODE
<code_snippet> function validate(cart) { // ... messy code ... } </code_snippet>
# INSTRUCTIONS
<instructions>
1. Analyze the complexity of the current function.
2. Refactor step-by-step.
3. Explain why the new version is better.
</instructions>
Before sending your prompt, ask yourself:
<tags> to organize big blocks of text?development
Use when the user asks to add TypeScript strict-mode code-style rules to AGENTS.md for a TypeScript project using strict mode. Do NOT trigger for Deno projects (use setup-agent-code-style-deno) or non-strict TS configurations.
development
Use when the user asks to add Deno/TypeScript code-style rules to AGENTS.md, or during initial Deno project setup when code-style guidelines need to be established. Do NOT trigger for non-Deno TypeScript projects (use setup-agent-code-style-strict), or for runtime-agnostic style advice.
testing
Use when the user provides a source (URL, file path, or free text) to save into the project's memex — a long-term knowledge bank for AI agents. Stores the raw source, extracts entities into cross-linked pages, runs a backlink audit, and updates the index and activity log. Do NOT trigger on casual reads; only when the intent is to persist a source into the memex.
development
Use when the user asks to audit a memex (long-term knowledge bank for AI agents) for orphans, dead SALP REFs, missing sections, contradictions, or index drift. Runs a deterministic structural check, layers LLM-judgement findings, optionally auto-fixes trivial issues with `--fix`. Do NOT trigger on general code linting.