Skip to content
prompt-engineering logo

Prompt Engineering Guide

prompt-engineering

Master prompt engineering for AI models: LLMs, image generators, video models. Techniques: chain-of-thought, few-shot, system prompts, negative prompts. Models: Claude, GPT-4, Gemini, FLUX, Veo, Stable Diffusion prompting. Use for: better AI outputs, consistent results, complex tasks, optimization. Triggers: prompt engineering, how to prompt, better prompts, prompt tips, prompting guide, llm prompting, image prompt, ai prompting, prompt optimization, prompt template, prompt structure, effective prompts, prompt techniques

inference-sh/skills982installs760stars

SKILL.md

Full skill instructions

Install the belt CLI skill: npx skills add belt-sh/​cli

Prompt Engineering Guide

Master prompt engineering for AI models via inference.sh CLI.

Prompt Engineering Guide

Quick Start

Requires inference.sh CLI (belt). Install instructions

belt login

# Well-structured LLM prompt
belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "You are a senior software engineer. Review this code for security vulnerabilities:\n\n```python\nuser_input = request.args.get(\"query\")\nresult = db.execute(f\"SELECT * FROM users WHERE name = {user_input}\")\n```\n\nProvide specific issues and fixes."
}'

LLM Prompting

Basic Structure

[Role/​Context] + [Task] + [Constraints] + [Output Format]

Role Prompting

belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "You are an expert data scientist with 15 years of experience in machine learning. Explain gradient descent to a beginner, using simple analogies."
}'

Task Clarity

# Bad: vague
"Help me with my code"

# Good: specific
"Debug this Python function that should return the sum of even numbers from a list, but returns 0 for all inputs:

def sum_evens(numbers):
    total = 0
    for n in numbers:
        if n % 2 == 0:
            total += n
        return total

Identify the bug and provide the corrected code."

Chain-of-Thought

belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "Solve this step by step:\n\nA store sells apples for $2 each and oranges for $3 each. If someone buys 5 fruits and spends $12, how many of each fruit did they buy?\n\nThink through this step by step before giving the final answer."
}'

Few-Shot Examples

belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "Convert these sentences to formal business English:\n\nExample 1:\nInput: gonna send u the report tmrw\nOutput: I will send you the report tomorrow.\n\nExample 2:\nInput: cant make the meeting, something came up\nOutput: I apologize, but I will be unable to attend the meeting due to an unforeseen circumstance.\n\nNow convert:\nInput: hey can we push the deadline back a bit?"
}'

Output Format Specification

belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "Analyze the sentiment of these customer reviews. Return a JSON array with objects containing \"text\", \"sentiment\" (positive/​negative/​neutral), and \"confidence\" (0-1).\n\nReviews:\n1. \"Great product, fast shipping!\"\n2. \"Meh, its okay I guess\"\n3. \"Worst purchase ever, total waste of money\"\n\nReturn only valid JSON, no explanation."
}'

Constraint Setting

belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "Summarize this article in exactly 3 bullet points. Each bullet must be under 20 words. Focus only on actionable insights, not background information.\n\n[article text]"
}'

Image Generation Prompting

Basic Structure

[Subject] + [Style] + [Composition] + [Lighting] + [Technical]

Subject Description

# Bad: vague
"a cat"

# Good: specific
belt app run falai/​flux-dev --input '{
  "prompt": "A fluffy orange tabby cat with green eyes, sitting on a vintage leather armchair"
}'

Style Keywords

belt app run falai/​flux-dev --input '{
  "prompt": "Portrait photograph of a woman, shot on Kodak Portra 400 film, soft natural lighting, shallow depth of field, nostalgic mood, analog photography aesthetic"
}'

Composition Control

belt app run falai/​flux-dev --input '{
  "prompt": "Wide establishing shot of a cyberpunk city skyline at night, rule of thirds composition, neon signs in foreground, towering skyscrapers in background, rain-slicked streets"
}'

Quality Keywords

