logging
Skill2 starsChanged 4 months agoMITView on GitHub
Add or improve logging in a file or module — structured, leveled, contextual — using the project's existing logger, without leaking secrets or spamming. Use when the user says "add logging", "improve the logging", "add structured logs", "what should I log here", "set up a logger", or "add observability".
- Reads credentials
26 other projects use a version of this.
Adopted by
Most recently taken up by
- travissmithv1/claude-skillstheir own version, first seen Nov 16, 2026
- lawless-m/claude-skillstheir own version, first seen Nov 11, 2026
- zdanovichnick/dotnet-pilottheir own version, first seen Nov 8, 2026
- codewithmukesh/dotnet-claude-kittheir own version, first seen Nov 8, 2026
- gabrielbauman/skillstheir own version, first seen Nov 1, 2026
- jars-demo/jars-skillstheir own version, first seen Oct 25, 2026
Used with
Projects with it also use convention-learner, opentelemetry and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
codewithmukeshSkillconvention-learner
Detects and enforces project-specific coding conventions by analyzing existing codebase patterns. Learns naming conventions, folder structure, test organization, and coding style from the existing code. Load when: "conventions", "coding standards", "project patterns", "enforce style", "detect patterns", "learn conventions", "code consistency".
Also in 3 projects that use this
codewithmukeshSkillopentelemetry
OpenTelemetry observability for .NET 10 applications. Covers traces, metrics, and logs using the OpenTelemetry SDK with OTLP export. Includes custom ActivitySource, IMeterFactory metrics, resource configuration, and Aspire Dashboard integration. Load this skill when setting up distributed tracing, custom metrics, OTLP export, or when the user mentions "OpenTelemetry", "OTLP", "traces", "spans", "Activity", "ActivitySource", "metrics", "IMeterFactory", "Meter", "Counter", "Histogram", "Gauge", "telemetry", "observability", "distributed tracing", "OTEL", or "Aspire Dashboard".
Also in 3 projects that use this
MovGP0Skillmodern-csharp
Modern C# style guidance for Bendex and MicroSea code changes, including primary constructors, expression-bodied members, var usage, target-typed new, lambdas, and pattern matching.
Also in 3 projects that use this
junhjangSkillconfiguration
Adding a new config file, adding a field, or wiring a config consumer. Enforces schema validation at startup (no permissive defaults), env-var indirection for secrets, layered config (defaults / per-env / operator-override), hot-reload explicit per field.
Also in 4 projects that use this
wpankSkillcaching
Caching strategies, invalidation, eviction policies, HTTP caching, distributed caching, and anti-patterns. Use when designing cache layers, choosing eviction policies, debugging stale data, or optimizing read-heavy workloads.
Also in 4 projects that use this
HamzaSheikh768Skilldependency-injection
Leverages FastAPI's powerful Depends system for reusable authentication, database sessions, rate limiting, and business logic injection.
Also in 4 projects that use this
Other versions26 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 26
- elie222/inbox-zero★ 13ksame name
- lukevella/rallly★ 5.4ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- golemcloud/golem★ 1.5ksame name
- codewithmukesh/dotnet-claude-kit★ 808same name
- emavgl/oinkoin★ 486same name
- QuantConnect/Documentation★ 268same name
- Resgrid/Core★ 238same name
- lawless-m/claude-skills★ 6same name
16 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 21 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Add or improve logging in $ARGUMENTS (or the highest-value paths — request entry points, jobs, error handlers, external calls — if none …
- Very specific: line 24
Make logs structured and contextual: Prefer key-value/structured fields (logger.info('order placed', { orderId, userId })) over string …
- Distinctive: line 30
Use the project's logger and format.
- Distinctive: line 31
Don't change program behavior — logging is additive.
“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Logging setup signals
!grep -rilE "winston|pino|bunyan|loguru|structlog|logging\\.getLogger|slf4j|zap|logrus|console\\.(log|error)" --include='*.*' . 2>/dev/null | grep -vE 'node_modules|\.git|dist|build|test' | head -15
!ls .env.example 2>/dev/null && grep -iE "LOG_LEVEL|LOG_FORMAT" .env.example 2>/dev/null
Instructions
Add or improve logging in $ARGUMENTS (or the highest-value paths — request entry points, jobs, error handlers, external calls — if none given). Use the project's existing logger and conventions; don't introduce a new logging library unprompted.
Method
- Find the existing logger and pattern. From the signals above, identify what the project uses (winston/pino, Python
logging/structlog/loguru, zap/logrus, slf4j) and how it's configured — format (JSON vs text), levels, and any request/correlation context. Mirror it. If the code only usesconsole.log/bareprint, propose adopting the real logger and confirm before a broad change. - Log at the right boundaries, not everywhere. Useful points: service/request entry and exit (with outcome + duration), external calls (API/DB/queue) and their failures, state transitions, retries, and caught errors. Don't log inside tight loops or on every trivial call — noisy logs hide signal.
- Use levels correctly:
errorfor failures needing attention,warnfor recoverable/unexpected-but-handled,infofor significant business events,debugfor developer diagnostics. Don't log-and-rethrow the same error at every layer (double logging) — log it once where it's handled. - Make logs structured and contextual. Prefer key-value/structured fields (
logger.info('order placed', { orderId, userId })) over string interpolation, so logs are queryable. Include identifiers that allow tracing a request end to end; reuse the project's correlation/request id if one exists. - Keep messages clear and actionable — state what happened and the relevant context, not just "error" or "here". Pair with the
error-handlingskill where logging and error flow intersect.
Rules
- Never log secrets or sensitive data — passwords, tokens, API keys, full card/PII, auth headers, request bodies that may contain them. Redact or omit; flag any existing log that leaks.
- Use the project's logger and format; don't add a new dependency or a parallel logging style without asking.
- Don't change program behavior — logging is additive. The only logic change allowed is removing a double-log or a secret leak, and say when you do.
- Match levels to severity and avoid noise: no per-iteration logs, no
infofor routine debug detail, no duplicate logging of the same error up the stack. - Summarize what you added/changed, the levels used, any secrets you redacted, and anything that needs a config change (e.g. setting
LOG_LEVEL).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

