cyrus-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cyrus Setup

Cyrus 搭建指南

One-command setup for self-hosted Cyrus. This orchestrator walks you through everything needed to run Claude Code as a background agent from Linear, Slack, and GitHub.
一键搭建自托管Cyrus。该编排工具将引导你完成所有必要步骤,让Claude Code作为后台Agent,从Linear、Slack和GitHub中接收任务。

CRITICAL Rules

核心规则

Never Read or Write ~/.cyrus/.env Directly

切勿直接读取或写入~/.cyrus/.env

FORBIDDEN: Do NOT use
Read
,
Edit
, or
Write
tools on
~/.cyrus/.env
or any file inside
~/.cyrus/
. This file contains secrets (API keys, tokens, signing secrets). All interaction with this file MUST go through
Bash
commands (
grep
,
printf >> ...
, etc.) which the user can see and approve. Never read its contents into the conversation context.
禁止操作: 不要使用
Read
Edit
Write
工具直接操作
~/.cyrus/.env
~/.cyrus/
目录下的任何文件。该文件包含敏感信息(API密钥、令牌、签名密钥)。所有与该文件的交互必须通过
Bash
命令(如
grep
printf >> ...
等)进行,且这些命令需由用户查看并确认。绝对不要将其内容读取到对话上下文当中。

Browser Automation

浏览器自动化

The goal of browser automation in this skill is to reduce sign-in and setup fatigue — the agent navigates web UIs, fills forms, and scrapes credentials so the user doesn't have to do it all manually.
Three modes, in order of preference:
  1. claude-in-chrome
    (preferred when available) — if the user is running Claude Code and has the
    claude-in-chrome
    MCP extension connected, use it. This has the huge advantage of using the user's existing Chrome with all their signed-in sessions (Linear, Slack, GitHub). Check availability by seeing if
    mcp__claude-in-chrome__*
    tools exist.
  2. agent-browser
    CLI
    — a standalone Playwright-based binary invoked via
    Bash
    . Requires launching a fresh Chrome profile with remote debugging enabled (the user will need to sign in to services in that profile). Check with
    which agent-browser
    .
  3. Manual guided flow — the user follows the agent's step-by-step instructions and does the clicks themselves. Always available as Path B in each sub-skill.
Determining which mode to use:
  1. First, check if
    claude-in-chrome
    MCP tools are available in the current session. If yes, use those — no setup needed.
  2. If not, check
    which agent-browser
    . If installed, launch a fresh Chrome profile (see below).
  3. If neither is available, ask the user: install
    agent-browser
    , or follow manual instructions?
agent-browser
setup — fresh Chrome profile:
agent-browser
needs a Chrome instance with remote debugging enabled. Launch one with an isolated profile:
bash
undefined
本技能中浏览器自动化的目标是减少登录和设置的繁琐操作——Agent会导航网页UI、填写表单并提取凭证,无需用户手动完成全部流程。
优先顺序的三种模式:
  1. claude-in-chrome
    (优先使用,如果可用)——如果用户正在运行Claude Code且已连接
    claude-in-chrome
    MCP扩展,则使用该模式。其最大优势是可以利用用户已登录所有服务(Linear、Slack、GitHub)的现有Chrome会话。通过检查是否存在
    mcp__claude-in-chrome__*
    工具来确认可用性。
  2. agent-browser
    CLI
    ——基于Playwright的独立二进制文件,通过
    Bash
    调用。需要启动一个全新的Chrome配置文件并启用远程调试(用户需要在该配置文件中登录各项服务)。通过
    which agent-browser
    命令检查是否已安装。
  3. 手动引导流程——用户按照Agent的分步说明自行点击操作。始终作为每个子技能的备用方案(路径B)。
如何确定使用哪种模式:
  1. 首先,检查当前会话中是否有
    claude-in-chrome
    MCP工具可用。如果有,则使用该模式——无需额外设置。
  2. 如果没有,执行
    which agent-browser
    检查是否已安装。如果已安装,则启动全新的Chrome配置文件(见下文)。
  3. 如果两者都不可用,询问用户:是安装
    agent-browser
    ,还是遵循手动说明操作?
