logger
Skill2 starsChanged 10 days agoMITView on GitHub
Add logs, metrics and traces only where they help, the project's own way, and prove them. Places logs at errors, security events and one summary event per request or job; keeps secrets and noise out; adds metrics and tracing to deployed apps or ones that call other services; sets up sampling, retention and shipping; then tests every key log, span and metric and proves fake secrets never reach the logs. Use when a change adds a request handler, job, error path, login or outside call, when code has no useful logs, when logs are noisy or leak data, or when the human asks for logging, metrics, tracing or observability.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- montymi/claude-configtheir own version, first seen Mar 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- montymi/claude-config★ 1same name
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 repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- debugSkill
- feature-testSkill
- full-testSkill
- kickoffSkill
- securitySkill
- visibility-handlingSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Read first. Find the project's logger, its setup, field names, how errors are handled, and any metrics or tracing tool already there.
- Distinctive: line 20
Follow them; never add a second logger.
- Very specific: line 27
No logger yet: use the language's built-in one (references/stacks.md).
- Distinctive: line 28
Ask the human before adding any package.
- Very specific: line 34
Write them as references/how-to-log.md says: a constant event name, values in fields, the right level, a request id, redaction in one …
- Very specific: line 50
Remove noise in the files the change touches: bare prints, step by step lines, the same error logged twice.
- Very specific: line 54
Test them, as references/testing.md says: each key log fires with the right level and fields.
- Distinctive: line 64
Run the real app, go through the changed flow, and read the actual lines, spans and metrics it gives out.
- Very specific: line 68
Run find_log_calls.py again until it prints "nothing flagged".
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Logger
A log earns its place when someone would act on it, or would need it to find a cause later. Everything else is noise, and noise hides the lines that matter.
This skill covers only the code the change touches. It looks at the whole app only when the human asks, or when the app has no logging at all.
Steps
Read first. Find the project's logger, its setup, field names, how errors are handled, and any metrics or tracing tool already there. Follow them; never add a second logger. List what the change adds so far:
python3 "${CLAUDE_SKILL_DIR}/scripts/find_log_calls.py" --repo <project folder> [--base <target branch>]- No logger yet: use the language's built-in one (
references/stacks.md). Ask the human before adding any package. - Decide where logs go, as
references/where-to-log.mdsays: handled errors (once, where handled), the security events, one summary event per request or job, slow outside calls. Nothing else. - Write them as
references/how-to-log.mdsays: a constant event name, values in fields, the right level, a request id, redaction in one place, and logging that can never break the request. - Browser code ships with no
consolecalls. Send errors to an error tracker only if the project already has one. - Metrics and tracing, only if the app is deployed or calls other
services, as
references/metrics-tracing.mdsays: the project's tool, else OpenTelemetry; auto instrumentation, a few hand spans, and the rate, errors and duration metrics. - Set up sampling, retention and shipping, as
references/shipping.mdsays. Ask before creating any account, adding a paid service, or changing a deployed app's settings. - Remove noise in the files the change touches: bare prints, step by
step lines, the same error logged twice. List noise in other files
in
docs/todo.md; do not touch it. Test them, as
references/testing.mdsays: each key log fires with the right level and fields; each key span and metric is recorded. Then prove fake secrets stay out:python3 "${CLAUDE_SKILL_DIR}/scripts/check_log_leaks.py" --print-canaries python3 "${CLAUDE_SKILL_DIR}/scripts/check_log_leaks.py" --root <project folder> \ --command "<test or journey>" --expect "<event name>" [--log-file <path>]- Run the real app, go through the changed flow, and read the actual lines, spans and metrics it gives out. A test can pass while the real output is empty or unreadable.
- Run
find_log_calls.pyagain until it prints "nothing flagged". A command-line tool's prints are its real output: put the commentlogger: clionce in that file. Mark any other linelogger: keeponly when it truly must stay, and say why in the report. - Hand off to feature-test to prove the change works as a whole.
- Report to the human, within the reply length the project asks for:
- what was added, removed and set up, and why each log earns its place;
- the test and the leak check that prove it, with what they printed;
- what needs the human (an account, a paid service, a deployed setting);
- anything not run, marked "not checked yet".
Gotchas
- Logging an error and then rethrowing it logs it twice. Log where it is handled, or rethrow; never both.
- A catch that neither logs nor rethrows hides the error. Never swallow.
- A message built from values (
f"paid {id}") cannot be searched or counted, and lets user input forge lines. Constant message, values in fields. - Whole request or response bodies and whole objects carry personal data along with them. Log ids, not objects.
- User ids and raw URLs go in logs and spans, never in metric labels: every new label value costs memory, and past the limit alerts go quietly wrong.
- A check that sees no logs at all passes for the wrong reason. The leak
check needs
--expect; a log test must also assert the line is there. - Pick an
--expecttext that only the app's logs print, not the test runner's own output. - Log tests (
caplog,assertLogs) catch records before they are written, so they print nothing. The leak check needs a run where the app's real log setup writes out: a journey script or the started app.
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.

