> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 生成团队专用的 Devin 上手指南

export const UseCaseHero = ({title, description, prompt, category, features, devinUrl, agent, intent, playbookId, type}) => {
  const encodedPrompt = encodeURIComponent(prompt || '');
  const tag = 'docs-use-case-gallery';
  const utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=hero-cta';
  const agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  const devinHref = type === 'schedule' ? 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + (prompt ? '&prompt=' + encodedPrompt : '') : type === 'review' ? 'https://app.devin.ai/review?' + utm : agent === 'ada' ? 'https://app.devin.ai/search?' + utm + '&noSubmit=true' + (prompt ? '&prompt=' + encodedPrompt : '') : devinUrl ? devinUrl.includes('?') ? devinUrl + '&' + utm + agentParams : devinUrl + '?' + utm + agentParams : prompt ? 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encodedPrompt : 'https://app.devin.ai/?' + utm + agentParams;
  const buttonLabel = type === 'schedule' ? 'Schedule in Devin ↗' : type === 'review' ? 'Set Up Devin Review ↗' : agent === 'advanced' ? 'Try in Devin ↗' : agent === 'dana' ? 'Try in Dana ↗' : agent === 'ada' ? 'Try in Ask Devin ↗' : 'Try in Devin ↗';
  const featureList = features ? features.split(',').map(f => f.trim()) : [];
  return <div className="uc-hero">
      <div className="uc-hero-inner">
        <div className="uc-hero-left">
          <h1 className="uc-hero-title">{title}</h1>
          <p className="uc-hero-desc">{description}</p>
          <div>
            <a href={devinHref} target="_blank" rel="noopener noreferrer" className="try-in-devin-btn">
              {buttonLabel}
            </a>
          </div>
        </div>
        <div className="uc-hero-meta">
          <div className="uc-meta-item">
            <span className="uc-meta-label">Author</span>
            <span className="uc-meta-value">Cognition</span>
          </div>
          <div className="uc-meta-item">
            <span className="uc-meta-label">Category</span>
            <span className="uc-meta-value">{category}</span>
          </div>
          {featureList.length > 0 && <div className="uc-meta-item">
              <span className="uc-meta-label">Features</span>
              <span className="uc-meta-value">{featureList.join(', ')}</span>
            </div>}
        </div>
      </div>
    </div>;
};

export const PromptBlock = ({children, type, agent, intent, playbookId}) => {
  var utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=prompt-block';
  var tag = 'docs-use-case-gallery';
  var agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  var label = type === 'schedule' ? 'Schedule in Devin' : type === 'playbook' ? 'Create Playbook' : type === 'knowledge' ? 'Add to Knowledge' : agent === 'advanced' ? 'Try in Devin' : agent === 'dana' ? 'Try in Dana' : agent === 'ada' ? 'Try in Ask Devin' : 'Try in Devin';
  var buildUrl = function (text) {
    var encoded = encodeURIComponent(text);
    if (type === 'schedule') return 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + '&prompt=' + encoded;
    if (type === 'playbook') return 'https://app.devin.ai/settings/playbooks/create?' + utm + '&body=' + encoded;
    if (type === 'knowledge') return 'https://app.devin.ai/knowledge?' + utm + '&body=' + encoded;
    if (agent === 'ada') return 'https://app.devin.ai/search?' + utm + '&noSubmit=true&prompt=' + encoded;
    return 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encoded;
  };
  const ref = React.useRef(null);
  const [href, setHref] = React.useState('#');
  React.useEffect(() => {
    if (!ref.current) return;
    var codeEl = ref.current.querySelector('pre code');
    if (codeEl) {
      var text = codeEl.textContent.trim();
      if (text) setHref(buildUrl(text));
    }
    var header = ref.current.querySelector('[data-component-part="code-block-header"]');
    if (header && !header.querySelector('.prompt-block-devin-link')) {
      var link = document.createElement('a');
      link.href = href;
      link.target = '_blank';
      link.rel = 'noopener noreferrer';
      link.className = 'prompt-block-devin-link';
      link.style.cssText = 'display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:#fff;font-size:11px;font-weight:500;padding:4px 10px;border-radius:6px;white-space:nowrap;background:#317CFF;transition:background 0.2s;margin-left:8px;';
      link.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg> ' + label;
      link.onmouseenter = function () {
        link.style.background = '#2968D9';
      };
      link.onmouseleave = function () {
        link.style.background = '#317CFF';
      };
      header.appendChild(link);
    }
    var existingLink = ref.current.querySelector('.prompt-block-devin-link');
    if (existingLink && href !== '#') existingLink.href = href;
  });
  return <div className="prompt-block" ref={ref}>{children}</div>;
};

<UseCaseHero title="生成面向团队的 Devin 入门指南" description="Devin 会阅读自己的文档，并生成一份根据你团队的技术栈、集成和工作流程量身定制的入门指南，可直接在 Notion 或 Slack 中分享。" prompt="阅读 Devin 的文档，并为我们的工程团队创建一份入门指南。重点涵盖：从 Slack 启动会话、编写有效的提示、配置 Linear 和 GitHub 集成、创建操作手册（playbook），以及管理 Knowledge。示例请针对 Node.js/React 技术栈进行定制。将其格式化为一个我们可以在 #engineering 频道中分享的 Notion 页面。" category="Devin 优化" features="MCP" />

