agentleFS
manastalukdarmanastalukdar/ai-devstudio/skills/canary/SKILL.md

canary

Skill1 starsChanged 7 months agoMITView on GitHub

Monitor a deployment for errors and regressions after shipping — polls logs, error rates, and key endpoints in a configurable loop until the deployment is confirmed healthy or a problem is detected.

  • Reads credentials

42 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use landing-report, pair-agent and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ShreyRaviSkill

    landing-report

    Read-only queue dashboard for workspace-aware ship. Shows which VERSION slots are currently claimed by open PRs, which sibling Conductor workspaces have WIP work likely to ship soon, and what slot /ship would pick next. No mutations — just a snapshot. Use when asked to "landing report", "what's in the queue", "show me open PRs", or "which version do I claim next". (gstack)

    Also in 6 projects that use this

  • seek888Skill

    pair-agent

    Pair a remote AI agent with your browser. One command generates a setup key and prints instructions the other agent can follow to connect. Works with OpenClaw, Hermes, Codex, Cursor, or any agent that can make HTTP requests. The remote agent gets its own tab with scoped access (read+write by default, admin on request). Use when asked to "pair agent", "connect agent", "share browser", "remote browser", "let another agent use my browser", or "give browser access". (gstack) Voice triggers (speech-to-text aliases): "pair agent", "connect agent", "share my browser", "remote browser access".

    Also in 8 projects that use this

  • ayudaySkill

    land-and-deploy

    Land and deploy workflow. Merges the PR, waits for CI and deploy, verifies production health via canary checks. Takes over after /ship creates the PR. Use when: "merge", "land", "deploy", "merge and verify", "land it", "ship it to production".

    Also in 13 projects that use this

  • ayudaySkill

    autoplan

    Auto-review pipeline — reads the full CEO, design, and eng review skills from disk and runs them sequentially with auto-decisions using 6 decision principles. Surfaces taste decisions (close approaches, borderline scope, codex disagreements) at a final approval gate. One command, fully reviewed plan out. Use when asked to "auto review", "autoplan", "run all reviews", "review this plan automatically", or "make the decisions for me". Proactively suggest when the user has a plan file and wants to run the full review gauntlet without answering 15-30 intermediate questions.

    Also in 14 projects that use this

  • ShreyRaviSkill

    plan-tune

    Self-tuning question sensitivity + developer psychographic for gstack (v1: observational). Review which AskUserQuestion prompts fire across gstack skills, set per-question preferences (never-ask / always-ask / ask-only-for-one-way), inspect the dual-track profile (what you declared vs what your behavior suggests), and enable/disable question tuning. Conversational interface — no CLI syntax required.

    Also in 6 projects that use this

  • no-sessionSkill

    design-shotgun

    Design shotgun: generate multiple AI design variants, open a comparison board, collect structured feedback, and iterate. Standalone design exploration you can run anytime. Use when: "explore designs", "show me options", "design variants", "visual brainstorm", or "I don't like how this looks". Proactively suggest when the user describes a UI feature but hasn't seen what it could look like.

    Also in 11 projects that use this

  • +2 more from ayuday

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 35 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Early exit: If all checks pass on the first cycle, report "Deployment healthy — all checks green" and stop.

    line 17
  2. Distinctive:

    If no targets are auto-detected, ask:

    line 34
  3. Distinctive:

    Pass: No new errors

    line 74

“Common” is measured: kept by at least 6 in 10 of the 35 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Canary

I'll watch your deployment after it goes live, polling for errors and regressions until health is confirmed or a problem surfaces. Inspired by gstack's canary skill.

Token Optimization

Expected range: 200–600 tokens per poll cycle, 50 tokens (healthy exit)

Patterns used: Bash for all checks, early exit (all green on first check), progressive disclosure (status line per cycle → details only on failure)

Early exit: If all checks pass on the first cycle, report "Deployment healthy — all checks green" and stop.

Step 1 — Identify What to Monitor

Infer from the project or accept explicit arguments:

# Check for common deployment indicators
ls -la .env .env.production docker-compose.yml Procfile 2>/dev/null

# Check for health endpoint conventions
grep -r "health\|ping\|status" --include="*.json" --include="*.yaml" -l 2>/dev/null | head -5

# Check for error log locations
ls -la logs/ /var/log/app.log 2>/dev/null

If no targets are auto-detected, ask:

  • What URL or endpoint should I poll?
  • Where are the application logs?
  • What error patterns should I watch for?

Step 2 — Configure the Watch Loop

Defaults (override via arguments):

  • Poll interval: 30 seconds
  • Max duration: 10 minutes
  • Error threshold: 2 consecutive failures = alert
  • Success threshold: 3 consecutive passes = declare healthy
# Example: /canary --url https://api.example.com/health --interval 30 --duration 10m

Step 3 — Poll Loop

Each cycle runs these checks in order. Stop looping on first FAIL or when success threshold is reached.

Check A — HTTP Health Endpoint

# Poll the health/status endpoint
status=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 "$HEALTH_URL" 2>/dev/null)
echo "HTTP $status — $(date '+%H:%M:%S')"

Pass: 200–299
Warn: 3xx or slow response (>2s)
Fail: 4xx, 5xx, timeout

Check B — Error Log Scan

# Scan for new errors since last cycle
tail -n 50 "$LOG_FILE" 2>/dev/null | grep -iE "error|exception|fatal|panic|crash" | tail -5

Pass: No new errors
Warn: Errors matching known non-critical patterns
Fail: New unrecognized error or stack trace

Check C — Key Endpoint Smoke Test

# Hit one or two critical endpoints beyond the health check
for endpoint in "${CRITICAL_ENDPOINTS[@]}"; do
    code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 "$endpoint")
    echo "  $endpoint → $code"
done

Check D — Error Rate (if metrics available)

# If a metrics endpoint is available (Prometheus, Datadog, etc.)
# Check error rate is below threshold

Step 4 — Report Each Cycle

Canary — cycle 3/20 — 14:32:05

  ✓ Health endpoint    200 (142ms)
  ✓ Error log          0 new errors
  ✓ /api/users         200
  ✓ /api/health        200

Status: WATCHING (3 consecutive passes — need 3 to declare healthy)

Step 5 — Terminal States

HEALTHY: Three consecutive all-pass cycles:

Canary — HEALTHY after 4 minutes

All checks passed 3× in a row. Deployment is confirmed healthy.

ALERT: Two consecutive failures on any check:

Canary — ALERT — cycle 6

  ✗ Health endpoint    503 (timeout)
  ✓ Error log          0 new errors

Action required: health endpoint is returning 503. Check logs and consider rollback.
Suggest: /deployment-rollback

TIMEOUT: Max duration reached without declaring healthy:

Canary — INCONCLUSIVE after 10 minutes

No failures detected, but success threshold not reached.
Recommend: extend monitoring or check manually.

Edge Cases

  • No health endpoint: Fall back to checking error logs only; note the limitation
  • Flaky endpoint (intermittent 5xx): Apply jitter to poll interval; require 2 consecutive failures to alert
  • No log access: Skip log check; note it was skipped
  • CI environment: Disable interactive output; write results to .claude/canary-results.json

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.