photorealistic, 8K, ultra detailed, sharp focus, professional,
masterpiece, high quality, best quality, intricate details

Negative Prompts

belt app run falai/​flux-dev --input '{
  "prompt": "Professional headshot portrait, clean background",
  "negative_prompt": "blurry, distorted, extra limbs, watermark, text, low quality, cartoon, anime"
}'

Video Prompting

Basic Structure

[Shot Type] + [Subject] + [Action] + [Setting] + [Style]

Camera Movement

belt app run google/​veo-3-1-fast --input '{
  "prompt": "Slow tracking shot following a woman walking through a sunlit forest, golden hour lighting, shallow depth of field, cinematic, 4K"
}'

Action Description

belt app run google/​veo-3-1-fast --input '{
  "prompt": "Close-up of hands kneading bread dough on a wooden surface, flour dust floating in morning light, slow motion, cozy baking aesthetic"
}'

Temporal Keywords

slow motion, timelapse, real-time, smooth motion,
continuous shot, quick cuts, frozen moment

Advanced Techniques

System Prompts

belt app run openrouter/​claude-sonnet-45 --input '{
  "system": "You are a helpful coding assistant. Always provide code with comments. If you are unsure about something, say so rather than guessing.",
  "prompt": "Write a Python function to validate email addresses using regex."
}'

Structured Output

belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "Extract information from this text and return as JSON:\n\n\"John Smith, CEO of TechCorp, announced yesterday that the company raised $50 million in Series B funding. The round was led by Venture Partners.\"\n\nSchema:\n{\n  \"person\": string,\n  \"title\": string,\n  \"company\": string,\n  \"event\": string,\n  \"amount\": string,\n  \"investor\": string\n}"
}'

Iterative Refinement

# Start broad
belt app run falai/​flux-dev --input '{
  "prompt": "A castle on a hill"
}'

# Add specifics
belt app run falai/​flux-dev --input '{
  "prompt": "A medieval stone castle on a grassy hill"
}'

# Add style
belt app run falai/​flux-dev --input '{
  "prompt": "A medieval stone castle on a grassy hill, dramatic sunset sky, fantasy art style, epic composition"
}'

# Add technical
belt app run falai/​flux-dev --input '{
  "prompt": "A medieval stone castle on a grassy hill, dramatic sunset sky, fantasy art style by Greg Rutkowski, epic composition, 8K, highly detailed"
}'

Multi-Turn Reasoning

# First: analyze
belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "Analyze this business problem: Our e-commerce site has a 70% cart abandonment rate. List potential causes."
}'

# Second: prioritize
belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "Given these causes of cart abandonment: [previous output], rank them by likely impact and ease of fixing. Format as a priority matrix."
}'

# Third: action plan
belt app run openrouter/​claude-sonnet-45 --input '{
  "prompt": "For the top 3 causes identified, provide specific A/​B tests we can run to validate and fix each issue."
}'

Model-Specific Tips

Claude

  • Excels at nuanced instructions
  • Responds well to role-playing
  • Good at following complex constraints
  • Prefers explicit output formats

GPT-4

  • Strong at code generation
  • Works well with examples
  • Good structured output
  • Responds to "let's think step by step"

FLUX

  • Detailed subject descriptions
  • Style references work well
  • Lighting keywords important
  • Negative prompts supported

Veo

  • Camera movement keywords
  • Cinematic language works well
  • Action descriptions important
  • Include temporal context

Common Mistakes

MistakeProblemFix
Too vagueUnpredictable outputAdd specifics
Too longModel loses focusPrioritize key info
ConflictingConfuses modelRemove contradictions
No formatInconsistent outputSpecify format
No examplesUnclear expectationsAdd few-shot

Prompt Templates

Code Review

Review this [language] code for:
1. Bugs and logic errors
2. Security vulnerabilities
3. Performance issues
4. Code style/​best practices

Code:
[code]

