Agent Skills
› jhd3197/ServerKit
› deploy
deploy
GitHub通过SSH将ServerKit部署到生产服务器,执行更新、前端重建、服务重启及健康检查,并在失败时提供回滚建议。
Trigger Scenarios
向生产环境推送代码变更
执行应用发布流程
Install
npx skills add jhd3197/ServerKit --skill deploy -g -y
SKILL.md
Frontmatter
{
"name": "deploy",
"description": "Deploy ServerKit to the production server via SSH. Runs update, rebuilds frontend, restarts services, and performs health checks. Use when pushing changes to production.",
"allowed-tools": "mcp__ssh-mcp__exec, mcp__ssh-mcp__sudo-exec, Bash",
"argument-hint": "[branch]",
"disable-model-invocation": true
}
Deploy ServerKit to the production server. Target branch: ${ARGUMENTS:-main}
Pre-deploy Checks
- Check the current git status locally — warn if there are uncommitted changes
- Check if the local branch is ahead of remote — warn if unpushed commits exist
Deploy Steps
Run these on the remote server via SSH MCP:
1. Check current state
serverkit version
serverkit status
2. Run the update
serverkit update --branch ${ARGUMENTS:-main}
This will:
- Stop services
- Pull latest code from the target branch
- Update Python dependencies
- Sync app templates
- Rebuild frontend Docker container
- Restart all services
3. Health check (wait 10 seconds after update)
curl -s http://127.0.0.1:5000/api/v1/system/health
curl -s http://localhost
serverkit status
4. Report results
Report clearly:
- Previous version vs new version
- Which branch is deployed
- Backend status (systemd)
- Frontend status (Docker)
- API health check result
- Any errors from logs:
journalctl -u serverkit -n 20 --no-pager
On Failure
If any health check fails:
- Show the last 50 lines of backend logs:
journalctl -u serverkit -n 50 --no-pager - Show frontend Docker logs:
cd /opt/serverkit && docker compose logs --tail=50 - Suggest rollback:
serverkit update --branch main --force
Version History
- 46a94c9 Current 2026-08-20 07:49


