微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🎯

全模态 AI 提示词工程精要

prompt-engineering · vv0.1.5
AI 增强 安全 S+ 级 作者 okaris 公开目录收录
2.2k 下载 551 安装 8.7k 收藏 104.8k 浏览

简介

基于 inference.sh 平台,系统传授 LLM/图像/视频模型的提示词工程技巧,显著提升 AI 输出质量与一致性。

原始描述

Master prompt engineering for AI models: LLMs, image generators, video models. Techniques: chain-of-thought, few-shot, system prompts, negative prompts. Mode...

通过你的 Agent 添加

安装目录:prompt-engineering/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/prompt-engineering/
Codex CLI~/.codex/skills/prompt-engineering/
DeepSeek Harness~/.agents/skills/prompt-engineering/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: prompt-engineering description: "Master prompt engineering for AI models: LLMs, image generators, video models. Techniques: chain-of-thought, few-shot, system prompts, negative prompts. Models: Claude, GPT, Gemini, FLUX, Qwen-Image, Veo 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" allowed-tools: Bash(belt *)

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 anthropic/claude-sonnet-5-5 --input '{
  "text": "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 anthropic/claude-sonnet-5-5 --input '{
  "text": "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 anthropic/claude-sonnet-5-5 --input '{
  "text": "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 anthropic/claude-sonnet-5-5 --input '{
  "text": "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 anthropic/claude-sonnet-5-5 --input '{
  "text": "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 anthropic/claude-sonnet-5-5 --input '{
  "text": "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 pruna/flux-dev --input '{
  "prompt": "A fluffy orange tabby cat with green eyes, sitting on a vintage leather armchair"
}'

Style Keywords

belt app run pruna/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 pruna/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 alibaba/qwen-image-2 --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 anthropic/claude-sonnet-5-5 --input '{
  "system_prompt": "You are a helpful coding assistant. Always provide code with comments. If you are unsure about something, say so rather than guessing.",
  "text": "Write a Python function to validate email addresses using regex."
}'

Structured Output

belt app run anthropic/claude-sonnet-5-5 --input '{
  "text": "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 pruna/flux-dev --input '{
  "prompt": "A castle on a hill"
}'

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

# Add style
belt app run pruna/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 pruna/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 anthropic/claude-sonnet-5-5 --input '{
  "text": "Analyze this business problem: Our e-commerce site has a 70% cart abandonment rate. List potential causes."
}'

# Second: prioritize
belt app run anthropic/claude-sonnet-5-5 --input '{
  "text": "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 anthropic/claude-sonnet-5-5 --input '{
  "text": "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

  • 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
  • No negative prompt input: describe what you want instead (use Qwen-Image for negative prompts)

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:
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

正文来自原始仓库, 版权归作者所有,许可:MIT。 权利人认为有不妥,可申请下架。

原始仓库

作者的项目地址:https://github.com/cosmicstack-labs/mercury-agent-skills

标签

education-researchcontent-mediaimage-genproductivityapi

同类 Skill