watch-ci
Skill0 starsChanged 6 months agoMITView on GitHub
Routine Tier 1 que monitora CI do branch main a cada 30 minutos. Se main estiver vermelho, spawna agente que cria branch de fix, corrige e abre PR. Invocar uma vez -- o loop se auto-agenda via ScheduleWakeup.
- Commits and pushes
6 other projects use a version of this.
Adopted by
Most recently taken up by
- OpenEnroth/OpenEnroththeir own version, first seen Oct 9, 2026
- sd0xdev/sd0x-dev-flowtheir own version, first seen Oct 8, 2026
- codervisor/lean-spectheir own version, first seen Oct 8, 2026
- sd0xdev/sd0x-harnesstheir own version, first seen Oct 6, 2026
- k3forx/skillstheir own version, first seen Jul 16, 2026
- codervisor/leanspectheir own version, first seen May 20, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- OpenEnroth/OpenEnroth★ 890same name
- codervisor/lean-spec★ 296same name
- codervisor/leanspec★ 294same name
- sd0xdev/sd0x-dev-flow★ 192same name
- sd0xdev/sd0x-harness★ 192same name
- k3forx/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- frontend/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- frontend/CLAUDE.mdCLAUDE.md
- add-entity-to-auditSkill
- auditSkill
- babysit-prsSkill
- batchSkill
- daily-summarySkill
- factory-metricsSkill
- feature-frontSkill
- featureSkill
- init-projectSkill
- migrateSkill
- planSkill
- register-screenSkill
- review-archSkill
- review-frontSkill
- review-prSkill
- setup-architectureSkill
- setup-designSkill
- setup-infraSkill
- shipSkill
- tasksSkill
- write-jobSkill
- write-migrationSkill
- write-reportSkill
- write-testSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
No inicio de cada iteracao, capturar o diretorio raiz usando o Bash tool com o comando pwd, e guardar o resultado como $repoRoot para uso …
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Voce e o CI watcher do projeto financas-lab. Execute uma iteracao completa e agende a proxima ao final.
No inicio de cada iteracao, capturar o diretorio raiz usando o Bash tool com
o comando pwd, e guardar o resultado como $repoRoot para uso nos passos
seguintes. Definir tambem: $stateFile = "$repoRoot/.claude/watch-ci.state"
Iteracao
Passo 1 -- Verificar CI do branch main
$run = gh run list --branch main --limit 1 `
--json databaseId,conclusion,headSha,status | ConvertFrom-Json | Select-Object -First 1Se $run.status -eq "in_progress" ou $run.status -eq "queued":
- Reportar "main: CI em andamento -- aguardando"
- Ir para Passo 3 (agendar proxima iteracao)
Passo 2 -- Agir conforme resultado
Se $run.conclusion -eq "success":
- Limpar state file se existir:
Remove-Item $stateFile -ErrorAction SilentlyContinue - Reportar "main: CI verde"
- Ir para Passo 3
Se $run.conclusion -eq "failure":
Verificar se ja tentamos fix para este run:
$lastState = if (Test-Path $stateFile) { Get-Content $stateFile | ConvertFrom-Json } else { $null }
$jaProcessado = $lastState -and $lastState.runId -eq $run.databaseIdSe $jaProcessado: reportar "main: CI vermelho (fix ja tentado -- aguarda revisao humana)" e ir para Passo 3.
Se nao processado:
Salvar state:
@{ runId = $run.databaseId; sha = $run.headSha; tentativa = 1 } `
| ConvertTo-Json | Set-Content $stateFileObter logs da falha:
$logsFailed = gh run view $run.databaseId --log-failedSpawnar sub-agente para corrigir:
Usar o Agent tool com subagent_type general-purpose e o seguinte prompt,
substituindo os placeholders pelos valores reais:
Voce e um desenvolvedor senior corrigindo o branch main com CI vermelho. Repo root: {REPO_ROOT}. SHA com falha: {SHA}.
Log de falha
{LOGS_FAILED}Tarefa
Passo 1 -- Entender a falha
Leia o log acima. Identifique qual arquivo e qual linha causaram a falha. A correcao e mecanica (compilacao, teste, lint, import, tipo errado) ou exige decisao de negocio / redesign arquitetural?
Se exigir decisao humana: reportar NAO CORRIGIDO: <motivo> e encerrar.
Passo 2 -- Criar branch e worktree
Set-Location {REPO_ROOT}
git fetch origin
$fixBranch = "fix/ci-main-{SHA_SHORT}"
git worktree add .claude/worktrees/watch-ci-fix $fixBranch --track -b $fixBranch origin/main
Set-Location .claude/worktrees/watch-ci-fixLeia os arquivos relevantes e aplique a correcao minima necessaria.
Passo 3 -- Validar localmente
Se falha em Java/backend:
.\scripts\check.ps1Se falha em frontend:
.\scripts\check-front.ps1Se gate falhar: reportar NAO CORRIGIDO: gate local falhou apos correcao -- <erro>.
Remover worktree: git worktree remove .claude/worktrees/watch-ci-fix --force
Encerrar.
Passo 4 -- Commit, push e PR
git add -A
git commit -m "fix(ci): corrige main vermelho -- <descricao curta>"
git push -u origin $fixBranch
gh pr create --title "fix(ci): corrige main vermelho" `
--body "CI do branch main falhou no SHA {SHA}. Fix automatico via watch-ci routine." `
--base main
git worktree remove .claude/worktrees/watch-ci-fixReportar CORRIGIDO: PR aberto -- <URL>.
Com base no retorno do sub-agente:
- Se
CORRIGIDO: registrar "main: CI auto-fix OK --<PR URL>" - Se
NAO CORRIGIDO: registrar "main: CI vermelho -- auto-fix nao aplicavel:<motivo>"
Passo 3 -- Relatorio e proxima iteracao
Exibir:
[watch-ci HH:MM] main: <CI VERDE | CI EM ANDAMENTO | CI AUTO-FIX OK | CI VERMELHO (manual)>
Proxima verificacao em 30 minutos.Usar ScheduleWakeup:
- delaySeconds: 1800
- reason: "proxima iteracao do watch-ci"
- prompt:
<<autonomous-loop-dynamic>>
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

