agentleFS
CsHengCsHeng/agent-skills/skills/logging-standards/SKILL.md

logging-standards

Skill3 starsChanged 8 days agoMITView on GitHub

Use for goal-driven application, observability, security, and audit logging: event selection, structured fields, levels, correlation, redaction, retention, access, and tamper evidence.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify representative events, absent sensitive fields, correlation across the required path, and the consumer's query or alert.

    line 19
  2. Very specific:

    Use levels according to the service's operational response: reserve ERROR for failures an owner must investigate or a declared operation …

    line 24
  3. Distinctive:

    Keep access logs, application events, and immutable audit records distinct when their consumers, schemas, access, or retention differ.

    line 25
  4. Distinctive:

    Use stable machine-queryable event names and fields with consistent types.

    line 30
  5. Distinctive:

    Keep high-cardinality or unbounded values out of indexed fields unless the backend and query need justify them.

    line 32
  6. Distinctive:

    Follow repository or platform schemas such as OpenTelemetry or ECS where the repository already owns them.

    line 33
  7. Very specific:

    Read references/security-and-audit-logging.md when the request concerns authentication, authorization, privileged operations, …

    line 37
  8. Very specific:

    When log volume, transport, or storage bounds are in scope, read references/operations.md.

    line 41
  9. Distinctive:

    When this skill owns the response, lead with the logging goal and selected event contract, then report the decision-relevant event classes, …

    line 45

“Common” is measured: kept by at least 6 in 10 of the 3 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Logging Standards

Design logs from the operational, diagnostic, security, or audit question they must answer. Choose timestamp, format, fields, backend, and retention from the consumer's decision and the repository's owned schema.

Logging records evidence; security-guardrails owns prevention controls and error-patterns owns failure classification and recovery policy.

Design Workflow

  1. State the consumer and decision: debugging, operations, alerting, incident response, access evidence, compliance, or business audit.
  2. Select the smallest event set that answers that decision without duplicating metrics, traces, or domain state.
  3. Define stable event names, severity semantics, required fields, correlation, cardinality limits, and ownership.
  4. Classify secrets, personal data, regulated data, and attacker-controlled values before choosing redaction or omission.
  5. Define routing, access, retention, deletion, integrity, and failure behavior according to repository and operational policy.
  6. Verify representative events, absent sensitive fields, correlation across the required path, and the consumer's query or alert.

Event And Level Rules

  • Log state transitions, boundary outcomes, and actionable failures rather than narrating every function call.
  • Use levels according to the service's operational response: reserve ERROR for failures an owner must investigate or a declared operation failed, and give expected client rejection the level its operational response needs.
  • Keep access logs, application events, and immutable audit records distinct when their consumers, schemas, access, or retention differ.
  • Record an error where useful context and response ownership meet.

Structured Context

  • Use stable machine-queryable event names and fields with consistent types; put queryable meaning in fields, with message text as supporting context.
  • Include request, operation, trace, span, job, or business correlation when it is available and needed by the consumer.
  • Keep high-cardinality or unbounded values out of indexed fields unless the backend and query need justify them.
  • Follow repository or platform schemas such as OpenTelemetry or ECS where the repository already owns them.

Security And Audit Profile

Read references/security-and-audit-logging.md when the request concerns authentication, authorization, privileged operations, sensitive-data access, redaction, retention, restricted access, suspicious activity, or tamper evidence.

Operations

When log volume, transport, or storage bounds are in scope, read references/operations.md.

Result

When this skill owns the response, lead with the logging goal and selected event contract, then report the decision-relevant event classes, fields, sensitive data handling, delivery and retention ownership, and executable evidence.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.