cyrus-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCyrus 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 , , or tools on or any file inside . This file contains secrets (API keys, tokens, signing secrets). All interaction with this file MUST go through commands (, , etc.) which the user can see and approve. Never read its contents into the conversation context.
ReadEditWrite~/.cyrus/.env~/.cyrus/Bashgrepprintf >> ...禁止操作: 不要使用、或工具直接操作或目录下的任何文件。该文件包含敏感信息(API密钥、令牌、签名密钥)。所有与该文件的交互必须通过命令(如、等)进行,且这些命令需由用户查看并确认。绝对不要将其内容读取到对话上下文当中。
ReadEditWrite~/.cyrus/.env~/.cyrus/Bashgrepprintf >> ...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:
- (preferred when available) — if the user is running Claude Code and has the
claude-in-chromeMCP 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 ifclaude-in-chrometools exist.mcp__claude-in-chrome__* - CLI — a standalone Playwright-based binary invoked via
agent-browser. Requires launching a fresh Chrome profile with remote debugging enabled (the user will need to sign in to services in that profile). Check withBash.which agent-browser - 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:
- First, check if MCP tools are available in the current session. If yes, use those — no setup needed.
claude-in-chrome - If not, check . If installed, launch a fresh Chrome profile (see below).
which agent-browser - If neither is available, ask the user: install , or follow manual instructions?
agent-browser
agent-browseragent-browserbash
undefined本技能中浏览器自动化的目标是减少登录和设置的繁琐操作——Agent会导航网页UI、填写表单并提取凭证,无需用户手动完成全部流程。
优先顺序的三种模式:
- (优先使用,如果可用)——如果用户正在运行Claude Code且已连接
claude-in-chromeMCP扩展,则使用该模式。其最大优势是可以利用用户已登录所有服务(Linear、Slack、GitHub)的现有Chrome会话。通过检查是否存在claude-in-chrome工具来确认可用性。mcp__claude-in-chrome__* - CLI——基于Playwright的独立二进制文件,通过
agent-browser调用。需要启动一个全新的Chrome配置文件并启用远程调试(用户需要在该配置文件中登录各项服务)。通过Bash命令检查是否已安装。which agent-browser - 手动引导流程——用户按照Agent的分步说明自行点击操作。始终作为每个子技能的备用方案(路径B)。
如何确定使用哪种模式:
- 首先,检查当前会话中是否有MCP工具可用。如果有,则使用该模式——无需额外设置。
claude-in-chrome - 如果没有,执行检查是否已安装。如果已安装,则启动全新的Chrome配置文件(见下文)。
which agent-browser - 如果两者都不可用,询问用户:是安装,还是遵循手动说明操作?
agent-browser
agent-browseragent-browserbash
undefinedFind 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
```bashfor port in $(seq 9222 9322); do
if ! lsof -i :"$port" > /dev/null 2>&1; then
echo "Open port found: $port"
break
fi
done
```bashCreate a fresh profile directory
创建新的配置文件目录
mkdir -p ~/.cyrus/chrome-profile
```bashmkdir -p ~/.cyrus/chrome-profile
```bashLaunch 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" &
--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" &
--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" &
--user-data-dir="$HOME/.cyrus/chrome-profile" &
```bashgoogle-chrome --remote-debugging-port=<port>
--user-data-dir="$HOME/.cyrus/chrome-profile" &
--user-data-dir="$HOME/.cyrus/chrome-profile" &
```bashConnect 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/nullagent-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/nullHow This Works
工作流程
This skill runs sub-skills in order, skipping any that are already complete. You can re-run at any time to add integrations or fix configuration.
/cyrus-setup本技能会按顺序运行各个子技能,跳过已完成的步骤。你可以随时重新运行来添加集成或修复配置。
/cyrus-setupLoading Sub-Skills
加载子技能
Each step references a sub-skill file. To execute a sub-skill, read the SKILL.md file using the tool and follow its instructions. The sub-skill files are sibling directories to this skill:
Read| Step | Sub-skill | File to read |
|---|---|---|
| 1 | setup-prerequisites | |
| 2 | setup-claude-auth | |
| 3 | setup-endpoint | |
| 4 | setup-linear | |
| 5 | setup-github | |
| 5b | setup-gitlab | |
| 6 | setup-slack | |
| 7 | setup-repository | |
| 8 | setup-launch | |
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 , the sub-skills are at , etc.
~/.claude/skills/cyrus-setup/SKILL.md~/.claude/skills/cyrus-setup-prerequisites/SKILL.mdIf a sub-skill file is not found, use to search for it:
Glob**/cyrus-setup-prerequisites/SKILL.md每个步骤都会引用一个子技能文件。要执行子技能,请使用工具读取对应的SKILL.md文件并遵循其说明。子技能文件位于本技能的同级目录中:
Read| 步骤 | 子技能 | 需读取的文件 |
|---|---|---|
| 1 | 依赖项设置 | |
| 2 | Claude身份验证设置 | |
| 3 | 端点设置 | |
| 4 | Linear集成设置 | |
| 5 | GitHub集成设置 | |
| 5b | GitLab集成设置 | |
| 6 | Slack集成设置 | |
| 7 | 代码仓库添加 | |
| 8 | 启动服务 | |
查找文件时,请相对于本文件的目录(向上一级,然后进入子技能目录)。例如,如果本文件位于,则子技能文件位于等路径。
~/.claude/skills/cyrus-setup/SKILL.md~/.claude/skills/cyrus-setup-prerequisites/SKILL.md如果未找到子技能文件,请使用工具搜索:
Glob**/cyrus-setup-prerequisites/SKILL.mdStep 0: Identity & Surface Selection
步骤0:身份与集成选择
Before anything else, collect preferences from the user. Use the 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在开始之前,先收集用户的偏好设置。如果有工具,请使用该工具——以交互式方式提问,而非以文本块形式列出。你可以将相关问题合并为一次提问,或逐个提问。
AskUserQuestionQuestion 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 and — used when creating Linear, Slack, and GitHub apps.
AGENT_NAMEAGENT_DESCRIPTION询问用户(括号内为默认值):
- 你想给你的Agent起什么名字?——该名称会显示在Linear、Slack和GitHub的集成中。(默认:)
Cyrus - 给你的Agent写一段简短描述——一句话,会显示在集成应用列表中。(默认:)
AI编码Agent,用于自动化开发
将答案保存为和——创建Linear、Slack和GitHub应用时会用到这些值。
AGENT_NAMEAGENT_DESCRIPTIONQuestion 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 sub-skill and follow its instructions.
cyrus-setup-prerequisites/SKILL.mdPass the user's package manager preference from Step 0.
读取子技能并遵循其说明。
cyrus-setup-prerequisites/SKILL.md传入步骤0中用户选择的包管理器。
Step 2: Claude Auth
步骤2:Claude身份验证配置
Read the sub-skill and follow its instructions.
cyrus-setup-claude-auth/SKILL.md读取子技能并遵循其说明。
cyrus-setup-claude-auth/SKILL.mdStep 3: Webhook Endpoint
步骤3:Webhook端点配置
Read the sub-skill and follow its instructions.
cyrus-setup-endpoint/SKILL.md读取子技能并遵循其说明。
cyrus-setup-endpoint/SKILL.mdStep 4: Linear (if selected)
步骤4:Linear集成(如果已选择)
Only if the user selected Linear in Step 0.
Read the sub-skill and follow its instructions.
cyrus-setup-linear/SKILL.md仅当用户在步骤0中选择了Linear时执行。
读取子技能并遵循其说明。
cyrus-setup-linear/SKILL.mdStep 5: GitHub (if selected)
步骤5:GitHub集成(如果已选择)
Only if the user selected GitHub in Step 0.
Read the sub-skill and follow its instructions.
cyrus-setup-github/SKILL.md仅当用户在步骤0中选择了GitHub时执行。
读取子技能并遵循其说明。
cyrus-setup-github/SKILL.mdStep 5b: GitLab (if selected)
步骤5b:GitLab集成(如果已选择)
Only if the user selected GitLab in Step 0.
Read the sub-skill and follow its instructions.
cyrus-setup-gitlab/SKILL.md仅当用户在步骤0中选择了GitLab时执行。
读取子技能并遵循其说明。
cyrus-setup-gitlab/SKILL.mdStep 6: Slack (if selected)
步骤6:Slack集成(如果已选择)
Only if the user selected Slack in Step 0.
Read the 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.
cyrus-setup-slack/SKILL.md仅当用户在步骤0中选择了Slack时执行。
读取子技能并遵循其说明。所有路径(A-1、A-2和B)必须使用基于清单的创建流程——绝对不要通过手动配置权限/事件的方式"从头开始"创建Slack应用。
cyrus-setup-slack/SKILL.mdStep 7: Add Repositories
步骤7:添加代码仓库
Read the sub-skill and follow its instructions.
cyrus-setup-repository/SKILL.md读取子技能并遵循其说明。
cyrus-setup-repository/SKILL.mdStep 8: Launch
步骤8:启动服务
Read the sub-skill and follow its instructions.
cyrus-setup-launch/SKILL.md读取子技能并遵循其说明。
cyrus-setup-launch/SKILL.mdDesign Principles
设计原则
- Skip-if-done — Every sub-skill checks existing state first. Re-running is safe.
/setup - 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.
- Agent writes non-secret config — Values like and
CYRUS_SERVER_PORTare written directly by the agent.LINEAR_DIRECT_WEBHOOKS - Browser automation when available — Uses for Linear/Slack app creation; falls back to guided manual steps if not installed.
agent-browser - Package manager aware — The user's choice is used consistently throughout.
- 已完成则跳过——每个子技能都会先检查现有状态。重新运行是安全的。
/setup - 敏感信息绝不进入对话——凭证要么通过agent-browser提取,要么通过用户在终端中执行的"剪贴板到环境变量"shell命令写入。
- Agent负责写入非敏感配置——和
CYRUS_SERVER_PORT等值由Agent直接写入。LINEAR_DIRECT_WEBHOOKS - 优先使用浏览器自动化——创建Linear/Slack应用时优先使用;如果未安装则回退到引导式手动步骤。
agent-browser - 适配包管理器选择——始终一致地使用用户选择的包管理器。