Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Logging

ASecurity

Logging policy for any OwlMeans application — no bare console calls; every line through @owlmeans/log with a scope and a deliberate level; what belongs at info vs debug; never log secrets or personal content; debug off in production, with the level set per environment (a server's config file, a browser's build-time env); analytics events as a call option routed to plugins. Use when adding any log line or a catch block, debugging with prints, deciding what an operator should see in production,...

3 stars
0 votes
0 copies
0 views
Added 10/6/2026
developmentdebuggingapi

Works with

api

Security Analysis

A100/100

Scanned 10/6/2026

$npx -y skills add owlmeans/common --skill logging --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Logging?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Logging
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/owlmeans-logging/badge)](https://www.skillsdirectory.com/skills/owlmeans-logging)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: logging
description: Logging policy for any OwlMeans application — no bare console calls; every line through @owlmeans/log with a scope and a deliberate level; what belongs at info vs debug; never log secrets or personal content; debug off in production, with the level set per environment (a server's config file, a browser's build-time env); analytics events as a call option routed to plugins. Use when adding any log line or a catch block, debugging with prints, deciding what an operator should see in production, setting a log level for an environment, or reviewing code that calls console.
user-invocable: false
metadata:
  scope: general
---

# Logging — the policy

The mechanics are the `log` skill (`@owlmeans/log`). This is what to do in application code.

1. **No `console.*`.** `import { logger } from '@owlmeans/log'`, `const log = logger('<scope>')` once per
   module, then `log.debug|info|warn|error(message, data?, options?)`. A scope is lowercase and
   colon-separated (`orders`, `orders:import`).
2. **Choose the level on purpose.** `debug` is for diagnosis (per request, progress, dumps) — it is OFF
   in production. `info` is what an operator wants to read in production: a job started or stopped, a
   subscription or payment event, a sign-in, a server listening. `warn`: it degraded and went on.
   `error`: the work failed. A line that fires every few seconds is `debug` or `logThrottle`d.
3. **Stable message, variable data.** `log.info('Order shipped', { orderId, carrier })` — not a
   sentence assembled from values. Give a significant event a dotted name: `{ event: 'order.shipped' }`.
4. **Pass the `Error`.** `log.error('Import failed', error)` — never `error.message` alone, never
   `JSON.stringify(error)`. In a browser the `Error` object must reach `console.error`; the logger does
   that, and an error reporter hooked there keeps working.
5. **Never log secrets or personal content**: tokens, keys, passwords, authorization or cookie headers,
   request or response bodies, user text, file contents, environment values. Log ids, names, sizes,
   counts. A catch that only logs has not told the user anything — the user-facing report is a separate
   step (a message, a state), and `log.error` is the operator's record.
6. **Analytics are a parameter, not a second API.** `log.info('…', data, { analytics: 'event_name' })`
   hands the call to the registered analytics plugins (`@owlmeans/web-log` for a tag manager); add
   `console: false` to keep it out of the log. Only for events something should count.
7. **The level is set per environment, never in code.** A server declares `cfg.log` leaves as config
   file paths (a ConfigMap or a `LOG_LEVEL` environment variable); a browser takes a build-time
   constant (`VITE_LOG_LEVEL`). Development defaults to `debug`, a production build to `info`. Do not
   hard-code `cfg.debug = { all: true }` — `debug.all` does not control logging and must not be on in
   production.
8. **Tests read the log with `memoryPlugin()`**; they do not spy on `console`.

Attribution

owlmeansowlmeans
View sourceSee grades on GitHubMore from owlmeans →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

286712 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Writing Plans

Use when you have a spec or requirements for a multi-step task, before touching code

2927051 votes
View all in development →