prompt-engineeringMaster prompt engineering for AI models: LLMs, image generators, video models. Techniques: chain-of-thought, few-shot, system prompts, negative prompts. Mode...
Install via ClawdBot CLI:
clawdbot install okaris/prompt-engineeringMaster prompt engineering for AI models via inference.sh CLI.
curl -fsSL https://cli.inference.sh | sh && infsh login
# Well-structured LLM prompt
infsh app run openrouter/claude-sonnet-45 --input '{
"prompt": "You are a senior software engineer. Review this code for security vulnerabilities:\n\npython\nuser_input = request.args.get(\"query\")\nresult = db.execute(f\"SELECT * FROM users WHERE name = {user_input}\")\n```\n\nProvide specific issues and fixes."
}'
> **Install note:** The [install script](https://cli.inference.sh) only detects your OS/architecture, downloads the matching binary from `dist.inference.sh`, and verifies its SHA-256 checksum. No elevated permissions or background processes. [Manual install & verification](https://dist.inference.sh/cli/checksums.txt) available.
## LLM Prompting
### Basic Structure
[Role/Context] + [Task] + [Constraints] + [Output Format]
### Role Promptingbash
infsh 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 Claritybash
"Help me with my code"
"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-Thoughtbash
infsh 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 Examplesbash
infsh 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 Specificationbash
infsh 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 Settingbash
infsh 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 Descriptionbash
"a cat"
infsh app run falai/flux-dev --input '{
"prompt": "A fluffy orange tabby cat with green eyes, sitting on a vintage leather armchair"
}'
### Style Keywordsbash
infsh 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 Controlbash
infsh 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 Promptsbash
infsh 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 Movementbash
infsh 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 Descriptionbash
infsh 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 Promptsbash
infsh 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 Outputbash
infsh 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 Refinementbash
infsh app run falai/flux-dev --input '{
"prompt": "A castle on a hill"
}'
infsh app run falai/flux-dev --input '{
"prompt": "A medieval stone castle on a grassy hill"
}'
infsh app run falai/flux-dev --input '{
"prompt": "A medieval stone castle on a grassy hill, dramatic sunset sky, fantasy art style, epic composition"
}'
infsh 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 Reasoningbash
infsh 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."
}'
infsh 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."
}'
infsh 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
| Mistake | Problem | Fix |
|---------|---------|-----|
| Too vague | Unpredictable output | Add specifics |
| Too long | Model loses focus | Prioritize key info |
| Conflicting | Confuses model | Remove contradictions |
| No format | Inconsistent output | Specify format |
| No examples | Unclear expectations | Add few-shot |
## Prompt Templates
### Code Review
Review this [language] code for:
Code:
[code]
For each issue found, provide:
### Content Writing
Write a [content type] about [topic].
Audience: [target audience]
Tone: [formal/casual/professional]
Length: [word count]
Key points to cover:
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 Skillsbash
npx skills add inference-sh/skills@video-prompting-guide
npx skills add inference-sh/skills@llm-models
npx skills add inference-sh/skills@ai-image-generation
npx skills add inference-sh/skills@inference-sh
```
Browse all apps: infsh app list
Generated Mar 1, 2026
Developers use structured prompts to have LLMs like Claude or GPT-4 analyze code for security vulnerabilities, bugs, and best practices, ensuring higher code quality and faster iteration cycles. This reduces manual review time and helps catch issues early in the development pipeline.
Marketing teams leverage few-shot prompting and output formatting to generate consistent, brand-aligned copy such as social media posts, email campaigns, and product descriptions. This streamlines content creation, maintains tone, and scales output without sacrificing quality.
E-commerce businesses use detailed image generation prompts with specific styles and negative prompts to produce high-quality product visuals, lifestyle shots, and promotional graphics. This reduces reliance on expensive photoshoots and enables rapid prototyping of visual content.
Educators and course creators apply video prompting techniques to generate instructional clips, animations, and simulations with controlled camera movements and actions. This enhances engagement and provides scalable, customizable learning materials for diverse subjects.
Support teams use constraint-based prompts to analyze customer feedback, extracting sentiment and key insights via JSON output for integration into CRM systems. This automates feedback processing, identifies trends, and improves response strategies.
Offer tailored workshops and one-on-one sessions to businesses seeking to optimize AI interactions, focusing on techniques like chain-of-thought and system prompts. Revenue is generated through hourly rates or project-based contracts, targeting industries like tech and marketing.
Develop a subscription-based platform providing pre-built, customizable prompt templates for LLMs and image generators, with features for version control and collaboration. Revenue streams include monthly subscriptions and enterprise licenses, appealing to teams needing consistent AI outputs.
Operate an agency that uses advanced prompting to deliver high-volume, quality content such as articles, images, and videos for clients. Revenue is based on output volume and complexity, with scalable operations leveraging tools like inference.sh for efficiency.
💬 Integration Tip
Integrate with existing workflows by using the inference.sh CLI for seamless AI model access, and start with simple prompts before advancing to complex techniques like chain-of-thought.
Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
Gemini CLI for one-shot Q&A, summaries, and generation.
Research any topic from the last 30 days on Reddit + X + Web, synthesize findings, and write copy-paste-ready prompts. Use when the user wants recent social/web research on a topic, asks "what are people saying about X", or wants to learn current best practices. Requires OPENAI_API_KEY and/or XAI_API_KEY for full Reddit+X access, falls back to web search.
Check Antigravity account quotas for Claude and Gemini models. Shows remaining quota and reset times with ban detection.
Manages free AI models from OpenRouter for OpenClaw. Automatically ranks models by quality, configures fallbacks for rate-limit handling, and updates opencla...
Manages free AI models from OpenRouter for OpenClaw. Automatically ranks models by quality, configures fallbacks for rate-limit handling, and updates openclaw.json. Use when the user mentions free AI, OpenRouter, model switching, rate limits, or wants to reduce AI costs.