AgentSkillsCN

deploy-verify

验证部署状态、健康状况及启动情况。当用户输入 /deploy-verify 或请求检查部署进度时,可使用此技能。

SKILL.md
--- frontmatter
name: deploy-verify
description: "Verify deployment status, health, and startup. Use when user says /deploy-verify or asks to check deployment."
user-invocable: true
allowed-tools:
  - Read
  - Bash
  - Glob
  - Grep

Deploy Verify

Purpose

Verify that services deployed correctly after a deployment. Provides a systematic checklist to confirm service health, successful startup, and proper operation.

When to Use

  • After running a deployment workflow
  • Checking if services are healthy
  • Investigating deployment failures
  • Verifying rollback success

Quick Reference

  • Setup: /deploy-verify configure (run once during framework setup)
  • Usage: /deploy-verify (uses saved config)
  • Update: /deploy-verify learn (re-analyze deployment setup)
  • Config: .claude/skills/deploy-verify.yaml

Commands

CommandPurposeWhen to Use
/deploy-verify configureAuto-detect deployment platform and servicesFramework setup / wizard
/deploy-verify learnUpdate config from current deployment setupAfter infrastructure changes
/deploy-verifyRun verification against saved configNormal usage

/deploy-verify configure

When: Framework setup wizard (one-time)

What it does:

  1. Detects deployment platform (Kubernetes, Cloud Run, Docker, etc.)
  2. Identifies services and their health endpoints
  3. Discovers CI/CD workflow configuration
  4. Proposes verification configuration to user
  5. Saves to .claude/skills/deploy-verify.yaml

Discovery Process

code
1. DETECT PLATFORM
   ├─ Kubernetes: k8s/, kubernetes/, helm/
   ├─ Cloud Run: deploy with gcloud run
   ├─ Docker Compose: docker-compose.yaml
   ├─ AWS ECS: ecs/, task-definition.json
   ├─ Serverless: serverless.yaml
   └─ Custom: Makefile, Taskfile.yaml targets

2. IDENTIFY SERVICES
   ├─ Scan deployment configs for service names
   ├─ Find health check endpoints
   └─ Detect environment variables

3. DISCOVER CI/CD
   ├─ GitHub Actions: .github/workflows/deploy*.yaml
   ├─ GitLab CI: .gitlab-ci.yml
   ├─ CircleCI: .circleci/config.yml
   └─ Custom: Taskfile.yaml, Makefile

4. PROPOSE TO USER
   └─ Show discovered config, wait for approval

Proposal Format

yaml
# Proposed Deploy Verify Configuration
# Review and approve to save to .claude/skills/deploy-verify.yaml

platform:
  type: kubernetes  # kubernetes | cloud-run | docker-compose | ecs | custom
  project: my-project
  region: us-central1

services:
  - name: api
    health_endpoint: /health
    expected_status: 200
    startup_log: "Server started"
  - name: worker
    health_endpoint: /healthz
    expected_status: 200
    startup_log: "Worker ready"

ci_cd:
  workflow: .github/workflows/deploy.yaml
  check_command: "gh run list --workflow=deploy.yaml --limit=1"

verification:
  commands:
    list_services: "kubectl get deployments -n production"
    check_health: "curl -f {health_endpoint}"
    check_logs: "kubectl logs -l app={service} --since=10m"

  checks:
    - name: deployment_status
      command: "kubectl rollout status deployment/{service}"
    - name: pod_health
      command: "kubectl get pods -l app={service} -o jsonpath='{.items[*].status.phase}'"

Save Location

Config path depends on how the plugin was installed:

Plugin ScopeConfig FileGit
project.claude/skills/deploy-verify.yamlCommitted (shared)
local.claude/skills/deploy-verify.local.yamlIgnored (personal)
user.claude/skills/deploy-verify.local.yamlIgnored (personal)

Precedence when reading (first found wins):

  1. .claude/skills/deploy-verify.local.yaml
  2. .claude/skills/deploy-verify.yaml
  3. Skill defaults