agent-browser
设置——全新Chrome配置文件:
agent-browser
需要启用远程调试的Chrome实例。使用独立配置文件启动:
bash
undefined

Find an open port

查找可用端口

for port in $(seq 9222 9322); do if ! lsof -i :"$port" > /dev/null 2>&1; then echo "Open port found: $port" break fi done

```bash
for port in $(seq 9222 9322); do if ! lsof -i :"$port" > /dev/null 2>&1; then echo "Open port found: $port" break fi done

```bash

Create a fresh profile directory

创建新的配置文件目录

mkdir -p ~/.cyrus/chrome-profile

```bash
mkdir -p ~/.cyrus/chrome-profile

```bash

Launch Chrome with remote debugging (runs in background)

启动启用远程调试的Chrome(后台运行)

macOS:

macOS系统:

"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
--remote-debugging-port=<port>
--user-data-dir="$HOME/.cyrus/chrome-profile" &
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
--remote-debugging-port=<port>
--user-data-dir="$HOME/.cyrus/chrome-profile" &

Linux:

Linux系统:

google-chrome --remote-debugging-port=<port>
--user-data-dir="$HOME/.cyrus/chrome-profile" &

```bash
google-chrome --remote-debugging-port=<port>
--user-data-dir="$HOME/.cyrus/chrome-profile" &

```bash

Connect agent-browser to it

将agent-browser连接到该Chrome实例

agent-browser connect <port>

After connecting, commands work normally:

```bash
agent-browser navigate "https://example.com"
agent-browser click "button:text('Submit')"
agent-browser fill "#input-id" "value"
agent-browser screenshot
agent-browser eval "document.title"
Important: The user will need to sign in to Linear, Slack, and GitHub in this fresh Chrome profile before the agent can automate app creation. The agent should navigate to each service and pause for the user to sign in before proceeding with automation.
Cleanup: After setup is complete, close the Chrome instance:
bash
lsof -ti :<port> | xargs kill 2>/dev/null
agent-browser connect <port>

连接完成后,即可正常执行命令:

```bash
agent-browser navigate "https://example.com"
agent-browser click "button:text('Submit')"
agent-browser fill "#input-id" "value"
agent-browser screenshot
agent-browser eval "document.title"
重要提示: 在Agent可以自动创建应用之前,用户需要在这个全新的Chrome配置文件中登录Linear、Slack和GitHub。Agent会导航到每个服务页面,然后暂停等待用户登录,之后再继续自动化流程。
清理操作: 设置完成后,关闭Chrome实例:
bash
lsof -ti :<port> | xargs kill 2>/dev/null

How This Works

工作流程

This skill runs sub-skills in order, skipping any that are already complete. You can re-run
/cyrus-setup
at any time to add integrations or fix configuration.
本技能会按顺序运行各个子技能,跳过已完成的步骤。你可以随时重新运行
/cyrus-setup
来添加集成或修复配置。

Loading Sub-Skills

加载子技能

Each step references a sub-skill file. To execute a sub-skill, read the SKILL.md file using the
Read
tool and follow its instructions. The sub-skill files are sibling directories to this skill:
StepSub-skillFile to read
1setup-prerequisites
cyrus-setup-prerequisites/SKILL.md
(relative to skills directory)
2setup-claude-auth
cyrus-setup-claude-auth/SKILL.md
3setup-endpoint
cyrus-setup-endpoint/SKILL.md
4setup-linear
cyrus-setup-linear/SKILL.md
5setup-github
cyrus-setup-github/SKILL.md
5bsetup-gitlab
cyrus-setup-gitlab/SKILL.md
6setup-slack
cyrus-setup-slack/SKILL.md
7setup-repository
cyrus-setup-repository/SKILL.md
8setup-launch
cyrus-setup-launch/SKILL.md
To find the files, look for them relative to this file's directory (go up one level, then into the sub-skill directory). For example, if this file is at
~/.claude/skills/cyrus-setup/SKILL.md
, the sub-skills are at
~/.claude/skills/cyrus-setup-prerequisites/SKILL.md
, etc.
If a sub-skill file is not found, use
Glob
to search for it:
**/cyrus-setup-prerequisites/SKILL.md

