/caddis-extras:deploy-localfrom caddis-extras
Local deployment loop for Gitea-hosted projects: commit on dev, push, watch the golden CI/build/deploy workflow, check prod, and fix lint/test/pipeline failures until the deploy is healthy.
Ships in caddis-extras. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run reliable local-to-prod delivery for repositories hosted on a self-hosted Gitea.
Use this skill when requests include any of:
Load these first when they exist (your org may ship private deploy skills):
golden-workflow skill (CI/CD workflow contract)windows-deployment skill (NSSM + reverse proxy).github/skills/devops/ci-cd-pipeline/SKILL.md.github/skills/devops/git-commit/SKILL.mdOptional:
.github/skills/devops/gh-cli/SKILL.md for issue/PR linking.github/skills/workflow/verification-loop/SKILL.md for stricter local validation loopsResolve these from your project config (e.g. a repo-local config/.env.gitea) — do not hardcode:
$env:GITEA_BASE_URL (e.g. http://gitea.example:8090, API at .../api/v1)<org>devprod$env:PROD_HOST<prod-checkout-root>\<repo>The deploy-critical path is SHA-driven:
main triggers the canonical .gitea/workflows/ci.yml.lint_and_test and any repo-relevant frontend checks run on dev.deploy_prod runs on prod only after gates pass.release_metadata creates/pushes the CalVer Git tag only after deploy success.CalVer is release metadata, not the deploy identity. Do not reintroduce tag-first deploy logic.
git status --short..gitea/workflows/ci.yml; do not invent database or frontend gates.ruff check . (required), then format/tests as configured.ruff/lint checks).main for prod deploy.Example:
git status --short
git add <files>
git diff --cached --name-only # only <files>; else stop and report
git commit -m "fix(ci): resolve deploy health check" -- <files>
git push origin main
git rev-parse HEAD
Before calling the Gitea API, normalize token variables from the repo-local
config/.env.gitea file when it exists. The shell environment can be stale even
when the repo has a valid token file.
$envFile = Join-Path (Get-Location) "config/.env.gitea"
if (Test-Path $envFile) {
Get-Content $envFile | ForEach-Object {
$line = $_.Trim()
if (-not $line -or $line.StartsWith("#") -or $line -notmatch "=") { return }
$key, $value = $line -split "=", 2
if ($key -in @("GITEA_TOKEN", "REPO_API", "GITEA_BASE_URL")) {
Set-Item -Path "Env:$($key.Trim())" -Value $value.Trim().Trim('"').Trim("'")
}
}
}
Monitor the run lifecycle in Gitea:
ci.yml@refs/heads/main run for the pushed SHA.lint_and_testfrontend_checks when presentdeploy_prodrelease_metadatanotifydeploy_prod and release_metadata are skipped.Gitea API shape:
$headers = @{ Authorization = "token $env:GITEA_TOKEN" }
$runs = Invoke-RestMethod -Uri "$env:GITEA_BASE_URL/api/v1/repos/<org>/<repo>/actions/runs?limit=10" -Headers $headers
$run = $runs.workflow_runs |
Where-Object { $_.head_sha -eq "<expected-sha>" -and $_.path -like "ci.yml@refs/heads/main" } |
Select-Object -First 1
$jobs = Invoke-RestMethod -Uri "$env:GITEA_BASE_URL/api/v1/repos/<org>/<repo>/actions/runs/$($run.id)/jobs" -Headers $headers
$jobs.jobs | Select-Object name,status,conclusion,started_at,completed_at
For Windows prod flow, validate:
Example:
Invoke-Command -ComputerName $env:PROD_HOST -ScriptBlock {
$root = "<prod-checkout-root>\<repo>"
Set-Location $root
[pscustomobject]@{
Head = (git rev-parse HEAD)
Branch = (git branch --show-current)
Status = ((git status --short) -join '; ')
Services = Get-Service -Name "app-<short>-*" -ErrorAction SilentlyContinue |
Select-Object Name,Status,DisplayName
ApiPort = Get-NetTCPConnection -LocalPort <api-port> -State Listen -ErrorAction SilentlyContinue |
Select-Object LocalAddress,LocalPort,OwningProcess
Health = Invoke-RestMethod -Uri "http://127.0.0.1:<api-port>/health" -TimeoutSec 5
Version = Invoke-RestMethod -Uri "http://127.0.0.1:<api-port>/api/version" -TimeoutSec 5
}
}
Use windows-deployment skill patterns for NSSM and reverse proxy checks.
Validate release metadata after prod health is confirmed:
release_metadata job succeeded or was intentionally skipped by policy.Do not mark production unhealthy solely because a release tag failed after a successful deploy. Report it as a release metadata failure and fix it separately unless it affects service health.
git fetch --tags --force
git tag --points-at <deployed-sha> | Where-Object { $_ -match '^v\d{4}\.\d{2}\.\d{2}\.\d+$' }
If a run is stuck waiting:
runs-on labels match available runners.concurrency groups for blocking in-progress jobs.Do not change runner labels or re-register runners from an app repo.
release_metadata separately after confirming prod is healthy.All must be true:
ci.yml@refs/heads/main run completed.## Deploy Local Report
- Repo:
- Branch:
- Commit:
- CI Run:
- Gate Results:
- lint/test:
- frontend:
- deploy:
- release_metadata:
- notify:
- Prod Validation:
- host:
- SHA:
- services:
- health:
- version:
- Fixes Applied:
- Final Status:
- Follow-ups:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub saajunaid/caddis-plugin --plugin caddis-extrasOther plugins' skills for the same job
81 skills in this plugin
/adopt-rbacPointer to the org's RBAC adoption skill. Use for "add RBAC to this app" or "adopt rbac-kit"./agent-md-refactorRefactor bloated agent instruction files (AGENTS.md, .cursorrules, .github/ files) into linked, progressively disclosed docs./agent-orchestrationBlueprint for orchestrating the agent pipeline from spec to planning, implementation, testing and debugging, plus when a second model is worth it, the intent→model map and cost guardrails.