/deploy-verify learn

When: Infrastructure or deployment setup changed

What it does:

  1. Re-scans deployment configuration
  2. Updates service list and health endpoints
  3. Proposes config updates to user
  4. Updates .claude/skills/deploy-verify.yaml

/deploy-verify (Normal Usage)

When: After deployment, to verify success

Requires: .claude/skills/deploy-verify.yaml exists

Verification Workflow

code
1. CHECK CI/CD STATUS
   └─ Verify deployment workflow completed successfully

2. LIST SERVICES
   └─ Confirm expected services are deployed

3. CHECK SERVICE STATUS
   └─ Verify services report ready/healthy

4. CHECK FOR ERRORS
   └─ Query recent logs for errors

5. VERIFY STARTUP LOGS
   └─ Confirm expected startup messages present

6. RUN HEALTH CHECKS
   └─ Hit health endpoints, verify responses

7. GENERATE REPORT
   └─ Compile results into summary

Verification Levels

LevelQuestionChecks
ProcessDid deployment complete?CI/CD workflow status, exit code
ServiceAre services running?Service status, ready conditions
StartupDid services start cleanly?Startup logs, no critical errors
HealthAre services responding?Health endpoints, basic operations

Report Format

code
## Deployment Verification Report

**Environment:** production
**Deployment Time:** 2026-01-25T13:25Z
**Workflow:** deploy.yaml #144 - Success

### Service Status
| Service | Status | Health | Errors |
|---------|--------|--------|--------|
| api | Running | 200 OK | None |
| worker | Running | 200 OK | None |

### Startup Verification
| Service | Expected Log | Found |
|---------|--------------|-------|
| api | "Server started" | Yes |
| worker | "Worker ready" | Yes |

### Overall: PASSED

Platform Examples

Kubernetes

yaml
# .claude/skills/deploy-verify.yaml
platform:
  type: kubernetes
  namespace: production

verification:
  commands:
    list_services: "kubectl get deployments -n {namespace}"
    check_status: "kubectl rollout status deployment/{service} -n {namespace}"
    check_logs: "kubectl logs -l app={service} -n {namespace} --since=10m | grep -i error"
    check_health: "kubectl exec deploy/{service} -- curl -f localhost:{port}/health"

Docker Compose

yaml
# .claude/skills/deploy-verify.yaml
platform:
  type: docker-compose
  compose_file: docker-compose.yaml

verification:
  commands:
    list_services: "docker compose ps"
    check_status: "docker compose ps {service} --format json"
    check_logs: "docker compose logs {service} --since 10m | grep -i error"
    check_health: "curl -f http://localhost:{port}/health"

Cloud Run (GCP)

yaml
# .claude/skills/deploy-verify.yaml
platform:
  type: cloud-run
  project: my-project
  region: us-central1

verification:
  commands:
    list_services: "gcloud run services list --region={region} --project={project}"
    check_status: "gcloud run services describe {service} --region={region} --format='yaml(status.conditions)'"
    check_logs: "gcloud logging read 'resource.labels.service_name=\"{service}\" AND severity>=ERROR' --limit=20"

Custom (Taskfile)

yaml
# .claude/skills/deploy-verify.yaml
platform:
  type: custom

verification:
  commands:
    check_status: "task deploy:status"
    check_health: "task deploy:health"
    check_logs: "task deploy:logs -- --errors"

Common Issues

IssueSymptomResolution
Service not readyStatus shows pending/not readyCheck container logs for startup errors
Health check failsEndpoint returns non-200Check service logs, verify port binding
No startup logsMissing expected messagesContainer may have crashed on startup
Deployment timeoutWorkflow stuck or failedCheck resource limits, image pull issues
Config mismatchService behaves unexpectedlyVerify environment variables deployed

Automation

See skill.yaml for patterns and procedures. See sharp-edges.yaml for common deployment verification pitfalls.