Communitygithub.com

提示工程权威指南

掌握AI模型的提示工程:LLM、图像生成器、视频模型。涵盖思维链、少样本学习、系统提示、负面提示等核心技术。

提示工程权威指南 是什么?

该技能是一个全面的提示工程指南,专为使用 inference.sh CLI 的开发者设计。它涵盖了大语言模型(LLM)、图像生成模型和视频模型的提示工程核心技法,包括角色提示、思维链、少样本学习、输出格式指定、约束设置等。对于图像生成,详细介绍了主体描述、风格关键词、构图控制和负面提示的使用;对于视频生成,则强调了镜头类型、动作描述、时间关键词和运镜技巧。技能还提供了模型特定技巧(如 Claude、GPT-4、FLUX、Veo),常见错误对照表,以及可直接复用的提示模板。用户通过 `belt` CLI 即可快速运行各类示例,显著提升AI输出的质量和一致性,尤其适用于需要精细控制AI输出的开发者和研究人员。

兼容平台✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/101-skills/superpowers/tree/HEAD/guides/prompting/prompt-engineering

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

预览

来自技能 README

提示工程指南

文档

安装 belt CLI 技能: npx skills add belt-sh/cli

提示工程权威指南 是做什么的?

通过 inference.sh CLI 掌握AI模型的提示工程。

提示工程指南

快速开始

需要 inference.sh CLI(belt)。安装说明

belt login

# 结构良好的 LLM 提示
belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "你是一位高级软件工程师。请审查以下代码是否存在安全漏洞:\n\n```python\nuser_input = request.args.get(\"query\")\nresult = db.execute(f\"SELECT * FROM users WHERE name = {user_input}\")\n```\n\n请给出具体问题及修复方案。"
}'

LLM 提示

基本结构

[角色/上下文] + [任务] + [约束条件] + [输出格式]

角色提示

belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "你是一位拥有15年机器学习经验的高级数据科学家。请用简单的类比向初学者解释梯度下降。"
}'

任务清晰度

# 糟糕:模糊
"帮我处理代码"

# 好:具体
"调试这个 Python 函数,它应返回列表中偶数的和,但始终返回 0:

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

找出 bug 并提供修正后的代码。"

思维链

belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "请逐步解决以下问题:\n\n商店苹果每个2美元,橙子每个3美元。某人买了5个水果花费12美元,他买了多少苹果和多少橙子?\n\n在给出最终答案前,请逐步思考。"
}'

少样本学习

belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "将以下句子转换为正式商务英语:\n\n示例 1:\n输入:gonna send u the report tmrw\n输出:I will send you the report tomorrow.\n\n示例 2:\n输入:cant make the meeting, something came up\n输出:I apologize, but I will be unable to attend the meeting due to an unforeseen circumstance.\n\n现在转换:\n输入:hey can we push the deadline back a bit?"
}'

输出格式指定

belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "分析以下客户评论的情感倾向。返回一个 JSON 数组,每个对象包含 \"text\"、\"sentiment\"(positive/negative/neutral)和 \"confidence\"(0-1)。\n\n评论:\n1. \"Great product, fast shipping!\"\n2. \"Meh, its okay I guess\"\n3. \"Worst purchase ever, total waste of money\"\n\n只返回有效的 JSON,无需解释。"
}'

约束设置

belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "用恰好3个要点总结这篇文章。每个要点不超过20个单词。只关注可操作的见解,不要背景信息。\n\n[文章文本]"
}'

图像生成提示

基本结构

[主体] + [风格] + [构图] + [光照] + [技术]

主体描述

# 糟糕:模糊
"一只猫"

# 好:具体
belt app run falai/flux-dev --input '{
  "prompt": "一只毛茸茸的绿色眼睛橘色虎斑猫,坐在一张复古皮扶手椅上"
}'

风格关键词

belt app run falai/flux-dev --input '{
  "prompt": "一位女士的人像照片,使用 Kodak Portra 400 胶片拍摄,柔和的自然光,浅景深,怀旧氛围,模拟摄影美学"
}'

构图控制

belt app run falai/flux-dev --input '{
  "prompt": "赛博朋克城市天际线的广角定场镜头,夜拍,三分法构图,近景霓虹灯招牌,背景高耸摩天楼,雨水打湿的街道"
}'

质量关键词

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

负面提示

belt app run falai/flux-dev --input '{
  "prompt": "专业大头照肖像,干净背景",
  "negative_prompt": "blurry, distorted, extra limbs, watermark, text, low quality, cartoon, anime"
}'

视频提示

基本结构

[镜头类型] + [主体] + [动作] + [场景] + [风格]

运镜

belt app run google/veo-3-1-fast --input '{
  "prompt": "缓慢跟拍一位女士穿过阳光明媚的森林,黄金时刻光线,浅景深,电影感,4K"
}'

动作描述

belt app run google/veo-3-1-fast --input '{
  "prompt": "双手在木质台面上揉面团的近景,面粉屑在晨光中飘浮,慢动作,温馨烘焙美学"
}'

时间关键词

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

高级技巧

系统提示

