opencode-skills-collection 3.0.35 → 3.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +15 -1
- package/bundled-skills/accesslint-audit/SKILL.md +115 -0
- package/bundled-skills/accesslint-diff/SKILL.md +81 -0
- package/bundled-skills/accesslint-scan/SKILL.md +47 -0
- package/bundled-skills/composition-patterns/SKILL.md +87 -0
- package/bundled-skills/composition-patterns/rules/_sections.md +29 -0
- package/bundled-skills/composition-patterns/rules/_template.md +24 -0
- package/bundled-skills/composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/bundled-skills/composition-patterns/rules/architecture-compound-components.md +112 -0
- package/bundled-skills/composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/bundled-skills/composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/bundled-skills/composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/bundled-skills/composition-patterns/rules/state-context-interface.md +191 -0
- package/bundled-skills/composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/bundled-skills/composition-patterns/rules/state-lift-state.md +125 -0
- package/bundled-skills/debugging-toolkit/SKILL.md +35 -0
- package/bundled-skills/deploy-to-vercel/SKILL.md +304 -0
- package/bundled-skills/deploy-to-vercel/resources/deploy-codex.sh +301 -0
- package/bundled-skills/deploy-to-vercel/resources/deploy.sh +301 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/backups/README-2026-06-02.md +687 -0
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +4 -4
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/users/bundles.md +245 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/getting-started.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/plugins.md +21 -13
- package/bundled-skills/docs/users/specialized-plugin-roadmap.md +95 -0
- package/bundled-skills/docs/users/usage.md +4 -4
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/polis-protocol/SKILL.md +93 -0
- package/bundled-skills/python-development/SKILL.md +35 -0
- package/bundled-skills/radix-ui-design-system/SKILL.md +2 -2
- package/bundled-skills/react-native-skills/SKILL.md +120 -0
- package/bundled-skills/react-native-skills/rules/_sections.md +86 -0
- package/bundled-skills/react-native-skills/rules/_template.md +28 -0
- package/bundled-skills/react-native-skills/rules/animation-derived-value.md +53 -0
- package/bundled-skills/react-native-skills/rules/animation-gesture-detector-press.md +95 -0
- package/bundled-skills/react-native-skills/rules/animation-gpu-properties.md +65 -0
- package/bundled-skills/react-native-skills/rules/design-system-compound-components.md +66 -0
- package/bundled-skills/react-native-skills/rules/fonts-config-plugin.md +71 -0
- package/bundled-skills/react-native-skills/rules/imports-design-system-folder.md +68 -0
- package/bundled-skills/react-native-skills/rules/js-hoist-intl.md +61 -0
- package/bundled-skills/react-native-skills/rules/list-performance-callbacks.md +44 -0
- package/bundled-skills/react-native-skills/rules/list-performance-function-references.md +132 -0
- package/bundled-skills/react-native-skills/rules/list-performance-images.md +53 -0
- package/bundled-skills/react-native-skills/rules/list-performance-inline-objects.md +97 -0
- package/bundled-skills/react-native-skills/rules/list-performance-item-expensive.md +94 -0
- package/bundled-skills/react-native-skills/rules/list-performance-item-memo.md +82 -0
- package/bundled-skills/react-native-skills/rules/list-performance-item-types.md +104 -0
- package/bundled-skills/react-native-skills/rules/list-performance-virtualize.md +67 -0
- package/bundled-skills/react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
- package/bundled-skills/react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
- package/bundled-skills/react-native-skills/rules/navigation-native-navigators.md +188 -0
- package/bundled-skills/react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
- package/bundled-skills/react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
- package/bundled-skills/react-native-skills/rules/react-state-dispatcher.md +91 -0
- package/bundled-skills/react-native-skills/rules/react-state-fallback.md +56 -0
- package/bundled-skills/react-native-skills/rules/react-state-minimize.md +65 -0
- package/bundled-skills/react-native-skills/rules/rendering-no-falsy-and.md +74 -0
- package/bundled-skills/react-native-skills/rules/rendering-text-in-text-component.md +36 -0
- package/bundled-skills/react-native-skills/rules/scroll-position-no-state.md +82 -0
- package/bundled-skills/react-native-skills/rules/state-ground-truth.md +80 -0
- package/bundled-skills/react-native-skills/rules/ui-expo-image.md +66 -0
- package/bundled-skills/react-native-skills/rules/ui-image-gallery.md +104 -0
- package/bundled-skills/react-native-skills/rules/ui-measure-views.md +78 -0
- package/bundled-skills/react-native-skills/rules/ui-menus.md +174 -0
- package/bundled-skills/react-native-skills/rules/ui-native-modals.md +77 -0
- package/bundled-skills/react-native-skills/rules/ui-pressable.md +61 -0
- package/bundled-skills/react-native-skills/rules/ui-safe-area-scroll.md +65 -0
- package/bundled-skills/react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
- package/bundled-skills/react-native-skills/rules/ui-styling.md +87 -0
- package/bundled-skills/skill-issue/SKILL.md +73 -0
- package/bundled-skills/tdd-workflows/SKILL.md +35 -0
- package/bundled-skills/vercel-cli-with-tokens/SKILL.md +361 -0
- package/bundled-skills/vercel-optimize/CONTRIBUTING.md +41 -0
- package/bundled-skills/vercel-optimize/SKILL.md +331 -0
- package/bundled-skills/vercel-optimize/lib/auth-route.mjs +23 -0
- package/bundled-skills/vercel-optimize/lib/budget-summary.mjs +182 -0
- package/bundled-skills/vercel-optimize/lib/citations.mjs +139 -0
- package/bundled-skills/vercel-optimize/lib/cost-coverage.mjs +143 -0
- package/bundled-skills/vercel-optimize/lib/dedup-recs.mjs +325 -0
- package/bundled-skills/vercel-optimize/lib/deep-dive.mjs +350 -0
- package/bundled-skills/vercel-optimize/lib/display-labels.mjs +185 -0
- package/bundled-skills/vercel-optimize/lib/extract-claims.mjs +550 -0
- package/bundled-skills/vercel-optimize/lib/framework-support.mjs +67 -0
- package/bundled-skills/vercel-optimize/lib/gates/build-minutes-fanout.mjs +69 -0
- package/bundled-skills/vercel-optimize/lib/gates/cold-start.mjs +66 -0
- package/bundled-skills/vercel-optimize/lib/gates/contract.mjs +79 -0
- package/bundled-skills/vercel-optimize/lib/gates/cwv-poor.mjs +87 -0
- package/bundled-skills/vercel-optimize/lib/gates/external-api-slow.mjs +55 -0
- package/bundled-skills/vercel-optimize/lib/gates/hard-gates.mjs +73 -0
- package/bundled-skills/vercel-optimize/lib/gates/index.mjs +45 -0
- package/bundled-skills/vercel-optimize/lib/gates/isr-overrevalidation.mjs +62 -0
- package/bundled-skills/vercel-optimize/lib/gates/middleware-heavy.mjs +51 -0
- package/bundled-skills/vercel-optimize/lib/gates/observability-events-attribution.mjs +56 -0
- package/bundled-skills/vercel-optimize/lib/gates/platform-bot-protection.mjs +115 -0
- package/bundled-skills/vercel-optimize/lib/gates/platform-fluid-compute.mjs +83 -0
- package/bundled-skills/vercel-optimize/lib/gates/region-misconfig.mjs +64 -0
- package/bundled-skills/vercel-optimize/lib/gates/route-errors.mjs +80 -0
- package/bundled-skills/vercel-optimize/lib/gates/scanner-driven.mjs +122 -0
- package/bundled-skills/vercel-optimize/lib/gates/select-candidates.mjs +134 -0
- package/bundled-skills/vercel-optimize/lib/gates/slow-route.mjs +88 -0
- package/bundled-skills/vercel-optimize/lib/gates/types.d.ts +38 -0
- package/bundled-skills/vercel-optimize/lib/gates/uncached-route.mjs +93 -0
- package/bundled-skills/vercel-optimize/lib/gates/usage-spike-triage.mjs +121 -0
- package/bundled-skills/vercel-optimize/lib/grade-recommendation.mjs +155 -0
- package/bundled-skills/vercel-optimize/lib/impact-label.mjs +126 -0
- package/bundled-skills/vercel-optimize/lib/impact-magnitude.mjs +60 -0
- package/bundled-skills/vercel-optimize/lib/investigation-brief.mjs +610 -0
- package/bundled-skills/vercel-optimize/lib/observation-safety.mjs +174 -0
- package/bundled-skills/vercel-optimize/lib/project-facts.mjs +99 -0
- package/bundled-skills/vercel-optimize/lib/queries.mjs +315 -0
- package/bundled-skills/vercel-optimize/lib/reconcile-candidates.mjs +372 -0
- package/bundled-skills/vercel-optimize/lib/render-report.mjs +955 -0
- package/bundled-skills/vercel-optimize/lib/repo-root.mjs +86 -0
- package/bundled-skills/vercel-optimize/lib/route-normalize.mjs +220 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/bot-protection-certainty.mjs +38 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/cache-tag-invalidation-certainty.mjs +30 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/count-correct.mjs +52 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/function-duration-invocations.mjs +38 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/index.mjs +79 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/middleware-conflict.mjs +36 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/missing-citation.mjs +16 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/pre-release.mjs +74 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/rate-limit.mjs +67 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/rendering-mode-mislabel.mjs +38 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/undeclared-dep.mjs +78 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/vercel-directive-strip.mjs +37 -0
- package/bundled-skills/vercel-optimize/lib/sanitizers/window-units.mjs +32 -0
- package/bundled-skills/vercel-optimize/lib/scanners/cache-components-suspense-dedupe.mjs +109 -0
- package/bundled-skills/vercel-optimize/lib/scanners/edge-heavy-import.mjs +94 -0
- package/bundled-skills/vercel-optimize/lib/scanners/force-dynamic.mjs +42 -0
- package/bundled-skills/vercel-optimize/lib/scanners/headers-in-page.mjs +44 -0
- package/bundled-skills/vercel-optimize/lib/scanners/index.mjs +35 -0
- package/bundled-skills/vercel-optimize/lib/scanners/large-static-asset.mjs +92 -0
- package/bundled-skills/vercel-optimize/lib/scanners/max-age-without-s-maxage.mjs +42 -0
- package/bundled-skills/vercel-optimize/lib/scanners/middleware-broad-matcher.mjs +55 -0
- package/bundled-skills/vercel-optimize/lib/scanners/missing-cache-headers.mjs +90 -0
- package/bundled-skills/vercel-optimize/lib/scanners/prisma-include-tree.mjs +42 -0
- package/bundled-skills/vercel-optimize/lib/scanners/region-pin-in-config.mjs +88 -0
- package/bundled-skills/vercel-optimize/lib/scanners/source-maps-production.mjs +36 -0
- package/bundled-skills/vercel-optimize/lib/scanners/sveltekit-prerender-missing.mjs +43 -0
- package/bundled-skills/vercel-optimize/lib/scanners/turbo-force-bypass.mjs +129 -0
- package/bundled-skills/vercel-optimize/lib/scanners/unoptimized-image.mjs +113 -0
- package/bundled-skills/vercel-optimize/lib/scanners/use-cache-date-stamp.mjs +106 -0
- package/bundled-skills/vercel-optimize/lib/support-topics.mjs +355 -0
- package/bundled-skills/vercel-optimize/lib/throttle.mjs +273 -0
- package/bundled-skills/vercel-optimize/lib/util.mjs +17 -0
- package/bundled-skills/vercel-optimize/lib/vercel.mjs +784 -0
- package/bundled-skills/vercel-optimize/lib/verify-claim.mjs +1296 -0
- package/bundled-skills/vercel-optimize/lib/workspace-resolver.mjs +521 -0
- package/bundled-skills/vercel-optimize/references/candidates.md +176 -0
- package/bundled-skills/vercel-optimize/references/data-collection.md +218 -0
- package/bundled-skills/vercel-optimize/references/docs-library.json +683 -0
- package/bundled-skills/vercel-optimize/references/doctrine.md +105 -0
- package/bundled-skills/vercel-optimize/references/observability-plus.md +108 -0
- package/bundled-skills/vercel-optimize/references/playbooks/README.md +53 -0
- package/bundled-skills/vercel-optimize/references/playbooks/ai-application.md +32 -0
- package/bundled-skills/vercel-optimize/references/playbooks/api-service.md +30 -0
- package/bundled-skills/vercel-optimize/references/playbooks/content-site.md +30 -0
- package/bundled-skills/vercel-optimize/references/playbooks/ecommerce.md +30 -0
- package/bundled-skills/vercel-optimize/references/playbooks/marketing.md +30 -0
- package/bundled-skills/vercel-optimize/references/playbooks/saas.md +31 -0
- package/bundled-skills/vercel-optimize/references/playbooks/sveltekit.md +75 -0
- package/bundled-skills/vercel-optimize/references/recommendations.md +203 -0
- package/bundled-skills/vercel-optimize/references/scanner-patterns.md +251 -0
- package/bundled-skills/vercel-optimize/references/scoring.md +205 -0
- package/bundled-skills/vercel-optimize/references/support-topics/README.md +46 -0
- package/bundled-skills/vercel-optimize/references/support-topics/astro-edge-middleware-scope.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/astro-output-mode-and-isr.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/auth-preserving-parallelization.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/bot-protection-product-guardrails.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/build-minutes-monorepo-fanout.md +23 -0
- package/bundled-skills/vercel-optimize/references/support-topics/cache-components-static-shell-boundaries.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/cache-components-suspense-dedupe-pitfall.md +23 -0
- package/bundled-skills/vercel-optimize/references/support-topics/cdn-cache-auth-safety.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/cold-start-initialization-bundle.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/core-web-vitals-client-bottlenecks.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/database-egress-pooling-region.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/dynamic-rendering-traps.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/external-api-critical-path-platform.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/external-api-critical-path.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/fast-data-transfer-payloads.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/fluid-compute-caveats.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/function-duration-io-and-after.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/function-invocation-reduction.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/function-region-misconfiguration-ttfb.md +23 -0
- package/bundled-skills/vercel-optimize/references/support-topics/image-optimization-cost-control.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/isr-revalidation-static-generation.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/middleware-proxy-edge-cost.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/next-fetch-revalidate-floor.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/next-font-cls-self-hosting.md +23 -0
- package/bundled-skills/vercel-optimize/references/support-topics/next-heavy-ui-lazy-load-boundaries.md +23 -0
- package/bundled-skills/vercel-optimize/references/support-topics/next-image-lcp-preload-sizes.md +23 -0
- package/bundled-skills/vercel-optimize/references/support-topics/next-route-handler-get-cache-defaults.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/next-script-third-party-strategy.md +23 -0
- package/bundled-skills/vercel-optimize/references/support-topics/nextjs-version-cache-semantics.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/not-found-catchall-request-waste.md +23 -0
- package/bundled-skills/vercel-optimize/references/support-topics/nuxt-route-rules-cache-isr.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/observability-events-cost-attribution.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/post-response-work-waituntil.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/route-error-durable-offload.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/route-error-runtime-limits.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/runtime-cache-reusable-data.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/sveltekit-isr-prerender-safety.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/sveltekit-split-cold-start-tradeoff.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/usage-spike-triage.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/use-cache-date-stamp-isr-write-amplifier.md +23 -0
- package/bundled-skills/vercel-optimize/references/support-topics/use-cache-remote-shared-origin-data.md +22 -0
- package/bundled-skills/vercel-optimize/references/support-topics/workflow-resumable-stream-routes.md +23 -0
- package/bundled-skills/vercel-optimize/references/verification.md +102 -0
- package/bundled-skills/vercel-optimize/references/voice.md +76 -0
- package/bundled-skills/vercel-optimize/scripts/budget-summary.mjs +56 -0
- package/bundled-skills/vercel-optimize/scripts/build-docs.mjs +74 -0
- package/bundled-skills/vercel-optimize/scripts/check-citations.mjs +81 -0
- package/bundled-skills/vercel-optimize/scripts/check-docs-fresh.mjs +93 -0
- package/bundled-skills/vercel-optimize/scripts/collect-signals.mjs +576 -0
- package/bundled-skills/vercel-optimize/scripts/collect-sub-agent-outputs.mjs +296 -0
- package/bundled-skills/vercel-optimize/scripts/deep-dive.mjs +319 -0
- package/bundled-skills/vercel-optimize/scripts/gate-investigations.mjs +166 -0
- package/bundled-skills/vercel-optimize/scripts/merge-signals.mjs +192 -0
- package/bundled-skills/vercel-optimize/scripts/prepare-investigation-brief.mjs +231 -0
- package/bundled-skills/vercel-optimize/scripts/reconcile-candidates.mjs +62 -0
- package/bundled-skills/vercel-optimize/scripts/render-report.mjs +437 -0
- package/bundled-skills/vercel-optimize/scripts/scan-codebase.mjs +313 -0
- package/bundled-skills/vercel-optimize/scripts/verify-and-regen.mjs +346 -0
- package/bundled-skills/vercel-optimize/scripts/verify-finding.mjs +19 -0
- package/bundled-skills/vercel-react-view-transitions/SKILL.md +327 -0
- package/bundled-skills/vercel-react-view-transitions/references/css-recipes.md +242 -0
- package/bundled-skills/vercel-react-view-transitions/references/implementation.md +182 -0
- package/bundled-skills/vercel-react-view-transitions/references/nextjs.md +176 -0
- package/bundled-skills/vercel-react-view-transitions/references/patterns.md +262 -0
- package/package.json +2 -2
- package/skills_index.json +312 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vercel-cli-with-tokens
|
|
3
|
+
description: "Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. \"deploy to vercel\", \"set up vercel\", \"add environment variables to vercel\"."
|
|
4
|
+
risk: safe
|
|
5
|
+
source: "https://github.com/vercel-labs/agent-skills"
|
|
6
|
+
date_added: "2026-06-02"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Vercel CLI with Tokens
|
|
10
|
+
|
|
11
|
+
Deploy and manage projects on Vercel using the CLI with token-based authentication, without relying on `vercel login`.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
- Use this skill when the task matches this description: Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
|
|
15
|
+
|
|
16
|
+
## Step 1: Locate the Vercel Token
|
|
17
|
+
|
|
18
|
+
Before running any Vercel CLI commands, identify where the token is coming from. Work through these scenarios in order:
|
|
19
|
+
|
|
20
|
+
### A) `VERCEL_TOKEN` is already set in the environment
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
printenv VERCEL_TOKEN
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If this returns a value, you're ready. Skip to Step 2.
|
|
27
|
+
|
|
28
|
+
### B) Token is in a `.env` file under `VERCEL_TOKEN`
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
grep '^VERCEL_TOKEN=' .env 2>/dev/null
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If found, export it:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
export VERCEL_TOKEN=$(grep '^VERCEL_TOKEN=' .env | cut -d= -f2-)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### C) Token is in a `.env` file under a different name
|
|
41
|
+
|
|
42
|
+
Look for any variable that looks like a Vercel token (Vercel tokens typically start with `vca_`):
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
grep -i 'vercel' .env 2>/dev/null
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Inspect the output to identify which variable holds the token, then export it as `VERCEL_TOKEN`:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
export VERCEL_TOKEN=$(grep '^<VARIABLE_NAME>=' .env | cut -d= -f2-)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### D) No token found — ask the user
|
|
55
|
+
|
|
56
|
+
If none of the above yield a token, ask the user to provide one. They can create a Vercel access token at vercel.com/account/tokens.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
**Important:** Once `VERCEL_TOKEN` is exported as an environment variable, the Vercel CLI reads it natively — **do not pass it as a `--token` flag**. Putting secrets in command-line arguments exposes them in shell history and process listings.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Bad — token visible in shell history and process listings
|
|
64
|
+
vercel deploy --token "vca_abc123"
|
|
65
|
+
|
|
66
|
+
# Good — CLI reads VERCEL_TOKEN from the environment
|
|
67
|
+
export VERCEL_TOKEN="vca_abc123"
|
|
68
|
+
vercel deploy
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Step 2: Locate the Project and Team
|
|
72
|
+
|
|
73
|
+
Similarly, check for the project ID and team scope. These let the CLI target the right project without needing `vercel link`.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Check environment
|
|
77
|
+
printenv VERCEL_PROJECT_ID
|
|
78
|
+
printenv VERCEL_ORG_ID
|
|
79
|
+
|
|
80
|
+
# Or check .env
|
|
81
|
+
grep -i 'vercel' .env 2>/dev/null
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**If you have a project URL** (e.g. `https://vercel.com/my-team/my-project`), extract the team slug:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# e.g. "my-team" from "https://vercel.com/my-team/my-project"
|
|
88
|
+
echo "$PROJECT_URL" | sed 's|https://vercel.com/||' | cut -d/ -f1
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**If you have both `VERCEL_ORG_ID` and `VERCEL_PROJECT_ID` in your environment**, export them — the CLI will use these automatically and skip any `.vercel/` directory:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
export VERCEL_ORG_ID="<org-id>"
|
|
95
|
+
export VERCEL_PROJECT_ID="<project-id>"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Note: `VERCEL_ORG_ID` and `VERCEL_PROJECT_ID` must be set together — setting only one causes an error.
|
|
99
|
+
|
|
100
|
+
## CLI Setup
|
|
101
|
+
|
|
102
|
+
Ensure the Vercel CLI is installed and up to date:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm install -g vercel
|
|
106
|
+
vercel --version
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Deploying a Project
|
|
110
|
+
|
|
111
|
+
Always deploy as **preview** unless the user explicitly requests production. Choose a method based on what you have available.
|
|
112
|
+
|
|
113
|
+
### Quick Deploy (have project ID — no linking needed)
|
|
114
|
+
|
|
115
|
+
When `VERCEL_TOKEN` and `VERCEL_PROJECT_ID` are set in the environment, deploy directly:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
vercel deploy -y --no-wait
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
With a team scope (either via `VERCEL_ORG_ID` or `--scope`):
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
vercel deploy --scope <team-slug> -y --no-wait
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Production (only when explicitly requested):
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
vercel deploy --prod --scope <team-slug> -y --no-wait
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Check status:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
vercel inspect <deployment-url>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Full Deploy Flow (no project ID — need to link)
|
|
140
|
+
|
|
141
|
+
Use this when you have a token and team but no pre-existing project ID.
|
|
142
|
+
|
|
143
|
+
#### Check project state first
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Does the project have a git remote?
|
|
147
|
+
git remote get-url origin 2>/dev/null
|
|
148
|
+
|
|
149
|
+
# Is it already linked to a Vercel project?
|
|
150
|
+
cat .vercel/project.json 2>/dev/null || cat .vercel/repo.json 2>/dev/null
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
#### Link the project
|
|
154
|
+
|
|
155
|
+
**With git remote (preferred):**
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
vercel link --repo --scope <team-slug> -y
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Reads the git remote and connects to the matching Vercel project. Creates `.vercel/repo.json`. More reliable than plain `vercel link`, which matches by directory name.
|
|
162
|
+
|
|
163
|
+
**Without git remote:**
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
vercel link --scope <team-slug> -y
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Creates `.vercel/project.json`.
|
|
170
|
+
|
|
171
|
+
**Link to a specific project by name:**
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
vercel link --project <project-name> --scope <team-slug> -y
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
If the project is already linked, check `orgId` in `.vercel/project.json` or `.vercel/repo.json` to verify it matches the intended team.
|
|
178
|
+
|
|
179
|
+
#### Deploy after linking
|
|
180
|
+
|
|
181
|
+
**A) Git Push Deploy — has git remote (preferred)**
|
|
182
|
+
|
|
183
|
+
Git pushes trigger automatic Vercel deployments.
|
|
184
|
+
|
|
185
|
+
1. **Ask the user before pushing.** Never push without explicit approval.
|
|
186
|
+
2. Commit and push:
|
|
187
|
+
```bash
|
|
188
|
+
git add .
|
|
189
|
+
git commit -m "deploy: <description of changes>"
|
|
190
|
+
git push
|
|
191
|
+
```
|
|
192
|
+
3. Vercel builds automatically. Non-production branches get preview deployments.
|
|
193
|
+
4. Retrieve the deployment URL:
|
|
194
|
+
```bash
|
|
195
|
+
sleep 5
|
|
196
|
+
vercel ls --format json --scope <team-slug>
|
|
197
|
+
```
|
|
198
|
+
Find the latest entry in the `deployments` array.
|
|
199
|
+
|
|
200
|
+
**B) CLI Deploy — no git remote**
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
vercel deploy --scope <team-slug> -y --no-wait
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Check status:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
vercel inspect <deployment-url>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Deploying from a Remote Repository (code not cloned locally)
|
|
213
|
+
|
|
214
|
+
1. Clone the repository:
|
|
215
|
+
```bash
|
|
216
|
+
git clone <repo-url>
|
|
217
|
+
cd <repo-name>
|
|
218
|
+
```
|
|
219
|
+
2. Link to Vercel:
|
|
220
|
+
```bash
|
|
221
|
+
vercel link --repo --scope <team-slug> -y
|
|
222
|
+
```
|
|
223
|
+
3. Deploy via git push (if you have push access) or CLI deploy.
|
|
224
|
+
|
|
225
|
+
### About `.vercel/` Directory
|
|
226
|
+
|
|
227
|
+
A linked project has either:
|
|
228
|
+
- `.vercel/project.json` — from `vercel link`. Contains `projectId` and `orgId`.
|
|
229
|
+
- `.vercel/repo.json` — from `vercel link --repo`. Contains `orgId`, `remoteName`, and a `projects` map.
|
|
230
|
+
|
|
231
|
+
Not needed when `VERCEL_ORG_ID` + `VERCEL_PROJECT_ID` are both set in the environment.
|
|
232
|
+
|
|
233
|
+
**Do NOT** run `vercel project inspect` or `vercel link` in an unlinked directory to detect state — they will interactively prompt or silently link as a side-effect. `vercel ls` is safe (in an unlinked directory it defaults to showing all deployments for the scope). `vercel whoami` is safe anywhere.
|
|
234
|
+
|
|
235
|
+
## Managing Environment Variables
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Set for all environments
|
|
239
|
+
echo "value" | vercel env add VAR_NAME --scope <team-slug>
|
|
240
|
+
|
|
241
|
+
# Set for a specific environment (production, preview, development)
|
|
242
|
+
echo "value" | vercel env add VAR_NAME production --scope <team-slug>
|
|
243
|
+
|
|
244
|
+
# List environment variables
|
|
245
|
+
vercel env ls --scope <team-slug>
|
|
246
|
+
|
|
247
|
+
# Pull env vars to local .env.local file
|
|
248
|
+
vercel env pull --scope <team-slug>
|
|
249
|
+
|
|
250
|
+
# Remove a variable
|
|
251
|
+
vercel env rm VAR_NAME --scope <team-slug> -y
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Inspecting Deployments
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
# List recent deployments
|
|
258
|
+
vercel ls --format json --scope <team-slug>
|
|
259
|
+
|
|
260
|
+
# Inspect a specific deployment
|
|
261
|
+
vercel inspect <deployment-url>
|
|
262
|
+
|
|
263
|
+
# View build logs (requires Vercel CLI v35+)
|
|
264
|
+
vercel inspect <deployment-url> --logs
|
|
265
|
+
|
|
266
|
+
# View runtime request logs (follows live by default; add --no-follow for a one-shot snapshot)
|
|
267
|
+
vercel logs <deployment-url>
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Managing Domains
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# List domains
|
|
274
|
+
vercel domains ls --scope <team-slug>
|
|
275
|
+
|
|
276
|
+
# Add a domain to the project — linked or env-linked directory (1 arg)
|
|
277
|
+
vercel domains add <domain> --scope <team-slug>
|
|
278
|
+
|
|
279
|
+
# Add a domain — unlinked directory (requires <project> positional)
|
|
280
|
+
vercel domains add <domain> <project> --scope <team-slug>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## Stripe Projects Plan Changes
|
|
284
|
+
|
|
285
|
+
If this project is managed by Stripe Projects. **Ask the user before running any paid or destructive plan change** — upgrades bill a real card, downgrades remove seats.
|
|
286
|
+
|
|
287
|
+
First run `stripe projects status --json` to confirm the Vercel resource's local name. The examples below assume the default (`vercel-plan`); substitute the actual name if it was renamed at `stripe projects add` time.
|
|
288
|
+
|
|
289
|
+
- **Upgrade to Pro:** `stripe projects add vercel/pro` (or `stripe projects upgrade vercel-plan pro`)
|
|
290
|
+
- **Downgrade to Hobby:** `stripe projects downgrade vercel-plan hobby`
|
|
291
|
+
|
|
292
|
+
### What Pro gives you
|
|
293
|
+
|
|
294
|
+
- $20/month platform fee, includes $20/month of usage credit.
|
|
295
|
+
- Turbo build machines (30 vCPUs, 60 GB memory) by default for new projects — significantly faster builds than Hobby.
|
|
296
|
+
- 1 deploying seat + unlimited free Viewer seats (read-only collaborators, preview comments).
|
|
297
|
+
- Higher included allocations (1 TB Fast Data Transfer, 10M Edge Requests per month).
|
|
298
|
+
- Paid add-ons available: SAML SSO, HIPAA BAA, Flags Explorer, Observability Plus, Speed Insights, Web Analytics Plus.
|
|
299
|
+
|
|
300
|
+
Full details: https://vercel.com/docs/plans/pro-plan
|
|
301
|
+
|
|
302
|
+
## Working Agreement
|
|
303
|
+
|
|
304
|
+
- **Never pass `VERCEL_TOKEN` as a `--token` flag.** Export it as an environment variable and let the CLI read it natively.
|
|
305
|
+
- **Check the environment for tokens before asking the user.** Look in the current env and `.env` files first.
|
|
306
|
+
- **Default to preview deployments.** Only deploy to production when explicitly asked.
|
|
307
|
+
- **Ask before pushing to git.** Never push commits without the user's approval.
|
|
308
|
+
- **Do not modify `.vercel/` files directly.** The CLI manages this directory. Reading them (e.g. to verify `orgId`) is fine.
|
|
309
|
+
- **Do not curl/fetch deployed URLs to verify.** Just return the link to the user.
|
|
310
|
+
- **Use `--format json`** when structured output will help with follow-up steps.
|
|
311
|
+
- **Use `-y`** on commands that prompt for confirmation to avoid interactive blocking.
|
|
312
|
+
|
|
313
|
+
## Troubleshooting
|
|
314
|
+
|
|
315
|
+
### Token not found
|
|
316
|
+
|
|
317
|
+
Check the environment and any `.env` files present:
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
printenv | grep -i vercel
|
|
321
|
+
grep -i vercel .env 2>/dev/null
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Authentication error
|
|
325
|
+
|
|
326
|
+
If the CLI fails with `Authentication required`:
|
|
327
|
+
- The token may be expired or invalid.
|
|
328
|
+
- Verify: `vercel whoami` (uses `VERCEL_TOKEN` from environment).
|
|
329
|
+
- Ask the user for a fresh token.
|
|
330
|
+
|
|
331
|
+
### Wrong team
|
|
332
|
+
|
|
333
|
+
Verify the scope is correct:
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
vercel whoami --scope <team-slug>
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### Build failure
|
|
340
|
+
|
|
341
|
+
Check the build logs:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
vercel inspect <deployment-url> --logs
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Common causes:
|
|
348
|
+
- Missing dependencies — ensure `package.json` is complete and committed.
|
|
349
|
+
- Missing environment variables — add with `vercel env add`.
|
|
350
|
+
- Framework misconfiguration — check `vercel.json`. Vercel auto-detects frameworks (Next.js, Remix, Vite, etc.) from `package.json`; override with `vercel.json` if detection is wrong.
|
|
351
|
+
|
|
352
|
+
### CLI not installed
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
npm install -g vercel
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
## Limitations
|
|
359
|
+
- Use this skill only when the task clearly matches the scope described above.
|
|
360
|
+
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
|
|
361
|
+
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Contributing to `vercel-optimize`
|
|
2
|
+
|
|
3
|
+
Keep changes small, metric-grounded, and fixture-tested. Runtime code lives in `skills/vercel-optimize`; tests and fixtures live in `packages/vercel-optimize-tests` so installed skills stay small.
|
|
4
|
+
|
|
5
|
+
## Common changes
|
|
6
|
+
|
|
7
|
+
| Change | Edit | Test |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Gate | `lib/gates/<id>.mjs`, `lib/gates/index.mjs` | `node --test packages/vercel-optimize-tests/test/*gate*.test.mjs` |
|
|
10
|
+
| Scanner | `lib/scanners/<id>.mjs`, `lib/scanners/index.mjs` | Scanner-specific test in `packages/vercel-optimize-tests/test/` |
|
|
11
|
+
| Citation | `references/docs-library.json` | `node skills/vercel-optimize/scripts/check-citations.mjs` |
|
|
12
|
+
| Support topic | `references/support-topics/<id>.md` | `node --test packages/vercel-optimize-tests/test/support-topics.test.mjs` |
|
|
13
|
+
| Playbook | `references/playbooks/<profile>.md` and selection matrix in `references/scoring.md` | `node --test packages/vercel-optimize-tests/test/support-topics.test.mjs packages/vercel-optimize-tests/test/investigation-brief.test.mjs` |
|
|
14
|
+
| Renderer or verifier | `lib/render-report.mjs`, `lib/verify-claim.mjs`, or related module | Focused test plus full test suite |
|
|
15
|
+
|
|
16
|
+
Generated docs:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
node skills/vercel-optimize/scripts/build-docs.mjs
|
|
20
|
+
node skills/vercel-optimize/scripts/check-docs-fresh.mjs
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Full test loop:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
node --test packages/vercel-optimize-tests/test/*.test.mjs
|
|
27
|
+
node skills/vercel-optimize/scripts/check-docs-fresh.mjs
|
|
28
|
+
node skills/vercel-optimize/scripts/check-citations.mjs
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
- No runtime dependencies. Scripts use Node.js 20+ built-ins and the Vercel CLI.
|
|
34
|
+
- No recommendation without a Vercel metric signal, code evidence when code changes are proposed, and an allow-listed citation.
|
|
35
|
+
- No invented URLs, exact savings projections, or version-mismatched framework APIs.
|
|
36
|
+
- No internal repo paths, service names, customer names, or captured private output in fixtures.
|
|
37
|
+
- Keep generated report copy customer-facing. Put debug details behind `--debug-out`.
|
|
38
|
+
|
|
39
|
+
## Output contracts
|
|
40
|
+
|
|
41
|
+
Every JSON-emitting script must be deterministic: stable key order, stable sort order, 2-space indentation, trailing newline. If a consumed schema changes, update the schema version and the fixture tests in the same PR.
|