每个步骤都会引用一个子技能文件。要执行子技能,请使用
Read
工具读取对应的SKILL.md文件并遵循其说明。子技能文件位于本技能的同级目录中:
步骤子技能需读取的文件
1依赖项设置
cyrus-setup-prerequisites/SKILL.md
(相对于技能目录)
2Claude身份验证设置
cyrus-setup-claude-auth/SKILL.md
3端点设置
cyrus-setup-endpoint/SKILL.md
4Linear集成设置
cyrus-setup-linear/SKILL.md
5GitHub集成设置
cyrus-setup-github/SKILL.md
5bGitLab集成设置
cyrus-setup-gitlab/SKILL.md
6Slack集成设置
cyrus-setup-slack/SKILL.md
7代码仓库添加
cyrus-setup-repository/SKILL.md
8启动服务
cyrus-setup-launch/SKILL.md
查找文件时,请相对于本文件的目录(向上一级,然后进入子技能目录)。例如,如果本文件位于
~/.claude/skills/cyrus-setup/SKILL.md
,则子技能文件位于
~/.claude/skills/cyrus-setup-prerequisites/SKILL.md
等路径。
如果未找到子技能文件,请使用
Glob
工具搜索:
**/cyrus-setup-prerequisites/SKILL.md

Step 0: Identity & Surface Selection

步骤0:身份与集成选择

Before anything else, collect preferences from the user. Use the
AskUserQuestion
tool if available
— ask questions interactively rather than printing them as a text block. You may bundle related questions into a single ask, or ask them one at a time.
在开始之前,先收集用户的偏好设置。如果有
AskUserQuestion
工具,请使用该工具
——以交互式方式提问,而非以文本块形式列出。你可以将相关问题合并为一次提问,或逐个提问。

Question 1: Name & Description

问题1:名称与描述

Ask the user (defaults in parentheses):
  • What would you like to name your agent? — This name appears in Linear, Slack, and GitHub integrations. (default:
    Cyrus
    )
  • Give your agent a short description — one sentence, shown in integration app listings. (default:
    AI coding agent for automated development
    )
