Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

surge-deploy激增部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

285

周安装

12

GitHub Stars

1

下载量

1
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:surge-deploy(激增部署)
来源仓库:https://github.com/aruntemme/surge-deploy
仓库路径:skills/surge-deploy
安装命令:
npx skills add https://github.com/aruntemme/surge-deploy --skill surge-deploy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aruntemme/surge-deploy --skill surge-deploy

简介

surge-deploy 用于辅助云资源、部署、容器、基础设施和运维自动化任务。

  • 适合让 Agent 检查配置、整理部署步骤、分析资源状态或生成排障思路。
  • 使用时需明确目标环境、账号权限与区域,区分测试与生产操作。
  • 涉及删除资源或修改网络配置时,应先确认影响范围。
  • 建议结合原始 README 核验具体功能与使用限制。

SKILL.md

Surge Deploy

Deploy any website's build output to the web in seconds using surge.sh. Works with React, Vite, Vue, Next.js (static export), Astro, SvelteKit, Hugo, 11ty, plain HTML - anything that produces a folder of static files after build.

Scope: Surge serves static files. If the project needs server-side rendering, serverless functions, or API routes at runtime, use Vercel/Netlify instead.

Domain Memory

Surge deploy tracks the domain for each project so re-deploys always go to the same URL.

How it works

After a successful first deploy, save the domain in a .surge-domain file at the project root:

echo "my-project.surge.sh" > .surge-domain

On every subsequent deploy, always check for this file first:

cat .surge-domain 2>/dev/null
  • If .surge-domain exists, use that domain (no need to ask the user)
  • If it does not exist, generate or ask for a domain, deploy, then create the file
  • Add .surge-domain to .gitignore if a .gitignore exists, to keep it local:
grep -qxF '.surge-domain' .gitignore 2>/dev/null || echo '.surge-domain' >> .gitignore

Overriding the saved domain

If the user explicitly provides a different domain, use that instead and update .surge-domain with the new value.

Quick Reference

ActionCommand
Deploysurge./path name.surge.sh
List projectssurge list
Tear downsurge teardown name.surge.sh
Check authsurge whoami
View filessurge files name.surge.sh
Bust cachesurge bust name.surge.sh
Rollbacksurge rollback name.surge.sh

Pre-Deploy Checklist

Run these checks in order before every deployment:

1. Check if surge is installed

which surge

If not found, install it:

npm install -g surge

If npm is not available, try npx surge as a fallback (works without global install).

2. Check authentication

surge whoami

If not authenticated, do NOT attempt to run surge login programmatically - it is interactive and requires the user to type their email and password.

Instead, inform the user:

Surge requires a one-time login. Run this in your terminal: `` surge login `` This takes 30 seconds - enter your email and password (or create a free account). Once done, authentication persists forever until you explicitly log out.

Then stop and wait for the user to confirm they've logged in before proceeding.

For CI/CD or token-based auth, check for environment variables:

  • SURGE_LOGIN - email address
  • SURGE_TOKEN - authentication token (get one via surge token)

3. Identify the deploy folder

Determine the correct folder to deploy. Common patterns:

FrameworkBuild commandOutput folder
Plain HTML/CSS/JSNone neededProject root or ./
React (CRA)npm run build./build
Vitenpm run build./dist
Next.js (static)next build && next export./out
Astronpm run build./dist
SvelteKit (static)npm run build./build
Hugohugo./public
11tynpx eleventy./docs or ./_site

If the project has a package.json with a build script, run the build first:

npm run build

If the folder contains only HTML/CSS/JS files with no build step, deploy the folder directly.

4. Verify the folder has an index.html

ls <deploy-folder>/index.html

If missing, check for common issues:

  • Wrong folder selected (try ./build, ./dist, ./out, ./public)
  • Build step was skipped
  • SPA without an index.html at root

5. Handle SPA routing (Single Page Apps)

For SPAs using client-side routing (React Router, Vue Router, etc.), create a 200.html that is a copy of index.html:

cp <deploy-folder>/index.html <deploy-folder>/200.html

This tells surge to serve index.html for all routes, preventing 404s on direct URL access or page refresh.

Deploy

Resolve the domain

Follow this priority order:

  1. User explicitly provided a domain → use it
  2. .surge-domain file exists in project root → read and use it (this is a re-deploy)
  3. Neither → generate a new domain:

- Use the project folder name or package.json name field - Sanitize: lowercase, replace spaces/underscores with hyphens, remove special characters - Append .surge.sh - Example: my-cool-project.surge.sh - If the name is very generic (e.g., app, project), add a short random suffix: echo "my-project-$(head -c 4 /dev/urandom | xxd -p).surge.sh"

Run the deploy

surge <deploy-folder> <domain>.surge.sh

Save the domain (critical)

After a successful deploy, always persist the domain:

echo "<domain>.surge.sh" > .surge-domain
grep -qxF '.surge-domain' .gitignore 2>/dev/null || echo '.surge-domain' >> .gitignore

This ensures the next /surge re-deploys to the same URL automatically.

Verify deployment

After surge completes, confirm the URL is live:

curl -s -o /dev/null -w "%{http_code}" https://<domain>.surge.sh

A 200 status confirms success. Present the live URL to the user prominently:

Your site is live at: https://domain.surge.sh

Post-Deploy Operations

List all deployed projects

surge list

Tear down a deployment

surge teardown <domain-name>.surge.sh

Always confirm with the user before tearing down.

Update an existing deployment

Re-deploy to the same domain to update:

surge <deploy-folder> <existing-domain>.surge.sh

This overwrites the previous version instantly.

Rollback to previous version

surge rollback <domain-name>.surge.sh

Bust CDN cache

If changes aren't showing after re-deploy:

surge bust <domain-name>.surge.sh

Custom Domains

Surge supports custom domains even on the free plan:

  1. Deploy to the custom domain: surge./dist mydomain.com
  2. Add a CNAME record pointing to na-west1.surge.sh at the DNS provider
  3. Wait for DNS propagation (can take up to 48 hours, usually minutes)

Inform the user of the DNS step - the agent cannot configure DNS records.

Error Handling

ErrorCauseFix
Not authorizedNot logged inRun surge login
Domain already takenAnother user owns that subdomainChoose a different name
No index.htmlMissing entry pointCheck deploy folder path
ENOENTFolder doesn't existVerify the path
EACCESPermission deniedCheck folder permissions

Additional Resources

Reference Files

  • references/custom-domains.md - Detailed custom domain and SSL setup guide
  • references/ci-cd.md - CI/CD integration patterns (GitHub Actions, GitLab CI, etc.)

Example Files

  • examples/deploy-react.sh - Deploy a React/Vite app
  • examples/deploy-static.sh - Deploy plain HTML/CSS/JS
  • examples/github-action.yml - GitHub Actions workflow for auto-deploy

Scripts

  • scripts/preflight.sh - Run all pre-deploy checks automatically

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.78%
按下载量换算0

Claude

28.86%
按下载量换算0

Cursor

20.17%
按下载量换算0

Gemini CLI

9.51%
按下载量换算0

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills