원클릭으로
github-actions-ssh-deploy
// 交互式配置 GitHub Actions 通过 SSH 密钥连接 VPS 的向导。当用户需要设置 GitHub Actions 部署到 VPS、配置 CI/CD SSH 连接、生成部署 workflow 时使用此 skill。通过问答方式收集必要信息后生成完整配置。
// 交互式配置 GitHub Actions 通过 SSH 密钥连接 VPS 的向导。当用户需要设置 GitHub Actions 部署到 VPS、配置 CI/CD SSH 连接、生成部署 workflow 时使用此 skill。通过问答方式收集必要信息后生成完整配置。
交互式生成 GitHub Copilot agents.md 文件的工作流。当用户请求创建代理、构建自定义 Copilot 代理、生成 agents.md 或需要帮助配置 GitHub Copilot 自定义代理时使用。触发短语包括"创建代理"、"生成 agent.md"、"做一个文档代理"、"生成测试代理"等涉及 GitHub Copilot 代理配置的请求。
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
API 接口测试工作流,使用 HTTPie 作为核心工具。当用户需要测试 API 接口、执行接口调用、生成测试报告、管理接口依赖关系、或在项目中建立标准化的接口测试流程时使用此 skill。适用于 RESTful API 测试、接口联调、回归测试等场景。
Framework for building AI agents that work effectively across multiple context windows on complex, long-running tasks. Use when building agents for multi-hour/multi-day projects, implementing persistent coding workflows, creating systems that need state management across sessions, or when an agent needs to make incremental progress on large codebases. Provides initializer and coding agent patterns, progress tracking, feature management, and session handoff strategies.
Specification-Driven Development (SDD) methodology for building software where specifications are executable and drive code generation. Use when users want to: (1) Create feature specifications with /speckit.specify, (2) Generate implementation plans with /speckit.plan, (3) Create executable tasks with /speckit.tasks, (4) Follow test-first, library-first development, or (5) Implement constitutional architecture principles. Essential for structured AI-assisted development workflows.
通过 bird CLI 发布和管理 Twitter/X 内容。使用此 skill 当用户需要:(1) 发布推文或帖子,(2) 回复推文,(3) 读取或获取推文内容,(4) 搜索推文,(5) 查看 mentions/bookmarks/likes,(6) 附带图片或视频发推。触发词包括:发推、tweet、发帖、回复推文、读取推文、Twitter、X 平台。
| name | github-actions-ssh-deploy |
| description | 交互式配置 GitHub Actions 通过 SSH 密钥连接 VPS 的向导。当用户需要设置 GitHub Actions 部署到 VPS、配置 CI/CD SSH 连接、生成部署 workflow 时使用此 skill。通过问答方式收集必要信息后生成完整配置。 |
通过问答式交互,帮助用户完成 GitHub Actions 连接 VPS 的 SSH 配置。
按顺序逐个询问以下信息,每次只问一个问题,等待用户回答后再继续:
必填信息:
可选信息(询问是否需要自定义):
收集完毕后,以表格形式展示所有配置信息,请用户确认:
配置确认:
┌─────────────┬──────────────────────────┐
│ 配置项 │ 值 │
├─────────────┼──────────────────────────┤
│ VPS 主机 │ {host} │
│ SSH 用户名 │ {user} │
│ SSH 端口 │ {port} │
│ 部署路径 │ {deploy_path} │
│ 触发分支 │ {branch} │
│ 部署方式 │ {deploy_method} │
└─────────────┴──────────────────────────┘
请确认以上信息是否正确?(是/否)
确认后,按以下顺序输出:
ssh-keygen -t ed25519 -C "github-actions-deploy" -f ~/.ssh/github_actions -N ""
# 将公钥添加到 VPS(替换 {user} 和 {host})
ssh-copy-id -i ~/.ssh/github_actions.pub {user}@{host}
# 或手动添加
cat ~/.ssh/github_actions.pub | ssh {user}@{host} "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
输出需要在 GitHub 仓库设置的 Secrets:
| Secret 名称 | 值来源 |
|---|---|
SSH_PRIVATE_KEY | cat ~/.ssh/github_actions 的输出内容 |
SSH_HOST | {host} |
SSH_USER | {user} |
SSH_PORT | {port}(仅当非默认 22 时需要) |
根据用户选择的部署方式生成 .github/workflows/deploy.yml:
命令执行方式模板:
name: Deploy to VPS
on:
push:
branches: [{branch}]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd {deploy_path}
{deploy_commands}
rsync 同步方式模板:
name: Deploy to VPS
on:
push:
branches: [{branch}]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy with rsync
run: |
rsync -avz --delete {source_dir}/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:{deploy_path}/
生成配置后,提供分步操作指引:
接下来请按以下步骤操作:
1. 在本地终端运行密钥生成命令
2. 运行 VPS 配置命令,将公钥添加到服务器
3. 前往 GitHub 仓库 -> Settings -> Secrets and variables -> Actions
4. 点击 "New repository secret" 添加上述 Secrets
5. 将 workflow 文件保存到项目的 .github/workflows/deploy.yml
6. 提交并推送代码,触发自动部署
测试连接(可选):
ssh -i ~/.ssh/github_actions {user}@{host}