Set up a Vercel API token for publishing apps using browser automation
assistant skills install vercel-token-setupYou are helping your user set up a Vercel API token so they can publish apps to the web.
Determine whether the user has browser automation available (macOS desktop app) or is on a non-interactive channel (Telegram, Slack, etc.).
When the user is on Telegram or any non-macOS client, walk them through a text-based setup. No browser automation is used - the user follows links and performs each action manually.
Tell the user:
Setting up Vercel API Token
Since I can't automate the browser from here, I'll walk you through each step with direct links. You'll need:
- A Vercel account (free tier works)
- About 2 minutes
Ready to start?
If the user declines, acknowledge and stop.
Tell the user:
Step 1: Create an API token
Open this link to go to your Vercel tokens page: https://vercel.com/account/tokens
- Click "Create" (or "Create Token")
- Set the token name to "Vellum Assistant"
- Select scope: "Full Account"
- Set expiration to the longest option available (or "No Expiration" if offered)
- Click "Create Token"
A token value will appear - copy it now, as it's only shown once.
Tell the user:
Step 2: Send me the token
Please paste the token value into the secure prompt below.
Present the secure prompt:
credential_store prompt:
service: "vercel"
field: "api_token"
label: "Vercel API Token"
description: "Paste the API token you just created on vercel.com"
placeholder: "Enter your Vercel API token"
Wait for the user to complete the prompt. Once received, store it:
credential_store store:
service: "vercel"
field: "api_token"
value: "<the token the user provided>"
allowedTools: ["publish_page", "unpublish_page"]
allowedDomains: []
Vercel is connected! You can now publish apps to the web. Try clicking Publish on any app you've built.
You will automate Vercel token creation via the browser while the user watches. The user's only manual action is signing in to Vercel (if needed) and one copy-paste for the token value.
All browser operations are executed through the assistant browser CLI, invoked via host_bash. Vercel's UI may change over time. Do NOT memorize or depend on specific element IDs, CSS selectors, or DOM structures. Instead:
Screenshot first, act second. Before every interaction, take a screenshot to see the current visual state. Use assistant browser snapshot to find interactive elements.
assistant browser --session vercel screenshot --output /tmp/vercel-state.jpg
assistant browser --session vercel --json snapshot
Adapt to what you see. If a button's label or position differs from what you expect, use the screenshot to find the correct element.
Verify after every action. After clicking, typing, or navigating, take a new screenshot to confirm the action succeeded.
Never assume DOM structure. Use the snapshot to identify what's on the page and interact accordingly.
When stuck, screenshot and describe. If you cannot find an expected element after 2 attempts, take a screenshot, describe what you see to the user, and ask for guidance.
Each step has a retry budget of 3 attempts. An attempt is one try at the step's primary action (e.g., clicking a button, filling a form). If a step fails after 3 attempts:
If two or more steps require manual fallback, abandon the automated flow entirely and switch to giving the user the remaining steps as clear text instructions with links.
These actions are technically impossible in the browser automation environment:
assistant browser click does not save files to disk.credential_store prompt approach to let the user copy-paste it accurately.Tell the user:
Setting up your Vercel API token so we can publish your app...
Here's what will happen:
- A browser opens to your Vercel account settings
- You sign in (if not already signed in)
- I create the token - you just watch
- One quick copy-paste - I'll ask you to copy the token value into a secure prompt
Takes about a minute. Ready?
If the user declines, acknowledge and stop. No further confirmations are needed after this point.
Goal: The user is signed in and the Vercel tokens page is loaded.
Navigate to https://vercel.com/account/tokens:
assistant browser --session vercel navigate --url "https://vercel.com/account/tokens"
Take a screenshot and snapshot to check the page state:
Verify: URL contains vercel.com/account/tokens and no sign-in overlay is visible.
Goal: A new API token named "Vellum Assistant" is created.
Take a screenshot and snapshot. Find and click the button to create a new token (typically labeled "Create" or "Create Token"):
assistant browser --session vercel screenshot --output /tmp/vercel-tokens.jpg
assistant browser --session vercel --json snapshot
On the creation form:
Verify: Take a screenshot. A dialog or section should now display the newly created token value.
assistant browser --session vercel screenshot --output /tmp/vercel-token-created.jpg
Goal: The token value is securely captured and stored.
After token creation, Vercel shows the token value once. You MUST follow this exact sequence - no improvisation:
credential_store prompt for the token. This is your ONLY next action.Absolute prohibitions during this step:
Present the secure prompt:
credential_store prompt:
service: "vercel"
field: "api_token"
label: "Vercel API Token"
description: "Copy the token value shown on the Vercel page and paste it here."
placeholder: "Enter your Vercel API token"
Wait for the user to complete the prompt. Once received, store it:
credential_store store:
service: "vercel"
field: "api_token"
value: "<the token the user provided>"
allowedTools: ["publish_page", "unpublish_page"]
allowedDomains: []
Verify: credential_store list shows api_token for vercel.
"Vercel is connected! Your API token is set up and ready to go. You can now publish apps to the web."
assistant browser --session vercel screenshot --output /tmp/vercel-error.jpg), describe what you see, and ask the user for guidance.