Store as
AGENT_NAME
and
AGENT_DESCRIPTION
— used when creating Linear, Slack, and GitHub apps.
询问用户(括号内为默认值):
  • 你想给你的Agent起什么名字?——该名称会显示在Linear、Slack和GitHub的集成中。(默认:
    Cyrus
  • 给你的Agent写一段简短描述——一句话,会显示在集成应用列表中。(默认:
    AI编码Agent,用于自动化开发
将答案保存为
AGENT_NAME
AGENT_DESCRIPTION
——创建Linear、Slack和GitHub应用时会用到这些值。

Question 2: Which surfaces?

问题2:选择集成平台

Ask the user to select one or more:
  • Linear — issue tracking, recommended for most users
  • GitHub — PR comments and issues
  • GitLab — MR comments and issues
  • Slack — chat messages
At least one is required. Store the selection — it determines which integration sub-skills run (Steps 4-6).
请用户选择一个或多个平台:
  • Linear——问题追踪工具,推荐大多数用户使用
  • GitHub——PR评论与问题管理
  • GitLab——MR评论与问题管理
  • Slack——聊天消息集成
至少选择一个平台。保存用户的选择——这将决定需要运行哪些集成子技能(步骤4-6)。

Question 3: Package manager?

问题3:包管理器选择

Ask: npm, pnpm, bun, or yarn?
Store the answer — used by the prerequisites skill.

询问:使用npm、pnpm、bun还是yarn?
保存答案——依赖项设置子技能会用到该选择。

Step 1: Prerequisites

步骤1:安装依赖项

Read the
cyrus-setup-prerequisites/SKILL.md
sub-skill and follow its instructions.
Pass the user's package manager preference from Step 0.

读取
cyrus-setup-prerequisites/SKILL.md
子技能并遵循其说明。
传入步骤0中用户选择的包管理器。

Step 2: Claude Auth

步骤2:Claude身份验证配置

Read the
cyrus-setup-claude-auth/SKILL.md
sub-skill and follow its instructions.

读取
cyrus-setup-claude-auth/SKILL.md
子技能并遵循其说明。

Step 3: Webhook Endpoint

步骤3:Webhook端点配置

Read the
cyrus-setup-endpoint/SKILL.md
sub-skill and follow its instructions.

读取
cyrus-setup-endpoint/SKILL.md
子技能并遵循其说明。

Step 4: Linear (if selected)

步骤4:Linear集成(如果已选择)

Only if the user selected Linear in Step 0.
Read the
cyrus-setup-linear/SKILL.md
sub-skill and follow its instructions.

仅当用户在步骤0中选择了Linear时执行。
读取
cyrus-setup-linear/SKILL.md
子技能并遵循其说明。

Step 5: GitHub (if selected)

步骤5:GitHub集成(如果已选择)

Only if the user selected GitHub in Step 0.
Read the
cyrus-setup-github/SKILL.md
sub-skill and follow its instructions.

仅当用户在步骤0中选择了GitHub时执行。
读取
cyrus-setup-github/SKILL.md
子技能并遵循其说明。

Step 5b: GitLab (if selected)

步骤5b:GitLab集成(如果已选择)

Only if the user selected GitLab in Step 0.
Read the
cyrus-setup-gitlab/SKILL.md
sub-skill and follow its instructions.

仅当用户在步骤0中选择了GitLab时执行。
读取
cyrus-setup-gitlab/SKILL.md
子技能并遵循其说明。

Step 6: Slack (if selected)

步骤6:Slack集成(如果已选择)

Only if the user selected Slack in Step 0.
Read the
cyrus-setup-slack/SKILL.md
sub-skill and follow its instructions. All paths (A-1, A-2, and B) must use the manifest-based creation flow — never create the Slack app "from scratch" with manual scope/event configuration.

仅当用户在步骤0中选择了Slack时执行。
读取
cyrus-setup-slack/SKILL.md
子技能并遵循其说明。所有路径(A-1、A-2和B)必须使用基于清单的创建流程——绝对不要通过手动配置权限/事件的方式"从头开始"创建Slack应用。

Step 7: Add Repositories

步骤7:添加代码仓库

Read the
cyrus-setup-repository/SKILL.md
sub-skill and follow its instructions.

读取
cyrus-setup-repository/SKILL.md
子技能并遵循其说明。

Step 8: Launch

步骤8:启动服务

Read the
cyrus-setup-launch/SKILL.md
sub-skill and follow its instructions.

读取
cyrus-setup-launch/SKILL.md
子技能并遵循其说明。

Design Principles

设计原则

  1. Skip-if-done — Every sub-skill checks existing state first. Re-running
    /setup
    is safe.
  2. Secrets never enter chat — Credentials are either scraped via agent-browser or written via clipboard-to-env shell commands the user runs in their terminal.
  3. Agent writes non-secret config — Values like
    CYRUS_SERVER_PORT
    and
    LINEAR_DIRECT_WEBHOOKS
    are written directly by the agent.
  4. Browser automation when available — Uses
    agent-browser
    for Linear/Slack app creation; falls back to guided manual steps if not installed.
  5. Package manager aware — The user's choice is used consistently throughout.
  1. 已完成则跳过——每个子技能都会先检查现有状态。重新运行
    /setup
    是安全的。
  2. 敏感信息绝不进入对话——凭证要么通过agent-browser提取,要么通过用户在终端中执行的"剪贴板到环境变量"shell命令写入。
  3. Agent负责写入非敏感配置——
    CYRUS_SERVER_PORT
    LINEAR_DIRECT_WEBHOOKS
    等值由Agent直接写入。
  4. 优先使用浏览器自动化——创建Linear/Slack应用时优先使用
    agent-browser
    ;如果未安装则回退到引导式手动步骤。
  5. 适配包管理器选择——始终一致地使用用户选择的包管理器。