npx skills add https://github.com/inferen-sh/skills --skill prompt-engineering通过 inference.sh CLI 掌握 AI 模型的提示工程。

需要 inference.sh CLI (
infsh)。安装说明
infsh login
# 结构良好的 LLM 提示
infsh 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."
}'
[角色/上下文] + [任务] + [约束] + [输出格式]
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."
}'
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 差:模糊
"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."
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."
}'
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?"
}'
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."
}'
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]"
}'
[主体] + [风格] + [构图] + [光线] + [技术细节]
# 差:模糊
"a cat"
# 好:具体
infsh app run falai/flux-dev --input '{
"prompt": "A fluffy orange tabby cat with green eyes, sitting on a vintage leather armchair"
}'
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"
}'
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"
}'
photorealistic, 8K, ultra detailed, sharp focus, professional,
masterpiece, high quality, best quality, intricate details
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"
}'
[镜头类型] + [主体] + [动作] + [场景] + [风格]
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"
}'
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"
}'
slow motion, timelapse, real-time, smooth motion,
continuous shot, quick cuts, frozen moment
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."
}'
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}"
}'
# 从宽泛开始
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"
}'
# 第一轮:分析
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."
}'
| 错误 | 问题 | 修复方法 |
|---|---|---|
| 过于模糊 | 输出不可预测 | 添加具体细节 |
| 过长 | 模型失去焦点 | 优先处理关键信息 |
| 相互矛盾 | 使模型困惑 | 移除矛盾之处 |
| 无格式 | 输出不一致 | 指定格式 |
| 无示例 | 期望不明确 | 添加少量示例 |
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
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]
[Subject with details], [setting/background], [lighting type],
[art style or photography style], [composition], [quality keywords]
# 视频提示指南
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
浏览所有应用:infsh app list
每周安装量
7.3K
代码仓库
GitHub 星标数
202
首次出现
14 天前
安全审计
安装于
claude-code5.8K
gemini-cli5.2K
codex5.2K
opencode5.2K
amp5.2K
kimi-cli5.2K
Master prompt engineering for AI models via inference.sh CLI.

Requires inference.sh CLI (
infsh). Install instructions
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\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."
}'
[Role/Context] + [Task] + [Constraints] + [Output Format]
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."
}'
# 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."
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."
}'
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?"
}'
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."
}'
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]"
}'
[Subject] + [Style] + [Composition] + [Lighting] + [Technical]
# Bad: vague
"a cat"
# Good: specific
infsh app run falai/flux-dev --input '{
"prompt": "A fluffy orange tabby cat with green eyes, sitting on a vintage leather armchair"
}'
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"
}'
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"
}'
photorealistic, 8K, ultra detailed, sharp focus, professional,
masterpiece, high quality, best quality, intricate details
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"
}'
[Shot Type] + [Subject] + [Action] + [Setting] + [Style]
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"
}'
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"
}'
slow motion, timelapse, real-time, smooth motion,
continuous shot, quick cuts, frozen moment
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."
}'
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}"
}'
# Start broad
infsh app run falai/flux-dev --input '{
"prompt": "A castle on a hill"
}'
# Add specifics
infsh app run falai/flux-dev --input '{
"prompt": "A medieval stone castle on a grassy hill"
}'
# Add style
infsh 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
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"
}'
# First: analyze
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."
}'
# Second: prioritize
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."
}'
# Third: action plan
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."
}'
| 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 |
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
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]
[Subject with details], [setting/background], [lighting type],
[art style or photography style], [composition], [quality keywords]
# 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: infsh app list
Weekly Installs
7.3K
Repository
GitHub Stars
202
First Seen
14 days ago
Security Audits
Gen Agent Trust HubPassSocketWarnSnykPass
Installed on
claude-code5.8K
gemini-cli5.2K
codex5.2K
opencode5.2K
amp5.2K
kimi-cli5.2K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装