Agent skill

Structured Logging Lite

by majiayu000 in majiayu000/spellbook

Design, audit, or implement application structured logging architecture from repository evidence.

MITAuto-check passedDevOps & Cloud

Install Structured Logging Lite

skills CLI
$ npx skills add majiayu000/spellbook --skill structured-logging-lite -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/spellbook structured-logging-lite --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/structured-logging-lite .claude/skills/structured-logging-lite && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
structured-logging-lite
GitHub stars
287
Token cost
~1.7k tokens
SKILL.md length
781 words
Files
3 (incl. references)
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Design, audit, or implement application structured logging architecture from repository evidence.

  • Works in 9 steps: Search before proposing. Read applicable… → Classify the target. Distinguish a… → Reconstruct current coverage. Mark… → …
  • A user asks whether
  • SKILL.md covers Operating Contract, Workflow, Boundary Rules and Deliverable, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Structured Logging Lite is an agent skill from majiayu000/spellbook. Design, audit, or implement application structured logging architecture from repository evidence. Use when a user asks whether or where to add logs, how to choose or migrate a logger, how to standardize events/fields/levels/redaction, how to add HTTP access or panic logs, or why production logs cannot answer an incident question. Do not use merely to tail platform logs or to design a full metrics, tracing, SLO, and incident-management program.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/full-guide.md` and `references/go.md`).

It sits in DevOps & Cloud, covering Observability, Design review and critique and Incident response. The repository describes itself as: Cross-runtime skills for Claude Code, Codex, and multi-agent workflows. The licence is MIT.

When your agent uses it

  • A user asks whether
  • Where to add logs
  • Migrate a logger
  • How to standardize events/fields/levels/redaction

Example prompts

  • “/structured-logging-lite”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Search before proposing. Read applicable repository instructions, check the worktree, then locate manifests, entrypoints, logger…
  2. Classify the target. Distinguish a reusable library, CLI/batch job, HTTP service, long-running worker, or multi-service system. Libraries…
  3. Reconstruct current coverage. Mark lifecycle, request, authentication, application milestones, external adapters, background jobs…
  4. Name the operational questions. Require each proposed event to answer a concrete debugging, security, support, or capacity question…
  5. Choose boundaries before libraries. Configure output at the composition root; observe requests at transport middleware; log effect…
  6. Keep or select the logger. Prefer a working repository-standard logger or a language standard library. Recommend migration only with…
  7. Write the contract. Define stable event names, required and conditional fields, level policy, error classification, correlation rules…
  8. Implement incrementally when authorized. Land P0 request/error/security coverage first, P1 adapter and worker telemetry next, and tracing…
  9. Verify with fresh evidence. Run repository-native build/tests plus log capture, secret-canary, route-normalization, panic, and…

What it can do on your machine

Read from SKILL.md and the folder at commit ed52af7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Structured Logging Lite loads about 1.7k tokens when it runs, and up to ~6.8k if it reads all its reference files. Until then it costs about 118 tokens; SKILL.md has 781 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~118
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/spellbook at commit ed52af7, republished under its MIT licence (© majiayu000). 781 words, ~1,677 tokens.

Download SKILL.mdSave it as .claude/skills/structured-logging-lite/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
structured-logging-lite
description
Design, audit, or implement application structured logging architecture from repository evidence. Use when a user asks whether or where to add logs, how to choose or migrate a logger, how to standardize events/fields/levels/redaction, how to add HTTP access or panic logs, or why production logs cannot answer an incident question. Do not use merely to tail platform logs or to design a full metrics, tracing, SLO, and incident-management program.

Structured Logging Lite

Build the smallest logging contract that makes the target system diagnosable without leaking data, duplicating audit records, or forcing an unnecessary logging-library migration.

Operating Contract

  • Direct actions: Inspect repositories, manifests, runtime entrypoints, tests, deployment files, and existing logs. Make local logging changes only when the user asks to implement or upgrade them; treat design, review, and diagnosis requests as read-only.
  • Escalate before: Ask before publishing, pushing, changing remote observability infrastructure, touching production, or expanding from application logging into a full observability rollout.
  • Evidence-backed pushback: Challenge a requested library migration or log-everything plan only with repository evidence, a measured requirement, a concrete security/cardinality risk, or a smaller compatible alternative.
  • Feedback loop: Promote repeated missing fields, false-success signals, secret leaks, or manual incident queries into the field contract, gotchas, validation tests, or a deterministic helper.
  • Never print or persist credentials, tokens, cookies, signatures, request bodies, DSNs, private URLs, or secret values while investigating.
  • Return errors through the existing error contract. A new log line never justifies swallowing, downgrading, or replacing an error.

Workflow

  1. Search before proposing. Read applicable repository instructions, check the worktree, then locate manifests, entrypoints, logger construction, log calls, request/context propagation, error mapping, panic handling, adapters, workers, audit records, metrics, tests, and deployment configuration.
  2. Classify the target. Distinguish a reusable library, CLI/batch job, HTTP service, long-running worker, or multi-service system. Libraries should usually accept host-provided diagnostics rather than configure process-global output.
  3. Reconstruct current coverage. Mark lifecycle, request, authentication, application milestones, external adapters, background jobs, degraded paths, panic/crash, and third-party library output as covered, partial, or missing.
  4. Name the operational questions. Require each proposed event to answer a concrete debugging, security, support, or capacity question. Delete events that only narrate normal control flow.
  5. Choose boundaries before libraries. Configure output at the composition root; observe requests at transport middleware; log effect failures at adapters; log worker batch outcomes at the worker owner; keep pure domain code free of logger dependencies.
  6. Keep or select the logger. Prefer a working repository-standard logger or a language standard library. Recommend migration only with evidence such as missing required capability, measured overhead, ecosystem incompatibility, or unsafe behavior.
  7. Write the contract. Define stable event names, required and conditional fields, level policy, error classification, correlation rules, redaction rules, retention/collection ownership, and low-cardinality metric labels.
  8. Implement incrementally when authorized. Land P0 request/error/security coverage first, P1 adapter and worker telemetry next, and tracing or backend-specific integration only when the runtime needs it.
  9. Verify with fresh evidence. Run repository-native build/tests plus log capture, secret-canary, route-normalization, panic, and streaming-response tests that match the change.
Show full SKILL.md (348 more words)Show less

Boundary Rules

  • Treat logs, metrics, traces, and durable audit records as different contracts. Do not claim one replaces another.
  • Emit one request-completion event per request. Add a second event only when it contains a distinct root cause or business outcome.
  • Use route templates or operation names in metrics. Keep request IDs, user IDs, asset/order IDs, raw paths, URLs, and error strings out of metric and log-index labels.
  • Include trace_id and span_id only when a real trace context exists. Do not invent IDs or require tracing as a prerequisite for useful logging.
  • Prefer fixed error codes and reason enums over arbitrary error strings for aggregation. Preserve a safe cause for debugging without exposing upstream payloads.
  • Exclude or sample high-volume health and readiness success logs. Never sample security failures or user-visible server errors without an explicit loss policy.
  • Preserve optional response/stream interfaces when observing HTTP writers; a naive wrapper can break flushing, hijacking, streaming, or byte counts.

Deliverable

For design or audit work, report:

text
verdict:
current_evidence:
chosen_stack:
boundary_map:
event_and_field_contract:
privacy_and_cardinality:
coverage_gaps:
P0_P1_P2:
validation:
remaining_risks:

For implementation work, also report changed files, fresh verification commands, and any deployment or collector work that remains outside the repository.

Gotchas

  • Raw URL paths turn identifiers into unbounded labels and can leak query credentials.
  • Logging every function entry/exit creates volume without diagnostic value.
  • Logging both at every return site and again at the boundary duplicates the same failure.
  • ORM defaults may print interpolated SQL, expected not-found errors, or non-JSON output.
  • A logger hidden in generic context values becomes an implicit dependency; keep typed correlation data in context and logging ownership at boundaries.
  • A successful fallback that changes user-visible output still needs an error signal and metric; warn plus silent degradation is not success.
  • Access logs without status, duration, normalized route, and request ID rarely answer incident questions.
  • Persistent audit events require transactional and retention guarantees that stdout logs do not provide.

References

  • Read references/full-guide.md before designing a schema, level policy, rollout, or validation plan.
  • For Go repositories, also read references/go.md before choosing a library or implementing HTTP, slog, or ORM integration.
  • For a full observability/SLO/tracing program, route to observability-sre after the logging contract is clear.

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/structured-logging-lite of majiayu000/spellbook.

  • SKILL.md
  • references/full-guide.md
  • references/go.md

Open the folder on GitHubat commit ed52af7

Compare with similar skills

Structured Logging Lite next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Structured Logging Lite compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Structured Logging Lite this skillmajiayu000/spellbook287—~1.7kAutomated safety check: PassMIT
Observability Engineerdavila7/claude-code-templates32k8 repos~3.2kAutomated safety check: PassMIT
Incident Responderdavila7/claude-code-templates32k7 repos~2.6kAutomated safety check: PassMIT
It Operationsdavila7/claude-code-templates32k1 repos~3.7kAutomated safety check: PassMIT
Release Itwondelai/skills2.4k—~4kAutomated safety check: PassMIT
Guidewire Observability And Incident Responsejeremylongshore/tons-of-skills-marketplace2.8k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Observability Engineer

    davila7/claude-code-templates

    Build production-ready monitoring, logging, and tracing systems.

    32k GitHub starsUsed in 8 repos~3.2k tokens
    DevOps & CloudAuto-check passed
  • Incident Responder

    davila7/claude-code-templates

    Expert SRE incident responder specializing in rapid problem resolution, modern observability, and comprehensive incident management.

    32k GitHub starsUsed in 7 repos~2.6k tokens
    DevOps & CloudAuto-check passed
  • It Operations

    davila7/claude-code-templates

    Manages IT infrastructure, monitoring, incident response, and service reliability.

    32k GitHub starsUsed in 1 repo~3.7k tokens
    DevOps & CloudAuto-check passed
  • Release It

    wondelai/skills

    Build production-ready systems with stability patterns: circuit breakers, bulkheads, timeouts, and retry logic.

    2.4k GitHub stars~4k tokensUpdated 28 days ago
    DevOps & CloudAuto-check passed
  • Guidewire Observability And Incident Response

    jeremylongshore/tons-of-skills-marketplace

    Operate a Guidewire Cloud API integration in production — define SLIs/SLOs for token availability, bind success rate, FNOL p99 latency; route alerts so the on-call gets paged for real outages and…

    2.8k GitHub stars~3.1k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Makes systems debuggable and reliably operable — instrumentation, alerting that is worth waking for, service objectives, and learning from failure.

    2k GitHub stars~931 tokensUpdated 21 days ago
    DevOps & CloudAuto-check passed

More from majiayu000/spellbook

All 97 skills in this repo
  • Skill Ecosystem Doctor

    majiayu000/spellbook

    Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.

    287 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • AGENTS.md Scaffold

    majiayu000/spellbook

    Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.

    287 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Product Demo Builder

    majiayu000/spellbook

    Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.

    287 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Flowguard Task Guard

    majiayu000/spellbook

    Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.

    287 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • npm Supply Chain Check

    majiayu000/spellbook

    Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.

    287 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Product Manager Toolkit

    majiayu000/spellbook

    Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.

    287 GitHub stars~2.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Structured Logging Lite

What does Structured Logging Lite do?

Design, audit, or implement application structured logging architecture from repository evidence. Structured Logging Lite is an agent skill from majiayu000/spellbook. Design, audit, or implement application structured logging architecture from repository evidence.

When should I use Structured Logging Lite?

Structured Logging Lite fits situations like: A user asks whether; where to add logs; migrate a logger; how to standardize events/fields/levels/redaction.

How do I install Structured Logging Lite in Claude Code?

Run `npx skills add majiayu000/spellbook --skill structured-logging-lite -a claude-code`. Or copy the skill folder (skills/structured-logging-lite in majiayu000/spellbook) into .claude/skills/structured-logging-lite in your project. Claude Code loads it when a task matches its description.

How do I install Structured Logging Lite in Codex?

Run `npx skills add majiayu000/spellbook --skill structured-logging-lite -a codex`. Or copy the skill folder (skills/structured-logging-lite in majiayu000/spellbook) into .agents/skills/structured-logging-lite in your project. Codex loads it when a task matches its description.

Can I use Structured Logging Lite in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill structured-logging-lite -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/structured-logging-lite, .gemini/skills/structured-logging-lite, .github/skills/structured-logging-lite and .opencode/skills/structured-logging-lite in your project.

What does Structured Logging Lite need to run?

SKILL.md names no scripts, command-line tools or credentials: Structured Logging Lite is instructions for the agent only.

Does Structured Logging Lite access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Structured Logging Lite safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Structured Logging Lite use?

Structured Logging Lite is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Structured Logging Lite use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.1k tokens, read only when the agent opens those files.

What are the alternatives to Structured Logging Lite?

Skills that share tags, products or a category with Structured Logging Lite: Observability Engineer (davila7/claude-code-templates, 32k stars), Incident Responder (davila7/claude-code-templates, 32k stars), It Operations (davila7/claude-code-templates, 32k stars) and Release It (wondelai/skills, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Structured Logging Lite?

majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 287 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 8, 2026.

Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.