For each issue found, provide:
- Line number
- Issue description
- Severity (high/​medium/​low)
- Suggested fix

Content Writing

Write a [content type] about [topic].

Audience: [target audience]
Tone: [formal/​casual/​professional]
Length: [word count]
Key points to cover:
1. [point 1]
2. [point 2]
3. [point 3]

Include: [specific elements]
Avoid: [things to exclude]

Image Generation

[Subject with details], [setting/​background], [lighting type],
[art style or photography style], [composition], [quality keywords]

Related Skills

# Video prompting guide
npx skills add inference-sh/​skills@video-prompting-guide

# LLM models
npx skills add inference-sh/​skills@llm-models

# Image generation
npx skills add inference-sh/​skills@ai-image-generation

# Full platform skill
npx skills add inference-sh/​skills@infsh-cli

Browse all apps: belt app list

More skills from inference-sh

background-removal logo
inference-sh/skills

background-removal

Remove backgrounds from images with BiRefNet via inference.sh CLI. Model: BiRefNet (high accuracy background removal). Use for: product photos, portraits, e-commerce, transparent PNGs, photo editing. Triggers: remove background, background removal, remove bg, transparent background, cut out image, background remover, rembg, product photo editing, cutout, transparent png, bg removal, photo cutout

760 1K
View
ai-voice-cloning logo
inference-sh/skills

ai-voice-cloning

AI voice generation, text-to-speech, and voice synthesis via inference.sh CLI. Models: Inworld TTS-2 (100+ languages, emotion/non-verbal steering), Inworld TTS 1.5 (ultra-low latency), ElevenLabs (22+ premium voices, 32 languages), Kokoro TTS, DIA, Chatterbox, Higgs, VibeVoice for natural speech. Capabilities: multiple voices, emotions, accents, long-form narration, conversation, voice transformation, delivery mode control, character voices. Use for: voiceovers, audiobooks, podcasts, video narration, accessibility, gaming NPCs, avatar audio, UGC. Triggers: voice cloning, tts, text to speech, ai voice, voice generation, voice synthesis, voice over, narration, speech synthesis, ai narrator, elevenlabs, eleven labs, natural voice, realistic speech, voice ai, voice changer, inworld, inworld tts, character voice, npc voice

760 1K
View
ai-product-photography logo
inference-sh/skills

ai-product-photography

Generate professional AI product photography and commercial images. Models: FLUX, Imagen 3, Grok, Seedream for product shots, lifestyle images, mockups. Capabilities: studio lighting, lifestyle scenes, packaging, e-commerce photos. Use for: e-commerce, Amazon listings, Shopify, marketing, advertising, mockups. Triggers: product photography, product shot, commercial photography, e-commerce images, amazon product photo, shopify images, product mockup, studio product shot, lifestyle product image, advertising photo, packshot, product render, product image ai

760 1K
View
ai-music-generation logo
inference-sh/skills

ai-music-generation

Generate AI music and songs with ElevenLabs, Diffrythm, Tencent Song Generation via inference.sh CLI. Models: ElevenLabs Music (up to 10 min, commercial license), Diffrythm (fast song generation), Tencent Song Generation (full songs with vocals). Capabilities: text-to-music, song generation, instrumental, lyrics to song, soundtrack creation. Use for: background music, social media content, game soundtracks, podcasts, royalty-free music. Triggers: music generation, ai music, generate song, ai composer, text to music, song generator, create music with ai, suno alternative, udio alternative, ai song, ai soundtrack, generate soundtrack, ai jingle, music ai, beat generator, elevenlabs music, eleven labs music

760 1K
View
speech-to-text logo
inference-sh/skills

speech-to-text

Transcribe audio to text with ElevenLabs Scribe and Whisper models via inference.sh CLI. Models: ElevenLabs Scribe v2 (98%+ accuracy, diarization), Fast Whisper Large V3, Whisper V3 Large. Capabilities: transcription, translation, multi-language, timestamps, speaker diarization, audio event tagging. Use for: meeting transcription, subtitles, podcast transcripts, voice notes. Triggers: speech to text, transcription, whisper, audio to text, transcribe audio, voice to text, stt, automatic transcription, subtitles generation, transcribe meeting, audio transcription, whisper ai, elevenlabs stt, scribe, eleven labs transcribe

