slagyr/agent-lib/logging

Claude Code and agent skill by slagyr/agent-lib

Trust tier 3
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Use this skill when adding logging to production code or asserting on log output in tests. Covers structured logging, level discipline (info/warn/error/debug), event-keyword conventions (:domain/action), and feature-test assertions on log entries.

Install

npx vskill@latest install slagyr/agent-lib/logging

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as slagyr/isaac/logging.

Logging Discipline

When This Skill Applies

Use this skill whenever you are adding log calls to production code, deciding what level a log entry deserves, or writing tests that assert on log output.

Structured maps, not strings

Log entries must be structured maps, never raw strings. A structured map is filterable, searchable, and assertable. A raw string is none of those.

clojure
;; GOOD — structured
(log/info {:event :session/created :session-id id :provider :anthropic})
;; BAD — raw string
(log/info (str "Session created: " id))

Include contextual identifiers — session, user, route, tool, provider — when available. Future-you will thank present-you when grepping logs at 2am.

Levels

Only info and above are spec-worthy in feature assertions. Debug is for internal tracing; tests should not assert on debug output.

LevelUse for
infoLifecycle events: created, opened, started, completed
warnDegraded-but-continuing states (override, retry, fallback)
errorFailure paths visible to the operator
debugInternal tracing — not asserted in tests
Rules for new code
  • Emit info for session lifecycle, request lifecycle, server lifecycle, long-running operations.
  • Emit error for all failure paths visible to the operator.
  • Emit warn for degraded-but-continuing states (e.g. config override accepted, slow path engaged).
  • Emit debug for internal tracing; do not add feature assertions for debug events.
  • Network, tool, and boundary code must log failures as structured maps.
  • Every new info+ log call needs a feature scenario asserting it.

Event keyword convention

Event names follow :domain/action — keyword namespace identifies the subsystem, name identifies what happened. Keep them grep-friendly.

clojure
:session/created
:session/compaction-started
:tool/exec
:tool/execute-failed
:auth/login
:server/started
:config/set
:config/schema-registered

This is the single most important logging convention. It makes events discoverable (grep ':session/'), filterable in log pipelines, and unambiguous when multiple subsystems emit similar-sounding events.

Feature assertion pattern

gherkin
Then the log has entries matching:
| level | event | sessionId |
| :info | :session/created | my-chat |
| :info | :session/opened | my-chat |

Columns are a subset of the structured log fields; omit fields you don't care about.

Every scenario that performs a mutation or notable lifecycle event should assert its log entry. Missing log assertions let logging silently die — a regression where a mutation stops emitting info-level events goes unnoticed until someone is debugging in production.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/slagyr/agent-lib/logging/badge)](https://verified-skill.com/skills/slagyr/agent-lib/logging)

Something wrong with this skill or its page? Tell us.