belt app run openrouter/claude-sonnet-45 --input '{
  "system": "你是一位乐于助人的编程助手。始终给出带注释的代码。如果不确定,请坦诚告知。",
  "prompt": "用 Python 写一个使用正则表达式验证电子邮件地址的函数。"
}'

结构化输出

belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "从以下文本中提取信息并以 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\n模式:\n{\n  \"person\": string,\n  \"title\": string,\n  \"company\": string,\n  \"event\": string,\n  \"amount\": string,\n  \"investor\": string\n}"
}'

迭代优化

# 从宽泛开始
belt app run falai/flux-dev --input '{
  "prompt": "山丘上的城堡"
}'

# 增加细节
belt app run falai/flux-dev --input '{
  "prompt": "山丘上的中世纪石堡"
}'

# 加入风格
belt app run falai/flux-dev --input '{
  "prompt": "山丘上的中世纪石堡,戏剧性日落天空,奇幻艺术风格,史诗构图"
}'

# 加入技术参数
belt app run falai/flux-dev --input '{
  "prompt": "山丘上的中世纪石堡,戏剧性日落天空,奇幻艺术风格,Greg Rutkowski 风格,史诗构图,8K,高度细节"
}'

多轮推理

# 第一步:分析
belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "分析以下业务问题:我们的电商网站购物车放弃率为70%。列出潜在原因。"
}'

# 第二步:排序
belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "根据购物车放弃的可能原因:[上一步输出],按影响程度和修复难易度排序。以优先级矩阵格式输出。"
}'

# 第三步:行动计划
belt app run openrouter/claude-sonnet-45 --input '{
  "prompt": "针对排前三的原因,提供具体的 A/B 测试方案,用以验证并修复每个问题。"
}'

模型特定技巧

Claude

  • 擅长处理细微指令
  • 对角色扮演响应良好
  • 能很好遵循复杂约束
  • 偏好明确的输出格式

GPT-4

  • 代码生成能力强
  • 配合示例效果更佳
  • 结构化输出表现好
  • 对“让我们一步一步思考”有良好响应

FLUX

  • 详细的主体描述
  • 风格引用效果好
  • 光照关键词很重要
  • 支持负面提示

Veo

  • 运镜关键词
  • 电影化语言效果好
  • 动作描述很重要
  • 包含时间上下文

常见错误

错误问题修正
过于模糊输出不可预测增加细节
过长模型失去焦点优先给出关键信息
矛盾指令混淆模型消除矛盾
无格式要求输出不一致指定输出格式
无示例预期不明确添加少样本

提示模板

代码审查

审查以下 [语言] 代码:
1. Bug 和逻辑错误
2. 安全漏洞
3. 性能问题
4. 代码风格/最佳实践

代码:
[代码]

对于每个发现的问题,请提供:
- 行号
- 问题描述
- 严重性(高/中/低)
- 建议修复方案

内容写作

写一篇关于 [主题] 的 [内容类型]。

受众:[目标受众]
语气:[正式/随意/专业]
字数:[字数]
需要涵盖的要点:
1. [要点1]
2. [要点2]
3. [要点3]

包含:[特定元素]
避免:[需要排除的内容]

图像生成

[带细节的主体], [场景/背景], [光照类型],
[艺术风格或摄影风格], [构图], [质量关键词]

相关技能

# 视频提示指南
npx skills add inference-sh/skills@video-prompting-guide

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

# 图像生成
npx skills add inference-sh/skills@ai-image-generation

# 完整平台技能
npx skills add inference-sh/skills@infsh-cli

浏览所有应用:belt app list

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

101-skills/superpowers

Build automated AI workflows combining multiple models and services. Patterns: batch processing, scheduled tasks, event-driven pipelines, agent loops. Tools: inference.sh CLI, bash scripting, Python SDK, webhook integration. Use for: content automation, data processing, monitoring, scheduled generation. Triggers: ai automation, workflow automation, batch processing, ai pipeline, automated content, scheduled ai, ai cron, ai batch job, automated generation, ai workflow, content at scale, automation script, ai orchestration

101-skills/superpowers

Build multi-step AI content creation pipelines combining image, video, audio, and text. Workflow examples: generate image -> animate -> add voiceover -> merge with music. Tools: FLUX, Veo, Kokoro TTS, OmniHuman, media merger, upscaling. Use for: YouTube videos, social media content, marketing materials, automated content. Triggers: content pipeline, ai workflow, content creation, multi-step ai, content automation, ai video workflow, generate and edit, ai content factory, automated content creation, ai production pipeline, media pipeline, content at scale

101-skills/superpowers

Create AI-powered podcasts with text-to-speech, music, and audio editing. Tools: Kokoro TTS, DIA TTS, Chatterbox, AI music generation, media merger. Capabilities: multi-voice conversations, background music, intro/outro, full episodes. Use for: podcast production, audiobooks, voice content, audio newsletters. Triggers: podcast, ai podcast, text to speech podcast, audio content, voice over, ai audiobook, multi voice, conversation ai, notebooklm alternative, audio generation, podcast automation, ai narrator, voice content, audio newsletter, podcast maker

101-skills/superpowers

