Skip to content

Use the Logbrook agent skill

Give a coding agent the Logbrook skill to install, connect and investigate.

Updated

The Logbrook repository ships an agent skill in skills/logbrook. It gives a coding agent the steps to deploy Logbrook, connect an application to it, and investigate the logs in an index. Install it, then ask your agent for one of those jobs in plain language.

What the skill does

The agent follows only the path the task needs, so querying an existing server doesn’t trigger a new deployment.

Task What the agent does Reference file
Install Pulls a published image, creates a .env with generated tokens, runs Logbrook with Docker or Docker Compose, and sets up storage, retention and indexes. references/installation.md and assets/compose.yaml
Connect Configures an application or collector to send logs: HTTP ingestion, Pino for Node.js, or Docker and collectors over Fluent Forward. references/application-logging.md and references/forward.md
Investigate Searches, counts, groups by facets, builds histograms, compares time windows, exports every page and follows new errors. references/queries-and-insights.md

Each job has a completion check:

  • Install: the server is ready, storage survives a container restart, and a synthetic event can be ingested and queried.
  • Connect: a uniquely identifiable record from the real application reaches the chosen index, and queued logs drain on shutdown.
  • Investigate: the answer names the index, time bounds, filters, matching counts and supporting events, and separates observed patterns from hypotheses.
  • logbrook
    • SKILL.md
    • agents
      • openai.yaml
    • assets
      • compose.yaml
    • references
      • application-logging.md
      • forward.md
      • installation.md
      • queries-and-insights.md

SKILL.md tells an agent when to use the skill and points it to the right reference. The references ship with the skill, so it works outside a Logbrook checkout. The commands assume Bash or Zsh, Docker with the Compose plugin, curl and jq. The Pino examples also need Node.js and npm.

Install the skill

To use the skill in every project, copy skills/logbrook into your home directory:

git clone https://github.com/sandrinodm/logbrook.git
mkdir -p ~/.claude/skills
cp -R logbrook/skills/logbrook ~/.claude/skills/

For one project only, copy it into that project instead:

mkdir -p .claude/skills
cp -R /path/to/logbrook/skills/logbrook .claude/skills/

Start a new Claude Code session to pick up the skill. Claude loads it when a request matches its description, such as deploying Logbrook or searching its logs.

Copy the whole skills/logbrook directory to wherever your agent reads skills. Keep the directory structure, because SKILL.md links to its references by relative path. agents/openai.yaml holds a display name, a short description and a default prompt for agents that read that file. If your agent has no skill support, add SKILL.md and the files it links to as context for the task.

Example prompts

Describe the outcome you want. The agent asks only for details that change the work, such as the server URL, the index and the credential role.

Install

  • “Use the logbrook skill to run Logbrook with Docker Compose in this directory, with a persistent volume.”
  • “Set up Logbrook on this machine and verify that a test event survives a container restart.”

Connect

  • “Connect this Node.js service to Logbrook with Pino. Send logs to the apps index and flush on shutdown.”
  • “Send the logs of my Compose services to Logbrook through Docker’s fluentd driver.”

Investigate

  • “In the apps index, find the errors from the last hour and tell me which services are affected.”
  • “Compare error counts for checkout between the last hour and the same hour yesterday.”
  • “Export every payment timeout event from the last day and group them by request ID.”

Safety rules

The skill tells the agent to work within these limits:

  • Credentials stay out of the conversation. Tokens live in the environment or a local secret file. Ingestion tokens write, read tokens query, and admin tokens manage indexes but can’t read events.
  • Deleting data needs its own request. The agent doesn’t delete an index or a volume, or shorten retention, as part of setup or an investigation.
  • Investigations don’t write. An investigation-only request uses events that are already stored, not demonstration events.
  • Reuse before replacing. The agent reuses your existing deployment and configuration, and keeps an existing collector’s configuration until a separate migration has verified counts and a rollback path.
  • No invented guarantees. The agent doesn’t present configured limits as measured capacity, and doesn’t claim clustering or exactly-once delivery. A response that was lost can store a batch twice.

Review any command that changes a server before the agent runs it.

Agent-readable documentation

An agent can read this site without scraping HTML:

  • Every page has a Markdown version. Add index.md to the page path, for example /logbrook/send-logs/http/index.md.
  • /logbrook/llms.txt lists every page with its description. Each section also has its own llms.txt, such as /logbrook/query/llms.txt.
  • /logbrook/llms-full.txt contains the full text of the documentation in one file.

Next steps

Type to search…

↑↓ navigate↵ selectEsc close