用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cyrusagents/cyrus --skill cyrus-setup-claude-auth命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
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).
Prepare, verify, publish, and finish a coordinated Cyrus CLI release. Use when a user asks to release Cyrus, publish cyrus-ai, run a CLI release, or perform the /release workflow.
Create a Linear OAuth application and configure Cyrus to use it — supports agent-browser automation or guided manual setup.
基于 SOC 职业分类
正在显示 SKILL.md
| name | cyrus-setup-claude-auth |
| description | Configure Claude Code authentication for Cyrus — API key, OAuth token, or third-party provider. |
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.
Configures Claude Code credentials so Cyrus can run AI sessions.
Check if credentials are already configured:
grep -c -E '^(ANTHROPIC_API_KEY|CLAUDE_CODE_OAUTH_TOKEN)=' ~/.cyrus/.env 2>/dev/null || echo "0"
If the count is >= 1, inform the user:
Claude Code authentication is already configured. Skipping this step. To reconfigure, remove the existing key from
~/.cyrus/.envand re-run this skill.
Skip to completion.
Ask the user:
How would you like to authenticate Claude Code?
- Current account (easiest) — use the credentials from your active
claudeCLI session- API Key — from console.anthropic.com
- Separate OAuth token — run
claude setup-tokento generate a token for a specific account- Third-Party Provider — Vertex AI, AWS Bedrock, Azure, etc.
CRITICAL: Secrets must NEVER appear in the conversation. Do not explore ~/.claude/ looking for credential files. Use only the methods below.
Detect the OS for the right clipboard command:
uname -s
Check if claude is authenticated on this machine:
claude auth status
If authenticated, instruct the user to run claude setup-token which will output a token.
To capture it safely, append a placeholder line to the env file, then open it in a GUI window so the user can paste the token:
grep -q '^CLAUDE_CODE_OAUTH_TOKEN=' ~/.cyrus/.env || echo 'CLAUDE_CODE_OAUTH_TOKEN=' >> ~/.cyrus/.env
Then open the file in a separate window — use whatever GUI editor is available:
# macOS: VS Code if available, otherwise TextEdit
code --new-window ~/.cyrus/.env 2>/dev/null || open -a TextEdit ~/.cyrus/.env
# Linux
code ~/.cyrus/.env 2>/dev/null || xdg-open ~/.cyrus/.env
Tell the user:
- Run
claude setup-tokenin a separate terminal- Copy the token it outputs
- I've opened
~/.cyrus/.env— find theCLAUDE_CODE_OAUTH_TOKEN=line- Paste the token right after the
=(no spaces, no newline)- Save and close the file
Instruct the user to copy their API key from the Anthropic Console, then provide the appropriate command:
macOS:
printf 'ANTHROPIC_API_KEY=%s\n' "$(pbpaste)" >> ~/.cyrus/.env
Linux:
printf 'ANTHROPIC_API_KEY=%s\n' "$(xclip -selection clipboard -o)" >> ~/.cyrus/.env
Universal fallback:
read -s -p "Paste your Anthropic API key: " val && printf 'ANTHROPIC_API_KEY=%s\n' "$val" >> ~/.cyrus/.env && echo " ✓ Saved"
This is for when the user wants to generate a token for a different account than the one currently logged in (e.g., running claude setup-token on another machine).
Append the placeholder, then open the file for the user to paste:
grep -q '^CLAUDE_CODE_OAUTH_TOKEN=' ~/.cyrus/.env || echo 'CLAUDE_CODE_OAUTH_TOKEN=' >> ~/.cyrus/.env
# macOS
code --new-window ~/.cyrus/.env 2>/dev/null || open -a TextEdit ~/.cyrus/.env
# Linux
code ~/.cyrus/.env 2>/dev/null || xdg-open ~/.cyrus/.env
Tell the user:
- On the other machine, run
claude setup-token- Copy the token it outputs
- I've opened
~/.cyrus/.env— findCLAUDE_CODE_OAUTH_TOKEN=and paste the token after the=- Save and close
Inform the user:
For third-party providers, you'll need to set provider-specific environment variables. See Third-Party Integrations for details.
Common configurations:
AWS Bedrock:
CLAUDE_CODE_USE_BEDROCK=1 AWS_REGION=us-east-1Google Vertex AI:
CLAUDE_CODE_USE_VERTEX=1 CLOUD_ML_REGION=us-east5 ANTHROPIC_VERTEX_PROJECT_ID=your-project-id
Guide the user to add the appropriate variables to ~/.cyrus/.env using the clipboard-to-env pattern.
After the user runs the command, verify the key was written:
grep -c -E '^(ANTHROPIC_API_KEY|CLAUDE_CODE_OAUTH_TOKEN|CLAUDE_CODE_USE_BEDROCK|CLAUDE_CODE_USE_VERTEX)=' ~/.cyrus/.env
If the count is 0, the credential was not saved. Ask the user to try again.
✓ Claude Code authentication configured.