agentleFS
sentineldesksentineldesk/agent/skills/log-analysis/SKILL.md

log-analysis

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Read this machine's logs to answer a question — what failed, when it started, what changed, whether it is still happening — using journalctl's filters instead of dumping and eyeballing. Use when asked what went wrong, to find when something began, or to check whether a fix held.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    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
  1. Very specific:

    Add -o short-iso when you need to line events up against something else, and --no-pager always — a pager on a non-interactive command hangs …

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Filter in the journal, not in your context

journalctl with no arguments is tens of thousands of lines, and pulling it into the conversation costs more than the answer is worth — a large result is spilled to a locator and you end up paging through it anyway. Every filter below happens on the machine, so what comes back is already the part that matters.

check_errors first, always. It is the dedicated tool, it costs one call, and on a machine with an obvious problem it is the whole investigation.

The filters worth knowing

Each of these answers a different question, and picking the right one is most of the skill:

  • What is broken, this boot — journalctl -p 3 -b --no-pager (-p 3 is err and worse; -p 4 adds warnings when err is empty).
  • What does this unit say — journalctl -u <unit> -n 100 --no-pager. The last lines before it stopped are the ones that matter; read the tail.
  • When did it start — journalctl --since "2 hours ago" or --since "2026-08-24 09:00". Narrow by time before narrowing by content: an error that has been there for a month is not the one that broke this morning.
  • The boot before this one — journalctl -b -1 -p 3. This is how you read a crash: the evidence is in the boot that ended, not the one you are in.
  • Follow, bounded — journalctl -u <unit> -f never returns, so it is a job and never a plain command. job_start, work, then job_abort. Waiting on a follow with job_wait is waiting forever.

Add -o short-iso when you need to line events up against something else, and --no-pager always — a pager on a non-interactive command hangs waiting for a keypress nobody can send.

Files that are not in the journal

Application logs still live under /var/log and in home directories. run_command "grep -n <pattern> /var/log/<file>" beats read_file for a large one: grep returns the matching lines and read_file returns the file. For something genuinely huge, make the grep a job.

terminal_read is the other half people forget: it shows what a person typed in the shared terminal as well as what the agent ran. When the question is "what happened just before it broke", that is often where the answer is.

What an answer looks like

A log line pasted on its own is evidence without a claim. Say what you think happened, quote the line that says so, and give the timestamp. If the log does not answer the question, say what you searched and over what window — a negative result with its scope is useful, and a bare "nothing found" makes somebody redo the search.

Logs carry secrets

A trace can hold a token, a connection string, or a session cookie. You are reading into a conversation that is recorded, so quote the line that proves your point and not the twenty around it — and if the proof itself is a credential, say what you found without reproducing it.

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.