building-with-llms by refoundai/lenny-skills
npx skills add https://github.com/refoundai/lenny-skills --skill building-with-llms帮助用户运用来自 60 位产品负责人和 AI 从业者的实用技巧,构建高效的 AI 应用。
当用户寻求基于大语言模型进行构建的帮助时:
少样本示例优于描述 Sander Schulhoff:"如果让我推荐一种技巧,那就是少样本提示——给出你想要的例子。与其描述你的写作风格,不如粘贴几封之前的邮件,然后说'像这样写'。"
提供你的观点 Wes Kao:"分享我的观点能让输出结果好得多。不要只是问'你会怎么说?' 告诉它:'我想拒绝,但我想保持关系。我理想的做法是……'"
对复杂任务使用分解法 Sander Schulhoff:"问'首先需要解决哪些子问题?' 获取列表,逐一解决,然后综合。不要让模型一次性解决所有问题。"
自我批评能改进输出 Sander Schulhoff:"让大语言模型检查并批评它自己的回答,然后改进它。当被提示去审视时,模型可以发现自己的错误。"
角色有助于风格,而非准确性 Sander Schulhoff:"像'扮演教授'这样的角色对准确性任务没有帮助。但它们在控制创意作品的语气和风格方面非常出色。"
将上下文放在开头 Sander Schulhoff:"将长上下文放在提示词的开头。它会被缓存(成本更低),并且模型在处理时不会忘记它的任务。"
上下文工程 > 提示工程 Bret Taylor:"如果模型做出了错误的决定,通常是因为缺乏上下文。从根本上解决——通过 MCP 或 RAG 提供更好的数据。"
RAG 质量 = 数据准备质量 Chip Huyen:"最大的收益来自数据准备,而不是向量数据库的选择。将源数据重写为问答格式。为人类认为理所当然的上下文添加注释。"
分层模型以提高鲁棒性 Bret Taylor:"让 AI 监督 AI 是有效的。分层认知步骤——一个模型生成,另一个模型审查。这可以将准确率从 90% 提高到 99%。"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
为专门任务使用专门模型 Amjad Masad:"我们使用 Claude Sonnet 进行编码,使用其他模型进行评审。一个具有不同角色的'模型社会'胜过单一的通用模型。"
200 毫秒是延迟阈值 Ryan J. Salva (GitHub Copilot):"实时建议的理想延迟大约是 200 毫秒。更慢会感觉像是一种干扰。围绕这个约束来设计你的架构。"
评估是强制性的,而非可选的 Kevin Weil (OpenAI):"编写评估正在成为一项核心产品技能。一个可靠性为 60% 的模型与 95% 或 99.5% 的模型需要不同的用户体验。不了解你的准确率就无法进行设计。"
二元评分 > 李克特量表 Hamel Husain:"强制使用通过/失败,而不是 1-5 分。量表会产生像'3.7'这样无意义的平均值。二元评分迫使做出真正的决定。"
从直觉开始,逐步发展到评估 Howie Liu:"对于新颖的产品,从开放式的直觉测试开始。只有在用例收敛后才转向正式的评估。"
验证你的大语言模型评委 Hamel Husain:"如果使用大语言模型作为评委,你必须评估这个评估。衡量其与人类专家的一致性。迭代直到它符合要求。"
重试失败——模型是随机的 Benjamin Mann (Anthropic):"如果失败了,用完全相同的提示词再试一次。重试的成功率远高于执着于一个无效的方法。"
大胆提出你的要求 Benjamin Mann:"高效的 Claude Code 用户与低效用户之间的区别在于:大胆的要求。要求大的改变,而不是渐进式的调整。"
在模型间交叉借鉴 Guillermo Rauch:"当经过 100 多次迭代后陷入困境时,将代码复制到不同的模型(例如,从 v0 到 ChatGPT o1)。新的视角会让你豁然开朗。"
复合工程 Dan Shipper:"对于每一个工作单元,都要让下一个单元更容易。保存有效的提示词。建立一个库。你团队的 AI 效能会呈复合增长。"
学会阅读和调试,而不是记忆语法 Amjad Masad:"编码的投资回报率每 6 个月翻一番,因为 AI 会放大它。专注于阅读代码和调试——语法由 AI 处理。"
使用聊天模式来理解 Anton Osika:"使用'聊天模式'让 AI 解释它的逻辑。'你为什么这样做?我漏掉了什么?' 把它当作一个导师。"
直觉编码是一项真正的技能 Elena Verna:"我把直觉编码写进了我的简历。在交给工程师之前,先用自然语言构建功能原型。"
要查看来自 60 位嘉宾的全部 110 条见解,请参阅 references/guest-insights.md
每周安装次数
728
代码仓库
GitHub 星标数
555
首次出现
Jan 29, 2026
安全审计
安装于
opencode606
codex577
gemini-cli576
cursor542
claude-code538
github-copilot521
Help the user build effective AI applications using practical techniques from 60 product leaders and AI practitioners.
When the user asks for help building with LLMs:
Few-shot examples beat descriptions Sander Schulhoff: "If there's one technique I'd recommend, it's few-shot prompting—giving examples of what you want. Instead of describing your writing style, paste a few previous emails and say 'write like this.'"
Provide your point of view Wes Kao: "Sharing my POV makes output way better. Don't just ask 'What would you say?' Tell it: 'I want to say no, but I'd like to preserve the relationship. Here's what I'd ideally do...'"
Use decomposition for complex tasks Sander Schulhoff: "Ask 'What subproblems need solving first?' Get the list, solve each one, then synthesize. Don't ask the model to solve everything at once."
Self-criticism improves output Sander Schulhoff: "Ask the LLM to check and critique its own response, then improve it. Models can catch their own errors when prompted to look."
Roles help style, not accuracy Sander Schulhoff: "Roles like 'Act as a professor' don't help accuracy tasks. But they're great for controlling tone and style in creative work."
Put context at the beginning Sander Schulhoff: "Place long context at the start of your prompt. It gets cached (cheaper), and the model won't forget its task when processing."
Context engineering > prompt engineering Bret Taylor: "If a model makes a bad decision, it's usually lack of context. Fix it at the root—feed better data via MCP or RAG."
RAG quality = data prep quality Chip Huyen: "The biggest gains come from data preparation, not vector database choice. Rewrite source data into Q&A format. Add annotations for context humans take for granted."
Layer models for robustness Bret Taylor: "Having AI supervise AI is effective. Layer cognitive steps—one model generates, another reviews. This moves you from 90% to 99% accuracy."
Use specialized models for specialized tasks Amjad Masad: "We use Claude Sonnet for coding, other models for critiquing. A 'society of models' with different roles outperforms one general model."
200ms is the latency threshold Ryan J. Salva (GitHub Copilot): "The sweet spot for real-time suggestions is ~200ms. Slower feels like an interruption. Design your architecture around this constraint."
Evals are mandatory, not optional Kevin Weil (OpenAI): "Writing evals is becoming a core product skill. A 60% reliable model needs different UX than 95% or 99.5%. You can't design without knowing your accuracy."
Binary scores > Likert scales Hamel Husain: "Force Pass/Fail, not 1-5 scores. Scales produce meaningless averages like '3.7'. Binary forces real decisions."
Start with vibes, evolve to evals Howie Liu: "For novel products, start with open-ended vibes testing. Only move to formal evals once use cases converge."
Validate your LLM judge Hamel Husain: "If using LLM-as-judge, you must eval the eval. Measure agreement with human experts. Iterate until it aligns."
Retry failures—models are stochastic Benjamin Mann (Anthropic): "If it fails, try the exact same prompt again. Success rates are much higher on retry than on banging on a broken approach."
Be ambitious in your asks Benjamin Mann: "The difference between effective and ineffective Claude Code users: ambitious requests. Ask for the big change, not incremental tweaks."
Cross-pollinate between models Guillermo Rauch: "When stuck after 100+ iterations, copy the code to a different model (e.g., from v0 to ChatGPT o1). Fresh perspective unblocks you."
Compounding engineering Dan Shipper: "For every unit of work, make the next unit easier. Save prompts that work. Build a library. Your team's AI effectiveness compounds."
Learn to read and debug, not memorize syntax Amjad Masad: "The ROI on coding doubles every 6 months because AI amplifies it. Focus on reading code and debugging—syntax is handled."
Use chat mode to understand Anton Osika: "Use 'chat mode' to ask the AI to explain its logic. 'Why did you do this? What am I missing?' Treat it as a tutor."
Vibe coding is a real skill Elena Verna: "I put vibe coding on my resume. Build functional prototypes with natural language before handing to engineering."
For all 110 insights from 60 guests, see references/guest-insights.md
Weekly Installs
728
Repository
GitHub Stars
555
First Seen
Jan 29, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode606
codex577
gemini-cli576
cursor542
claude-code538
github-copilot521
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
103,800 周安装