‹ 首页

add-vercel

@nanocoai · 收录于 3 周前 · 上游提交 2 天前

Add Vercel deployment capability to NanoClaw agents. Installs the Vercel CLI in agent containers and sets up OneCLI credential injection for api.vercel.com. Use when the user wants agents to deploy web applications to Vercel.

适合你,如果想让 agent 帮你把 Web 应用一键部署到 Vercel

/ 下载安装
add-vercel.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add nanocoai/nanoclaw/add-vercel
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- nanocoai/nanoclaw/add-vercel
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify nanocoai/nanoclaw/add-vercel
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
30380GitHub stars
~1.3K最小装载
~1.3K含声明引用
~2.9K文本包总量
镜像托管

怎么用

商店整理自技能原文 · 版本 879835b · 表述以原文为准
它做什么

装上本技能后,Claude(NanoClaw agent)能自动安装Vercel CLI、配置API凭证,并用vercel命令部署Web应用到Vercel。它会在需要时引导你提供访问令牌。

什么时候触发

当你要求Claude部署Web应用、询问关于Vercel部署,或需要添加Vercel部署能力时触发。系统依次检查安装、配置凭证并完成部署。

装好后可以这样说
Claude将执行部署流程,可能要求提供API令牌。
Claude将安装Vercel CLI并配置凭证。
Claude会执行vercel deploy命令。
技能原文 SKILL.md作者撰写 · MIT · 879835b

Add Vercel

This skill gives NanoClaw agents the ability to deploy web applications to Vercel. It installs the Vercel CLI in agent containers and configures OneCLI to inject Vercel credentials automatically.

Principle: Do the work — don't tell the user to do it. Only ask for their input when it genuinely requires manual action (pasting a token).

Phase 1: Pre-flight
Check if already applied

Check if the container skill exists:

test -d container/skills/vercel-cli && echo "INSTALLED" || echo "NOT_INSTALLED"

If INSTALLED, skip to Phase 3 (Configure Credentials).

Check prerequisites

Verify OneCLI is working (required for credential injection):

onecli version 2>/dev/null && echo "ONECLI_OK" || echo "ONECLI_MISSING"

If ONECLI_MISSING, tell the user to run /init-onecli first, then retry /add-vercel. Stop here.

Phase 2: Install Container Skill

Copy the bundled container skill into the container skills directory:

rsync -a .claude/skills/add-vercel/container-skills/ container/skills/

Verify:

head -5 container/skills/vercel-cli/SKILL.md
Phase 3: Configure Credentials
Check if Vercel credential already exists
onecli secrets list 2>/dev/null | grep -i vercel

If a Vercel credential already exists, skip to Phase 4.

Set up Vercel API credential

The agent needs a Vercel personal access token. Tell the user:

I need your Vercel personal access token. Go to https://vercel.com/account/tokens and create one with these settings: - Token name: nanoclaw (or any name you'll recognize) - Scope: "Full Account" — the agent needs to create projects, deploy, and manage domains - Expiration: "No expiration" recommended (avoids credential rotation), or pick a date if your security policy requires it After creating the token, copy it — you'll only see it once.

Once the user provides the token, add it to OneCLI:

onecli secrets create \
  --name "Vercel API Token" \
  --type generic \
  --value "<TOKEN>" \
  --host-pattern "api.vercel.com" \
  --header-name "Authorization" \
  --value-format "Bearer {value}"

Verify:

onecli secrets list | grep -i vercel
Assign the secret to all agents

OneCLI uses selective secret mode — secrets must be explicitly assigned to each agent. Get the Vercel secret ID from the output above, then assign it to every agent:

# set-secrets replaces the entire list — read and merge for each agent.
VERCEL_SECRET_ID=$(onecli secrets list | jq -r '.data[] | select(.name | test("(?i)vercel")) | .id' | head -1)
for agent in $(onecli agents list | jq -r '.data[].id'); do
  CURRENT=$(onecli agents secrets --id "$agent" | jq -r '[.data[]] | join(",")')
  MERGED=$(printf '%s' "$CURRENT,$VERCEL_SECRET_ID" | tr ',' '\n' | sort -u | paste -sd ',' -)
  onecli agents set-secrets --id "$agent" --secret-ids "$MERGED"
done
Phase 4: Ensure Vercel CLI in Container Image

The Vercel CLI is installed globally in the agent image via container/Dockerfile. Check for both halves of the install — the pinned version arg and the install line:

grep -Eq '^ARG VERCEL_VERSION=' container/Dockerfile && \
  grep -Eq 'pnpm install -g "?vercel@\$\{VERCEL_VERSION\}"?' container/Dockerfile && \
  echo "PRESENT" || echo "MISSING"

If MISSING, add a pinned ARG VERCEL_VERSION=52.2.1 near the other version args and a pnpm install -g "vercel@${VERCEL_VERSION}" step in the global-install block of container/Dockerfile, then rebuild the image:

./container/build.sh

If PRESENT, the CLI is already in the image — skip the rebuild.

Phase 4b: Copy and Run the Dependency Guard

The Vercel CLI is a globally-installed binary — not importable or typed — so a structural test guards the Dockerfile install. Copy it into the host test tree and run it:

cp .claude/skills/add-vercel/vercel-dockerfile.test.ts src/vercel-dockerfile.test.ts
pnpm exec vitest run src/vercel-dockerfile.test.ts

The test parses container/Dockerfile and asserts both the ARG VERCEL_VERSION=... and the pnpm install -g "vercel@${VERCEL_VERSION}" line are present. It goes red if either is dropped or drifts.

Phase 5: Sync Skills to Running Agent Groups

Container skills are copied once at group creation and not auto-synced. After installing or updating a container skill, sync it to all existing agent groups:

for session_dir in data/v2-sessions/ag-*; do
  if [ -d "$session_dir/.claude-shared/skills" ]; then
    rsync -a container/skills/ "$session_dir/.claude-shared/skills/"
    echo "Synced skills to: $session_dir"
  fi
done
Phase 6: Restart Running Containers

Stop all running agent containers so they pick up the new skills on next wake:

docker ps --format "{{.ID}} {{.Names}}" | grep nanoclaw-v2 | awk '{print $1}' | xargs -r docker stop
Done

The agent can now deploy web applications to Vercel. Key commands:

  • vercel deploy --yes --prod --token placeholder — deploy to production
  • vercel ls --token placeholder — list deployments
  • vercel whoami --token placeholder — check auth

For the full command reference, the agent has the vercel-cli container skill loaded automatically.

按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。