agentleFS
sentineldesksentineldesk/agent/skills/incident-triage/SKILL.md

incident-triage

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Diagnose a failing service or a misbehaving Linux box through a hypothesis-driven loop over the MCP tools — read the journal, check the unit, the ports, the disk, the memory, the recent changes — before touching anything. Use when something is down, slow, or throwing errors and the cause is not yet known. Read-first; every fix is stated before it runs.

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use write-runbook, threat-hunting and 6 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.
  • MaheshAwasareSkill

    write-runbook

    Generate an operational runbook for a service from its code, config, and dependencies — what to do when it breaks, where to look, how to roll back, who to escalate to. Use proactively before a service goes to production, after a major incident, or when handing off operational ownership.

    Also in 3 projects that use this

  • allanninalSkill

    threat-hunting

    Hunt threats using Sigma detection rules and security analysis techniques. Use when investigating security incidents, creating detection rules, or analyzing suspicious activity.

    Also in 3 projects that use this

  • srclightSkill

    explore-codebase

    This skill should be used when the user asks to "explore this codebase", "understand this project", "give me an overview", "how does this work", "onboard me", "walk me through the architecture", "map the codebase", or any request to understand a codebase's structure, architecture, or design.

    Also in 3 projects that use this

  • thlaureSkill

    review-change

    Use this skill when the user asks for a code review, a correctness pass, a check before PR, or asks whether a Signalist change follows project conventions.

    Also in 4 projects that use this

  • SentrySkill

    write-tests

    Write tests following project conventions. Use when adding new tests or modifying existing ones.

    Also in 3 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every reading below is run_command (visible, exit code returned) or a dedicated tool.

    line 18
  2. Distinctive:

    Prefer the smallest fix that tests the hypothesis: clear the specific full partition, restart the one unit, fix the one permission.

    line 56
  3. Very specific:

    After the fix, re-run the reading that showed the symptom.

    line 63

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

The loop, and why it is a loop

Guessing is how a dead service becomes two dead services. Diagnose by hypothesis: form one, make one reading that would confirm or kill it, and only then act. check_errors exists for exactly this first pass — use it before you start reading raw logs by hand.

Every reading below is run_command (visible, exit code returned) or a dedicated tool. Nothing here changes the machine until the "act" section, which announces itself first.

1. What is actually wrong

  • The symptom, precisely. "It is down" is three different problems: the process is not running, it is running and not listening, or it is listening and refusing. service_control <unit> status, then list_processes, then run_command "ss -tulpn".
  • What it is saying. run_command "journalctl -u <unit> -n 100 --no-pager" and journalctl -p 3 -b for this-boot errors across everything. The last lines before it stopped are the ones that matter — read the tail, not the head.
  • What changed. run_command "journalctl -b -1 -p warning" for the previous boot; recent package changes via run_command "grep -E 'install|upgrade' /var/log/dpkg.log | tail -40". Most incidents are a change nobody connected to the symptom.

2. The four resources that cause most of it

  • Disk full — the commonest and most disguised. run_command "df -h" and run_command "df -i" (inodes fill silently). A full / breaks things that look unrelated: a service that cannot write its socket, a database that cannot extend, a log that stopped mid-line.
  • Memory / OOM — run_command "free -h", then run_command "dmesg -T | grep -i oom". A process that "crashed" may have been killed by the kernel.
  • A dependency — the database, the socket, the mount, DNS. If the unit needs another and that one is down, fix the cause, not the symptom.
  • Permissions / SELinux/AppArmor — a service that starts and immediately dies is often a file it can no longer read. The journal says so; read it.

3. Act — say it first, then do it

State the hypothesis, the fix, and how you will confirm it, in one line, before you run it. Restarting a service a person is mid-request on is itself an incident: desktop_state says who is here; a service_control restart on a shared box is worth a word first, or an ask_human if the call is theirs.

Prefer the smallest fix that tests the hypothesis: clear the specific full partition, restart the one unit, fix the one permission. A reboot "to be sure" throws away the state that would have told you the cause, so it is the last move, not the first.

4. Confirm, and leave the trail

After the fix, re-run the reading that showed the symptom. ok from service_control is not recovery — the port answering is. Then say, in one paragraph: what was wrong, the evidence, what you changed, and how you confirmed it. The action log already has every command; your summary is the why that the log cannot hold, and it is what makes the next person's incident shorter.

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.