<div className="uc-detail-wrapper">
  <Tip>不想手动设置？将本页链接粘贴到 Devin 会话中，让它为你完成所有设置。</Tip>

  <Steps>
    <Step title="让 Devin 为你生成指南">
      Devin 通过 [Devin Docs MCP](/zh/work-with-devin/devin-mcp) 内置了对自身文档的访问能力——无需任何设置或配置。它可以按需搜索和阅读完整文档站点、API 参考、变更日志以及最佳实践。

      与其给新工程师发一长串文档链接，不如让 Devin 将你团队真正需要的内容提炼成一份统一的入职指南，其中包含针对你技术栈定制的提示词、工作流和示例。

      <PromptBlock>
        ```txt Generate a team-specific onboarding guide theme={null}
        阅读 Devin 文档，并为我们的工程团队创建一份「快速上手」指南。该指南应涵盖：

        1. 如何开始一次会话（Slack 与 Web 应用——各自的使用场景）
        2. 如何编写高效的提示词（包括文件路径、错误上下文、任务范围）
        3. 如何设置我们的 Linear 集成，以支持基于工单驱动的工作流
        4. 如何为我们反复进行的 Express 到 Fastify 迁移创建 playbook
        5. 如何为我们的代码库约定添加 Knowledge 条目
           （例如：“所有 API 路由都在 src/routes/ 中，运行 npm run test:api”）

        将每个示例都针对我们的技术栈进行定制：Node.js、React、PostgreSQL。
        将输出格式化为一页可直接粘贴到 #engineering 的 Notion 页面。
        ```
      </PromptBlock>
    </Step>

    <Step title="查看已生成的指南">
      Devin 会针对每个主题搜索自身文档，阅读相关页面，并综合生成一份与您的技术栈和工作流程相匹配的完整上手指南。以下是输出结果示例：

      ```markdown theme={null}
      # Devin 入门指南 — Acme 工程团队

      ## 1. 开始会话
      | 方式 | 使用场景 | 示例 |
      |--------|-------------|--------|
      | **Slack** — 发消息给 @Devin | 快速、范围明确的任务 | "修复 api-service 中失败的 CI" |
      | **Web 应用** — app.devin.ai | 需要附件或 Playbook 的较长任务 | 附上迁移 Playbook 和规范文件 |

      ## 2. 编写有效的提示词
      Devin 在收到具体、范围明确的请求时效果最佳。请务必包含
      文件路径、问题所在以及问题开始出现的时间。

      ❌ "修复登录 bug"
      ✅ "自周五 JWT 密钥轮换后，src/pages/Login.tsx 中的登录表单对有效
         凭据返回 401 错误。请检查 src/middleware/auth.ts 中的
         认证中间件。"

      ## 3. Linear 集成
      前往 设置 > 连接 > Linear 并进行授权。连接后，
      Devin 可以：
      - 自动接取分配给它的工单
      - 在处理过程中更新工单状态
      - 将 PR 关联到原始 Linear 工单

      查看完整设置指南：docs.devin.ai/integrations/linear

      ## 4. 用于重复任务的 Playbook
      在 设置 > Playbooks > 新建 中创建可复用的提示词。
      对于我们的 Express 到 Fastify 迁移，Playbook 应包含：
      - 目标模块路径（例如 src/services/payments/）
      - 测试命令：npm run test:api && npm run test:integration
      - 若迁移导致下游消费者出现问题时的回滚步骤

      ## 5. 知识库 — 教导 Devin 我们的规范
      在 设置 > 知识库 > 创建知识 中添加团队规范。

      示例条目：
        触发词："处理 API 路由时"
        内容："我们使用 Fastify，而非 Express。所有路由位于
        src/routes/。提交前请运行 npm run test:api。
        错误响应必须使用 src/lib/errors.ts 中的 ApiError 类。"
      ```
    </Step>

    <Step title="通过后续提问扩展本指南">
      保持同一个会话处于打开状态 — Devin 会保留上下文，并且可以在此基础上为指南扩展更多章节。

      <PromptBlock>
        ```txt Add a prompt templates section theme={null}
        在指南中新增一个章节：“Copy-Paste Prompt Templates.”
        包含 6 个可供我们团队在常见任务中复用的模板：
        bug 修复、功能实现、测试覆盖率、数据库
        迁移、依赖升级以及 CI 调试。
        每个模板都应包含诸如 [file path]、
        [error message] 和 [ticket link] 之类的占位符。
        ```
      </PromptBlock>

      <PromptBlock>
        ```txt Add a "What's New" section from the changelog theme={null}
        阅读 Devin 发布说明，并在指南中新增一个 “What's New” 章节，
        涵盖过去一个月发布的功能。
        重点标出任何会改变我们使用 playbooks、
        计划会话或 API 方式的内容。
        ```
      </PromptBlock>

      <PromptBlock>
        ```txt Add a Knowledge vs. Playbooks decision table theme={null}
        在指南中新增一个章节，说明何时使用 Knowledge
        以及何时使用 Playbooks。包含一个对比表，以及 3 个来自 Node.js 项目的具体
        示例，展示每种场景下哪一个更合适。
        ```
      </PromptBlock>
    </Step>

    <Step title="分享本指南并保持其最新状态">
      在你对这份指南满意后，将其分享出来，并将其保存为 [Knowledge](/zh/product-guides/knowledge)，这样 Devin 就可以参考你团队的约定：

      1. **分享这份指南** — 将 Notion 页面粘贴到你的 `#engineering` 频道，或将其在团队 wiki 中置顶
      2. **将其保存为 Knowledge** — 前往 **Settings > Knowledge > Create knowledge**，将触发条件设为 `"onboarding new team members to Devin"`，粘贴指南内容，并将其置顶到 **所有代码仓库 (all repositories) **

      现在，当任何团队成员问 Devin “how should I write prompts?” 或 “how do I connect Linear?” 时，它会从你自定义的指南中获取答案，而不是通用文档。

      随着 Devin 发布新功能，请让它按相同的对话格式更新这份指南：*“Read the latest [changelog](/zh/release-notes/overview) and update our onboarding guide with any new features that affect our workflows.”*
    </Step>
  </Steps>
</div>
