effect-logging
Skill2 starsChanged 4 months agoMITView on GitHub
Effect v4 logging and observability for APIs and backends. Use for structured logs and logger layers; typed error and Cause boundaries; request context and log spans; or distributed tracing integration.
In this repository12 other files it gives its agents.
- adversarial-code-reviewSkill
- code-review-loopSkill
- finalizeSkill
- fly-optimizationSkill
- formattingSkill
- product-design-evolveSkill
- product-design-extendSkill
- product-design-propagateSkill
- simplifySkill
- style-docSkill
- test-value-auditSkill
- typescript-structureSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use the project-pinned effect source first.
- Distinctive: line 12
Inspect: Read the pinned Effect version, nearby conventions, error union, runtime layers, HTTP adapter, and telemetry sink.
- Very specific: line 17
Apply or review: Keep business code on Effect.log*.
- Very specific: line 23
Use Effect.fn("Domain.operation") for named operation boundaries.
- Very specific: line 24
Use Effect.annotateLogs for inherited log fields and Effect.withLogSpan only for elapsed-time context in log output.
- Very specific: line 25
Use Effect.withSpan and Effect.annotateCurrentSpan for distributed tracing.
- Distinctive: line 26
Treat an error's typed status, HTTP status, log level, client body, and alert policy as separate decisions.
- Distinctive: line 27
Use static event names plus event-specific allowlisted fields.
- Very specific: line 39
Do not infer severity from "typed" versus "defect" alone.
- Distinctive: line 45
Every reachable domain error has an exhaustive status, safe body, log level, event name, and alert decision.
- Very specific: line 46
Every Cause path handles all typed failures, defects, interruptions, and composite causes without collapsing an Option or swallowing …
- Distinctive: line 47
Every logger path deliberately handles event time, every Cause reason, fiber id, allowlisted annotations, and active log spans without …
- Distinctive: line 49
Every changed API name and signature was checked against the project-pinned Effect source or current upstream v4 source, and every …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Effect v4 Logging and Observability
Use the project-pinned effect source first. If it does not answer an API question, check current upstream source; v4 is version-sensitive.
Process
- Inspect. Read the pinned Effect version, nearby conventions, error union, runtime layers, HTTP adapter, and telemetry sink. Continue only when each touched boundary and its data sensitivity are known.
- Route. Load every matching reference before proposing or editing code:
- Error classes, expected failures, external error normalization,
catchTag, ororDie: readreferences/error-patterns.md. - HTTP status/body/log policy,
Cause, defects, composite causes, interruption, or framework adapters: readreferences/error-handler.md. - Built-in/custom loggers, privacy, log annotations, log spans, tracing, or test capture: read
references/logger-setup.md.
- Error classes, expected failures, external error normalization,
- Apply or review. Keep business code on
Effect.log*; map every domain error explicitly at the owning boundary; preserve interruption; and install logger/tracer implementations once at the runtime edge. Continue until every changed event, error variant, Cause reason, and metadata field has a deliberate policy. - Verify. Typecheck and test against the pinned package, then inspect emitted logs and responses for representative success, each domain error, a defect, a composite cause, and interruption. Review field names and sample values for privacy before completion.
Defaults
- Model expected application failures with current
Schema.TaggedErrorClass<Self>()(...)when schema-backed errors fit. - Use
Effect.fn("Domain.operation")for named operation boundaries. It creates a tracing span; it is not a log span. - Use
Effect.annotateLogsfor inherited log fields andEffect.withLogSpanonly for elapsed-time context in log output. - Use
Effect.withSpanandEffect.annotateCurrentSpanfor distributed tracing. Configure a tracer exporter separately. - Treat an error's typed status, HTTP status, log level, client body, and alert policy as separate decisions.
- Use static event names plus event-specific allowlisted fields. Raw bodies, headers, credentials, tokens, and arbitrary error objects are outside the allowlist.
Severity
| Level | Use |
Trace / Debug | Temporary or sampled diagnostic detail |
Info | Normal lifecycle events and routine client outcomes |
Warn | Degradation, throttling, retries, or conditions needing attention but not immediate investigation |
Error | Failed dependencies, defects, or outcomes needing investigation |
Fatal | Process-level loss of service where shutdown or restart is expected |
Do not infer severity from "typed" versus "defect" alone. A typed persistence failure can be Error; an ordinary not-found can be Info or unlogged.
Completion Gate
Finish only when all of these are true:
- Every reachable domain error has an exhaustive status, safe body, log level, event name, and alert decision.
- Every Cause path handles all typed failures, defects, interruptions, and composite causes without collapsing an
Optionor swallowing cancellation. - Every logger path deliberately handles event time, every Cause reason, fiber id, allowlisted annotations, and active log spans without leaking unrestricted payloads.
- Log annotations, log spans, and distributed tracing are named and configured as distinct mechanisms.
- Every changed API name and signature was checked against the project-pinned Effect source or current upstream v4 source, and every framework-shaped example is identified as framework-specific or pseudo-code.
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.

