一键导入
cyrus-setup-slack
// Configure Slack integration for Cyrus — create a Slack app from manifest, then guide the user to save credentials.
// Configure Slack integration for Cyrus — create a Slack app from manifest, then guide the user to save credentials.
Configure GitHub for Cyrus — gh CLI login and git config for PRs, with optional webhook setup to enable @mention responses in PR comments, automated rebases and merges, and auto-fixing based on CI failures (coming soon).
Orchestrate F1 test drives to validate the Cyrus agent system end-to-end across issue-tracker, EdgeWorker, and activity rendering.
Invoke when dev-testing a Cyrus change that spans CYPACK (edgeworker + CLI) and CYHOST (Vercel-hosted GUI) and the hosted GUI needs to point at an unreleased `cyrus-core` from this repo. Publishes `cyrus-core` (and `claude-runner` if needed) as a `-test.N` prerelease under the npm `test` dist-tag so CYHOST can install it via `cyrus-core@test` without affecting the `latest` dist-tag or shipping a real release.
Create a Linear OAuth application and configure Cyrus to use it — supports agent-browser automation or guided manual setup.
Print a summary of the Cyrus setup and offer to start the agent.
Run all quality checks (tests, lint, typecheck), fix failures, update the changelog, commit, push, and create/update the pull request or merge request.
| name | cyrus-setup-slack |
| description | Configure Slack integration for Cyrus — create a Slack app from manifest, then guide the user to save credentials. |
CRITICAL: Never use Read, Edit, or Write tools on ~/.cyrus/.env or any file inside ~/.cyrus/. Use only Bash commands (grep, printf >>, etc.) to interact with env files — secrets must never be read into the conversation context. Never scrape, extract, or read secret values from web pages — guide the user to copy them manually.
Creates a Slack application from a pre-built manifest so Cyrus can respond to messages in Slack channels.
grep -E '^SLACK_BOT_TOKEN=' ~/.cyrus/.env 2>/dev/null
If SLACK_BOT_TOKEN is already set, inform the user:
Slack is already configured. Skipping this step. To reconfigure, remove
SLACK_BOT_TOKENandSLACK_SIGNING_SECRETfrom~/.cyrus/.envand re-run.
Skip to completion.
Read the base URL (set by setup-endpoint):
grep '^CYRUS_BASE_URL=' ~/.cyrus/.env | cut -d= -f2-
You also need AGENT_NAME and AGENT_DESCRIPTION — these were collected in Step 0 of the orchestrator and should be available from the conversation context.
Construct the manifest, substituting <AGENT_NAME>, <AGENT_DESCRIPTION>, and <CYRUS_BASE_URL> with actual values.
IMPORTANT: Use the manifest template EXACTLY as shown below. The event subscription path MUST be /slack-webhook (not /slack/events or any other path). This matches the route registered by SlackEventTransport in the Cyrus codebase.
NOTE: this list of 'scopes' must be kept in sync with the list of scopes in the skill defined at: https://github.com/cyrusagents/cyrus-hosted/blob/main/.claude/skills/preview-init/SKILL.md , as well as the list of scopes defined at https://github.com/cyrusagents/cyrus-hosted/blob/main/apps/app/src/lib/slack/constants.ts. If you change here you must also propose changes in those locations.
{
"display_information": {
"name": "<AGENT_NAME>",
"description": "<AGENT_DESCRIPTION>",
"background_color": "#00240e"
},
"features": {
"bot_user": {
"display_name": "<AGENT_NAME>",
"always_online": true
}
},
"oauth_config": {
"redirect_urls": [
"<CYRUS_BASE_URL>/slack/oauth/callback"
],
"scopes": {
"user": [
"canvases:read",
"canvases:write",
"channels:history",
"chat:write",
"groups:history",
"im:history",
"mpim:history",
"users:read",
"users:read.email",
"reactions:write",
"search:read.public",
"search:read.private",
"search:read.mpim",
"search:read.im",
"search:read.files",
"search:read.users"
],
"bot": [
"groups:read",
"app_mentions:read",
"assistant:write",
"canvases:write",
"channels:history",
"channels:read",
"chat:write",
"chat:write.customize",
"groups:history",
"im:history",
"im:read",
"files:read",
"files:write",
"mpim:history",
"reactions:write",
"search:read.files",
"search:read.public",
"search:read.users",
"users:read",
"users:read.email",
"mpim:read"
]
},
"pkce_enabled": false
},
"settings": {
"event_subscriptions": {
"request_url": "<CYRUS_BASE_URL>/slack-webhook",
"bot_events": [
"app_mention",
"member_joined_channel"
]
},
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}
All paths use the "From a manifest" flow. Never create the app "From scratch".
Determine which browser automation mode to use (see orchestrator rules):
claude-in-chrome MCP tools are available → use Path A-1 (claude-in-chrome)agent-browser is installed and a Chrome debug session is connected → use Path A-2 (agent-browser)Use the mcp__claude-in-chrome__* tools to navigate and interact with the user's existing Chrome browser.
After creation, the app lands on the Basic Information page. Do NOT take screenshots of credential pages. Proceed to Step 5 (credential collection).
If agent-browser is connected to a Chrome debug session:
agent-browser navigate "https://api.slack.com/apps"
Take a screenshot to verify the page loaded and the user is logged in.
agent-browser click "button:text('Create New App')"
agent-browser click "button:text('From a manifest')"
Take a screenshot to see the workspace picker. Click the appropriate workspace. If multiple are listed, ask the user which one.
agent-browser click "button:text('Next')"
Click the JSON tab if not already selected:
agent-browser click "button:text('JSON')"
Paste the manifest using JavaScript:
agent-browser eval "var editor = document.querySelector('textarea, [role=\"textbox\"], .ace_editor textarea, .CodeMirror textarea'); if (editor) { var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, 'value').set; nativeInputValueSetter.call(editor, JSON.stringify(<MANIFEST_JSON>, null, 2)); editor.dispatchEvent(new Event('input', { bubbles: true })); 'pasted'; } else { 'editor not found'; }"
If that doesn't work, try:
agent-browser click "textarea"
agent-browser keyboard "Control+a"
agent-browser type '<MANIFEST_JSON_STRING>'
Take a screenshot to verify, then click Next:
agent-browser click "button:text('Next')"
Take a screenshot to verify the summary, then click Create:
agent-browser click "button:text('Create')"
After creation, do NOT screenshot credential pages or attempt to scrape secrets. Proceed to Step 5.
Guide the user through the manifest flow:
Create a Slack App
- Go to https://api.slack.com/apps
- Click Create New App
- In the modal, select From a manifest
- Pick the workspace you want to associate the app with
- Click Next
- Select JSON format and paste the following manifest:
Print the fully-substituted manifest JSON for the user to copy.
- Click Next, review the summary, then click Create
Proceed to Step 5.
After the app is created (via any path), guide the user through installation and credential collection. The agent must NOT scrape, read, or extract secrets from the page. The user copies them manually.
Tell the user:
- In your Slack app settings, go to Install App in the left sidebar
- Click Install to Workspace
- Click Allow
If using browser automation (A-1 or A-2), the agent can navigate to the Install App page and click the buttons — but must stop after installation completes and not screenshot the resulting page.
Add placeholder lines to the env file so the user can fill them in:
grep -q '^SLACK_BOT_TOKEN=' ~/.cyrus/.env || echo 'SLACK_BOT_TOKEN=' >> ~/.cyrus/.env
grep -q '^SLACK_SIGNING_SECRET=' ~/.cyrus/.env || echo 'SLACK_SIGNING_SECRET=' >> ~/.cyrus/.env
# macOS
code --new-window ~/.cyrus/.env 2>/dev/null || open -a TextEdit ~/.cyrus/.env
# Linux
code --new-window ~/.cyrus/.env 2>/dev/null || xdg-open ~/.cyrus/.env
Tell the user:
I've opened
~/.cyrus/.env. You need to paste two values:
Bot User OAuth Token — go to your app's OAuth & Permissions page, copy the Bot User OAuth Token (starts with
xoxb-), and paste it afterSLACK_BOT_TOKEN=Signing Secret — go to your app's Basic Information page, scroll to App Credentials, click Show next to Signing Secret, copy it, and paste it after
SLACK_SIGNING_SECRET=Save and close the file when done.
After the user confirms they've saved, verify:
grep -c '^SLACK_BOT_TOKEN=.' ~/.cyrus/.env
grep -c '^SLACK_SIGNING_SECRET=.' ~/.cyrus/.env
Both must return 1 (the . after = ensures the value is not empty). If either is 0, ask the user to check the file.
✓ Slack app created from manifest and installed ✓ Bot token and signing secret saved to
~/.cyrus/.env
Note: The event subscription request_url will fail Slack's verification challenge until Cyrus is actually running. Once Cyrus is started, go to the app's Event Subscriptions page and re-enter the URL to trigger verification, or Slack will retry automatically.