跳转到主要内容
把 agent 想象成一个需要你指引才能完成任务的 AI 助手。向它提供清晰的指令和充分的上下文。任务越聚焦,就越容易完成,因此要将复杂项目拆解为更小的步骤。

让提示更具体,并聚焦在结果上

@mintlify Improve the onboarding page 这样泛泛的提示只会应用一些通用的最佳实践,但可能无法按照你预想的方式,针对性地改进内容。 尝试围绕你希望用户达成的结果,或他们遇到的具体问题来编写提示。
  • @mintlify A lot of users have trouble installing the CLI. Review the onboarding page and update the docs so that users can easily install the CLI
  • @mintlify Developers keep getting 401 errors when following our authentication guide. Review the auth docs and add clearer examples showing how to properly format the API key

针对维护任务使用更通用的提示

对于常规的文档内容维护(例如修复拼写错误、更新重定向,或在整个文档中重命名某个功能),请使用更通用的提示。
  • @mintlify Find and fix all typos in the docs
  • @mintlify change all unordered lists to use * instead of -

为多站点组织指定 domain 名称

如果你有多个文档站点,请在消息中包含 subdomain 参数,以指定智能助手应处理哪一组文档。 要找到你的 domain 名称,请查看你想更新的那组文档在控制台中的 URL。domain 名称是组织名称之后的最后一部分。比如,如果你的控制台 URL 是 https://dashboard.mintlify.com/org-name/domain-name,那么你的 domain 名称就是 domain-name 使用 @mintlify subdomain=<your-domain-name> <your-prompt> 这种格式来指示智能助手在特定的一组文档上工作。
  • @mintlify subdomain=public-docs Add a new section to the quickstart about inviting collaborators based on this PR:指示智能助手只更新 public-docs 站点中的 quickstart。
  • @mintlify subdomain=customer-docs Update the auth docs for the new authentication method:指示智能助手只更新 customer-docs 站点中的认证文档。