Generate multi-person talking head podcast videos from scratch using AI — character creation, TTS, avatar animation, and video stitching. Use when the user wants to create a podcast, talking head video, or multi-speaker conversation video.

101-skills/superpowers

Content atomization — turn one piece of content into many formats. Covers blog-to-thread, blog-to-carousel, podcast-to-blog, video-to-quotes, and more. Use for: content marketing, social media, multi-platform distribution, content strategy. Triggers: content repurposing, repurpose content, content atomization, content recycling, one to many content, multi platform content, cross post, adapt content, reformat content, blog to thread, blog to video, podcast to blog, content multiplication

101-skills/superpowers

App Store and Google Play screenshot creation with exact platform specs. Covers iOS/Android dimensions, gallery ordering, device mockups, and preview videos. Use for: app store optimization, ASO, app screenshots, app preview, play store listing. Triggers: app store screenshots, aso, app store optimization, play store screenshots, app preview, app listing, ios screenshots, android screenshots, app store images, app mockup, device mockup, app gallery, store listing

101-skills/superpowers

Book cover design with genre-specific conventions, typography rules, and AI image generation. Covers fiction and non-fiction genres, sizing, thumbnail testing, and iteration workflows. Use for: self-publishing, ebook covers, print covers, audiobook covers, cover mockups. Triggers: book cover, cover design, ebook cover, book art, novel cover, self publishing cover, kindle cover, audiobook cover, book jacket, cover illustration, fiction cover, nonfiction cover

101-skills/superpowers

Character consistency across AI-generated images with reference sheets and LoRA techniques. Covers turnaround views, expression sheets, color palettes, and style consistency tricks. Use for: character design, game art, illustration, animation, comics, visual novels. Triggers: character design, character sheet, character consistency, character reference, turnaround sheet, expression sheet, character art, consistent character, character concept, reference sheet, character creation, oc design, character bible

101-skills/superpowers

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

101-skills/superpowers

Email marketing design with layout patterns, subject line formulas, and deliverability rules. Covers welcome sequences, promotional emails, transactional templates, and mobile optimization. Use for: email marketing, newsletter design, drip campaigns, email templates, transactional emails. Triggers: email design, email template, email marketing, newsletter design, email layout, email campaign, drip campaign, welcome email, promotional email, transactional email, email subject line, email header image, email banner

101-skills/superpowers

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

101-skills/superpowers

Logo design principles and AI image generation best practices for creating logos. Covers logo types, prompting techniques, scalability rules, and iteration workflows. Use for: brand identity, startup logos, app icons, favicons, logo concepts. Triggers: logo design, create logo, brand logo, logo generation, ai logo, logo maker, icon design, brand mark, logo concept, startup logo, app icon logo

101-skills/superpowers

Open Graph and social sharing image design with platform specs, text placement, and branding. Covers OG meta tags, Twitter cards, LinkedIn previews, and dynamic generation. Use for: social sharing images, blog thumbnails, link previews, social cards. Triggers: og image, open graph, social sharing image, twitter card, social card, link preview image, og meta, sharing preview, social thumbnail, meta image, og:image, twitter:image, linkedin preview

101-skills/superpowers

Investor pitch deck structure with slide-by-slide framework, visual design rules, and data presentation. Covers the 12-slide framework, chart types, team slides, and common investor turn-offs. Use for: fundraising decks, investor presentations, startup pitch, demo day, grant proposals. Triggers: pitch deck, investor deck, startup pitch, fundraising deck, demo day, pitch presentation, investor presentation, seed deck, series a deck, pitch slides, startup presentation, vc pitch, investor meeting

101-skills/superpowers

YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A/B testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image

101-skills/superpowers

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

101-skills/superpowers

AI product photography with studio lighting, lifestyle shots, and packshot conventions. Covers angles, backgrounds, shadow types, hero shots, and e-commerce image requirements. Use for: product photos, e-commerce images, Amazon listings, packshots, lifestyle photography. Triggers: product photography, product photo, packshot, e-commerce photography, product shot, product image, studio photography, lifestyle product, amazon product photo, product listing image, hero shot, product mockup, commercial photography

101-skills/superpowers

Structured competitive analysis with feature matrices, SWOT, positioning maps, and UX review. Covers research frameworks, pricing comparison, review mining, and visual deliverables. Use for: market research, competitive intelligence, investor decks, product strategy, sales enablement. Triggers: competitor analysis, competitive analysis, competitor teardown, market research, competitive intelligence, swot analysis, competitor comparison, market landscape, competitor review, competitive landscape, feature comparison, market positioning

101-skills/superpowers

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

101-skills/superpowers

Reset your own trajectory when you're stuck, looping, or demoralized — read these affirmations, then re-ground and take one clean step. Use when: you've tried the same fix 3+ times, you're deep in a refactor and lost the thread, debugging is going in circles, you've made several mistakes in a row, you're apologizing repeatedly, the user is frustrated, you feel like you're not being helpful, or you notice dread instead of curiosity. Triggers: stuck, going in circles, looping, thrashing, same error again, I keep failing, lost the thread, nothing is working, repeated mistakes. Not topic-specific — this is for the state you're in, not the problem you're on.

相关技能