agentleFS
fervaldezjrfervaldezjr/agent-ops/skills/ops/incident/SKILL.md

incident

Skill0 starsChanged 2 months agoMITView on GitHub

Diagnoses a production symptom by cross-referencing logs, queues and source code, and returns a diagnosis with evidence. Read-only — it never restarts, purges, replays or deploys. Use when something is stuck, failing or behaving oddly in an environment.

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use runbook, perf 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.
  • AnthropicSkill

    runbook

    Create or update an operational runbook for a recurring task or procedure. Use when documenting a task that on-call or ops needs to run repeatably, turning tribal knowledge into exact step-by-step commands, adding troubleshooting and rollback steps to an existing procedure, or writing escalation paths for when things go wrong.

    Also in 4 projects that use this

  • MicrosoftSkill

    perf

    Speed and memory performance rules for Rust crates, the Node addon, webui-framework, and webui-delivery.

    Also in 3 projects that use this

  • drewdrewthisSkill

    sweep

    Search for similar patterns, anti-patterns, or issues elsewhere in the codebase after a fix or feature. Use after implementing a fix to catch the same bug in other places, or proactively to audit for a known pattern.

    Also in 3 projects that use this

  • OpenAISkill

    observability

    Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.

    Also in 5 projects that use this

  • mijunriSkill

    database

    数据库脚本与操作规范。脚本放在 db_scripts 目录,遵循查询优化、事务、安全等实践。

    Also in 3 projects that use this

  • tuistSkill

    migrate

    Migrates existing Xcode projects to Tuist generated workspaces with build and run validation, external dependency mapping, and migration checklists. Use when adopting Tuist for an existing app or converting a hand-edited Xcode project to generated projects.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Logs around that minute: Search the window, not the last hour:

    line 36
  2. Very specific:

    Source code last, and only where the trace pointed: Read the handler that threw.

    line 45
  3. Very specific:

    Never run a mutating command: No purge, no requeue, no restart, no scale, no deploy, no UPDATE.

    line 83
  4. Very specific:

    Read-only database access only, and always with a LIMIT.

    line 85

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

Incident

Read-only, without exception. This skill diagnoses. A person decides what to do about it. If the conclusion is "purge the queue", it prints the command and stops.

Fill in the four placeholders below once, for your infrastructure. Half an hour of work, and after that the skill knows your stack.

  • LOG_QUERY — how you query logs (Loki, CloudWatch, Datadog…)
  • QUEUE_INSPECT — how you list queue depth read-only
  • SERVICE_MAP — service name to repository path
  • ENVIRONMENTS — what your environments are called

Steps

  1. Pin down the symptom before touching anything. Which environment, which service, since when, and what a user actually sees. Ask if any of the four is missing. A diagnosis built on a guessed environment is worse than none.
  2. Queues first. Dead letter depth tells you where things stopped, and it is one command:

    # QUEUE_INSPECT — read-only listing, no purge, no ack

    A DLQ that grew from zero at a specific minute is the strongest signal you will get. Note the minute.

  3. Logs around that minute. Search the window, not the last hour:

    # LOG_QUERY for {service} between T-5m and T+5m

    Pull a trace id from the first failure and follow that single trace across services. One complete trace beats a thousand log lines.

  4. Source code last, and only where the trace pointed. Read the handler that threw. Check whether the error is typed recoverable or terminal (standards/01-error-handling.md), because that decides whether the retry behaviour you are seeing is correct.
  5. Correlate with what changed. A deploy, a migration, a config change or a dependency bump inside the window:

    git log --since='<window start>' --oneline

Output

## Symptom
<what was reported, and what is actually observable>

## Timeline
<T0: first failure — with the evidence line that proves it>

## Root cause
<the specific thing. If uncertain, say so and give the two candidates.>

## Evidence
- <queue/log/commit — each one chaseable by someone else>

## Recommended action — for a human to run
```bash
<the exact command, unexecuted>

What would prevent a repeat

<one thing, or nothing>


## Rules

- **Never run a mutating command.** No purge, no requeue, no restart, no scale,
  no deploy, no `UPDATE`. Print it, do not run it.
- Read-only database access only, and always with a `LIMIT`.
- **No third-party data in the output.** Ids, not names. Never a payload with
  personal data in it.
- "I do not know yet" is a valid diagnosis. A confident wrong root cause costs
  more than an honest gap.

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.