项目简介
Claude 菜谱提供可复制的代码片段和指南,涵盖 RAG、工具使用、多模态等能力,以及提示缓存等高级技术,帮助开发者集成 Claude。
README 预览
# Claude Cookbooks\n\nThe Claude Cookbooks provide code and guides designed to help developers build with Claude, offering copy-able code snippets that you can easily integrate into your own projects.\n\n## Prerequisites\n\nTo make the most of the examples in this cookbook, you'll need a Claude API key (sign up for free [here](https://www.anthropic.com)).\n\nWhile the code examples are primarily written in Python, the concepts can be adapted to any programming language that supports interaction with the Claude API.\n\nIf you're new to working with the Claude API, we recommend starting with our [Claude API Fundamentals course](https://github.com/anthropics/courses/tree/master/anthropic_api_fundamentals) to get a solid foundation.\n\n## Explore Further\n\nLooking for more resources to enhance your experience with Claude and AI assistants? Check out these helpful links:\n\n- [Anthropic developer documentation](https://docs.claude.com/claude/docs/guide-to-anthropics-prompt-engineering-resources)\n- [Anthropic support docs](https://support.anthropic.com)\n- [Anthropic Discord community](https://www.anthropic.com/discord)\n\n## Contributing\n\nThe Claude Cookbooks thrives on the contributions of the developer community. We value your input, whether it's submitting an idea, fixing a typo, adding a new guide, or improving an existing one. By contributing, you help make this resource even more valuable for everyone.\n\nTo avoid duplication of efforts, please review the existing issues and pull requests before contributing.\n\nIf you have ideas for new examples or guides, share them on the [issues page](https://github.com/anthropics/anthropic-cookbook/issues).\n\n## Table of recipes\n\n### Capabilities\n- [Classification](https://github.com/anthropics/anthropic-cookbook/tree/main/capabilities/classification): Explore techniques for text and data classification using Claude.\n- [Retrieval Augmented Generation](https://github.com/anthropics/anthropic-cookbook/tree/main/capabili
常见问题 (2)
操作指南如何从API调用预构建或自定义的Claude Skills?
需要通过API调用技能时,如果是自定义技能,首先使用client.beta.skills.create(name, instructions, ...)创建它。对于预构建技能如canvas-design,在Skills UI中找到其名称并直接使用。然后在消息中通过将技能名称传递给skills数组来调用该技能。示例:client.beta.messages.create(model='claude-sonnet-4-20250514', max_tokens=1024, skills=['canvas-design'], messages=[...])。如果遇到500错误,请确保你的API密钥具有Skills beta访问权限,几分钟后重试;如果问题仍然存在,请提供请求ID联系支持团队。
故障排除如何修复 GitHub notebook 渲染错误 "Using nbformat v5.10.4 and nbconvert v7.17.1"?
这是 GitHub 端的 notebook 渲染问题,与您的 .ipynb 文件或仓库无关。请等待 GitHub 修复渲染器,稍后重试。作为变通方法,您可以使用 JupyterLab/VS Code 在本地打开该 notebook,将其公开 URL 粘贴到 [nbviewer](https://nbviewer.org/),或者使用 jupyter nbconvert --to html calculator_tool.ipynb 在本地进行转换。在 GitHub 渲染不可用期间,您还可以使用原始文件 URL 或 Google Colab 来查看该 notebook。