embedlog

An embeddable Go logger that writes structured log messages and counts info and error events with Prometheus metrics. It supports JSON output for production and coloured text for development.

In plain words
What is it for?
Adding a logger to Go structs, recording messages with key-value fields, choosing development or production output, and tracking the number of info and error events.
Why use it?
It keeps logging code consistent across services and separates normal messages from errors. Structured fields make logs and error rates easier to search and monitor.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/vmkteam/claude-plugins/embedlog
Any agent
npx skills add vmkteam/claude-plugins --skill embedlog
Clone the repo
git clone --depth 1 https://github.com/vmkteam/claude-plugins

Made for: Claude Code, Codex.

Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 450 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.00450
Opus 5 $0.00026 $0.00225
Sonnet 5 $0.00010 $0.00090
Haiku 4.5 $0.00005 $0.00045

Measured 2d ago against content hash 514e2eb3b166, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

embedlog scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/developer/skills/embedlog/SKILL.md · 63 lines

What it actually says

Embedlog

  • Upstream: https://github.com/vmkteam/embedlog
  • Библиотека логирования для встраивания в структуры через embedlog.Logger
  • Dual-level: info → stdout, error → stderr (автосплит)
  • JSON (prod) / text-цветной (dev, NewDevLogger); source location авто

Встраивание

type MyService struct {
    embedlog.Logger
    repo db.EntityRepo
}

func (s *MyService) Process(ctx context.Context) error {
    s.Print("processing started")
    if err != nil {
        s.Error("processing failed", "err", err)
        return err
    }
    s.Print("processing completed", "count", count)
    return nil
}

Init

logger := embedlog.NewLogger(os.Stdout, os.Stderr, true) // json=true, prod
logger := embedlog.NewDevLogger()                         // text+colors, dev

API

  • logger.Print(msg, args...) — info → stdout
  • logger.Error(msg, args...) — error → stderr
  • logger.PrintOrErr(err, msg)err != nil ? Error : Print

Всегда structured args ("key", val), не конкатенация.

Метрики

app_log_events_total{type="info"|"error"} — counter (алерты на error rate).

Интеграции

// zenrpc-middleware
rpc.Use(
    zm.WithSLog(logger.Print, zm.DefaultServerName, nil),
    zm.WithErrorSLog(logger.Error, zm.DefaultServerName, nil),
)

// go-pg SQL logging (dblog.go)
zm.WithSQLLogger(dbo.DB, isDevel, allowDebugFn(), allowDebugFn())
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 63 lines · 51 tokens per session scan A 514e2eb3b166

Subscribe to this mod's changes

embedlog is a skill published in the GitHub repository vmkteam/claude-plugins (7 stars, last pushed 4mo ago), licensed MIT. It adds 51 tokens to every session and 450 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

developer-code-organization

Code organization patterns, file structure guidelines, WASM build variants, and string processing conventions for gh-aw Go code.

github/gh-aw · 28 tokens

gen-test

Generate idiomatic tests for Go packages and handlers in the Meshery project.

meshery/meshery · 18 tokens

layered-architecture-types

Enforce primitive-at-edges / strong-types-in-Business layering and the toBus/fromBusResponse/toDB converter pattern. Use when writing, editing, or auditing Go files under app/, business/domain/, or .../stores/db.

ardanlabs/service · 56 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

golang-design-patterns

Idiomatic Golang design patterns — functional options, constructor APIs, init() and global-state avoidance, enums, panic vs error decisions, resource management and lifecycle, graceful shutdown, timeouts and retries, streaming and iterators, and architecture styles (clean, hexagonal, DDD, flat). Apply when choosing…

samber/cc-skills-golang · 169 tokens

golang-observability

Golang everyday observability — the always-on signals in production. Covers structured logging with slog, Prometheus metrics, OpenTelemetry distributed tracing, continuous profiling with pprof/Pyroscope, server-side RUM event tracking, alerting, and Grafana dashboards. Apply when instrumenting Go services for…

samber/cc-skills-golang · 166 tokens