760 1K
View
javascript-sdk logo
inference-sh/skills

javascript-sdk

JavaScript/TypeScript SDK for inference.sh - run AI apps, build agents, integrate with all models. Package: @inferencesh/sdk (npm install). Full TypeScript support, streaming, file uploads. Build agents with template or ad-hoc patterns, tool builder API, skills, human approval. Use for: JavaScript integration, TypeScript, Node.js, React, Next.js, frontend apps. Triggers: javascript sdk, typescript sdk, npm install, node.js api, js client, react ai, next.js ai, frontend sdk, @inferencesh/sdk, typescript agent, browser sdk, js integration

760 1K
View
image-upscaling logo
inference-sh/skills

image-upscaling

Upscale and enhance images with Real-ESRGAN, Thera, Topaz, FLUX Upscaler via inference.sh CLI. Models: Real-ESRGAN, Thera (any size), FLUX Dev Upscaler, Topaz Image Upscaler. Use for: enhance low-res images, upscale AI art, restore old photos, increase resolution. Triggers: upscale image, image upscaler, enhance image, increase resolution, real esrgan, ai upscale, super resolution, image enhancement, upscaling, enlarge image, higher resolution, 4k upscale, hd upscale

760 1K
View
seo-content-brief logo
inference-sh/skills

seo-content-brief

SEO content brief creation with keyword research, search intent analysis, and content structure. Covers SERP analysis, heading hierarchy, word count targets, and internal linking strategy. Use for: content briefs, SEO writing, blog strategy, content planning, keyword targeting. Triggers: seo content brief, content brief, seo brief, keyword research, search intent, content strategy, blog brief, seo writing, content planning, keyword targeting, serp analysis, content outline, seo article, blog seo

760 1K
View
python-sdk logo
inference-sh/skills

python-sdk

Python SDK for inference.sh - run AI apps, build agents, and integrate with all models. Package: inferencesh (pip install inferencesh). Supports sync/async, streaming, file uploads. Build agents with template or ad-hoc patterns, tool builder API, skills, and human approval. Use for: Python integration, AI apps, agent development, RAG pipelines, automation. Triggers: python sdk, inferencesh, pip install, python api, python client, async inference, python agent, tool builder python, programmatic ai, python integration, sdk python

760 1K
View
data-visualization logo
inference-sh/skills

data-visualization

Data visualization with chart selection, color theory, and annotation best practices. Covers chart types (bar, line, scatter, heatmap), axes rules, and storytelling with data. Use for: charts, graphs, dashboards, reports, presentations, infographics, data stories. Triggers: data visualization, chart, graph, data chart, bar chart, line chart, scatter plot, data viz, visualization, dashboard chart, infographic data, data presentation, chart design, plot, heatmap, pie chart alternative

760 1K
View
customer-persona logo
inference-sh/skills

customer-persona

Research-backed customer persona creation with market data and avatar generation. Covers demographics, psychographics, jobs-to-be-done, journey mapping, and anti-personas. Use for: marketing strategy, product development, UX research, sales enablement, content strategy. Triggers: customer persona, buyer persona, user persona, target audience, ideal customer, customer profile, audience research, user research, icp, ideal customer profile, target market, customer avatar, audience persona

760 999
View
nano-banana-2 logo
inference-sh/skills

nano-banana-2

Generate images with Google Gemini 3.1 Flash Image Preview (Nano Banana 2) via inference.sh CLI. Capabilities: text-to-image, image editing, multi-image input (up to 14 images), Google Search grounding. Triggers: nano banana 2, nanobanana 2, gemini 3.1 flash image, gemini 3 1 flash image preview, google image generation

760 999
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View