Skip to main content

setup

Set up the Client Release Agent end to end — clone the repo (or reuse an existing clone), verify required tools, create and fill in .env, and validate credentials. Use when the user asks to run the setup skill, or to set up, install, configure, or deploy the client release agent.

来源信息

仓库
warpdotdev/client-release-agent-oss
最近来源活动
2026年7月21日 20:02
检测到的 SKILL.md 语言
英语
星标
3
分支
1

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
setup
description
Set up the Client Release Agent end to end — clone the repo (or reuse an existing clone), verify required tools, create and fill in .env, and validate credentials. Use when the user asks to run the setup skill, or to set up, install, configure, or deploy the client release agent.
# setup Get the Client Release Agent working from scratch. This skill is **idempotent**: it works whether the repo is already cloned or not, and never overwrites an existing `.env`. Repo: `https://github.com/warpdotdev/client-release-agent-oss.git` ## Step 1: Locate or clone the repo Check whether you are already inside a clone: ```bash git remote get-url origin 2>/dev/null | grep -q 'client-release-agent-oss' && echo "already in repo" ``` - If already inside the repo, use the current directory as `AGENT_DIR` and continue. - Otherwise, check the default location, then clone if needed: ```bash AGENT_DIR="$HOME/client-release-agent-oss" if [ -d "$AGENT_DIR/.warp/skills" ]; then echo "existing clone found at $AGENT_DIR" else git clone https://github.com/warpdotdev/client-release-agent-oss.git "$AGENT_DIR" fi cd "$AGENT_DIR" ``` If the user wants the repo somewhere else, use their path instead. All later steps run from `AGENT_DIR`. ## Step 2: Verify required tools Check for each required tool: ```bash for tool in git gh jq curl; do command -v "$tool" >/dev/null || echo "MISSING: $tool" done ``` If anything is missing, offer to install it (e.g. `brew install gh jq` on macOS, or the appropriate package manager). Then verify GitHub CLI authentication: ```bash gh auth status ``` If not authenticated, ask the user to run `gh auth login` (interactive — let them complete it) before continuing. If the user plans to run these skills as Oz cloud or scheduled agents (skip for purely local use), also verify the Oz CLI: ```bash oz whoami ``` - **Command not found** → if the [Warp app](https://docs.warp.dev/getting-started/installation-and-setup) is already installed, the CLI ships with it. Otherwise, prefer the standalone Oz CLI — there is no need to install the full Warp app just for the CLI. See [Installing the CLI](https://docs.warp.dev/reference/cli#installing-the-cli); on macOS: `brew tap warpdotdev/warp && brew install --cask oz`. - **Not authenticated** → run `oz login` (interactive), or for CI/headless environments export `WARP_API_KEY`. ## Step 3: Create .env Never overwrite an existing `.env`: ```bash if [ -f .env ]; then echo ".env already exists — will fill in missing values only" else cp .env.example .env fi ``` ## Step 4: Fill in configuration Ask the user **which skills they plan to use** so you only require the relevant variables: - **Release skills** (`cherrypick-to-release`, `cut-new-release-candidate`, `post-release-status`): `INTERNAL_REPO`, `REPO_DIR`, `GITHUB_ORG`, `SLACK_BOT_TOKEN`, `ONCALL_SLACK_GROUP`, `RELEASE_SLACK_CHANNEL`, optionally `PUBLIC_REPO`. - **Sentry digest** (`post-daily-new-issues`): `SENTRY_AUTH_TOKEN`, `SENTRY_ORG`, `SENTRY_PROJECT`, `SENTRY_PROJECT_ID`, `RELEASE_SLACK_CHANNEL`, `ONCALL_SLACK_GROUP`, optionally `RELEASE_VERSIONS_URL`. - **Slack replies** (`respond-to-slack-thread`): `SLACK_BOT_TOKEN` only. The release-convention variables (`RELEASE_CHANNELS`, `RELEASE_BRANCH_PREFIX`, `DEFAULT_BRANCH`, `CHERRYPICK_BRANCH_PREFIX`, `RC_WORKFLOW_NAME`, `SYNC_TRAILER_KEY`, `DIGEST_CHANNEL`, status emoji) all have sensible defaults — only ask about them if the user says their conventions differ. See the repo `README.md` for the full variable reference. Collect the **non-secret** values conversationally and write them into `.env` with edits. For **secrets** (`SLACK_BOT_TOKEN`, `SENTRY_AUTH_TOKEN`): - **Never** ask the user to paste a token into the chat, and never echo a token in a command. - Tell the user to edit `.env` themselves and paste the tokens in directly, then confirm when done. - Token guidance: - Slack: create a bot token (`xoxb-…`) at https://api.slack.com/apps with scopes `channels:read`, `channels:history`, `chat:write`, `chat:update`, `usergroups:read`, `users:read`, `users:read.email`. Install the app to the workspace and invite the bot to `RELEASE_SLACK_CHANNEL`. - Sentry: create an auth token with `event:read` and `project:read` at Sentry → Settings → Auth Tokens. ## Step 5: Load the environment ```bash set -a; source .env; set +a ``` Run this in the current session, and tell the user they'll need it in any future session that runs the skills (they can add it to their shell profile, CI, or scheduled-agent environment). Do not print the loaded values. ## Step 6: Validate Run only the checks relevant to the skills the user selected. Print pass/fail per check without revealing secrets. **Slack token:** ```bash curl -s -H "Authorization: Bearer $SLACK_BOT_TOKEN" \ "https://slack.com/api/auth.test" | jq '{ok, team, error}' ``` **Sentry token:** ```bash curl -fsS -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \ "https://sentry.io/api/0/projects/${SENTRY_ORG}/${SENTRY_PROJECT}/" | jq '{slug, id}' ``` Also confirm `.id` matches `SENTRY_PROJECT_ID`; if not, correct it in `.env`. **GitHub access to the release repo:** ```bash gh repo view "$INTERNAL_REPO" --json nameWithOwner --jq '.nameWithOwner' ``` **Local checkout (`REPO_DIR`):** ```bash git -C "$REPO_DIR" remote get-url origin ``` The origin should match `INTERNAL_REPO`. If `REPO_DIR` doesn't exist, offer to clone `INTERNAL_REPO` there: ```bash gh repo clone "$INTERNAL_REPO" "$REPO_DIR" ``` If any check fails, explain the likely cause (bad token, missing scope, bot not in channel, wrong slug) and help fix it before finishing. ## Step 7: Summarize Report which skills are ready to use given the configured variables, and show a couple of example prompts, e.g.: - `Cherry-pick PR #1234 into stable and preview` - `Post the daily new-issues digest for on-call` Remind the user: `.env` is gitignored — never commit it.
在 GitHub 查看