Skip to content
Development
Command

/context-load-logging

Load comprehensive logging and observability documentation context with project-specific optimization

From plugin
claude-cmd
313180 skills180 commands

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/context-load-logging

Context preview

What this command does when you run it.

Load comprehensive logging and observability documentation context with project-specific optimization

Command definition

context-load-logging.md
allowed-tools: Read, WebFetch, Bash(fd:*), Bash(rg:*), Bash(jq:*), Bash(gdate:*)
name: "Context Load Logging"
description: "Load comprehensive logging and observability documentation context with project-specific optimization"
author: "wcygan"
tags: ["context","observability"]
version: "1.0.0"
created_at: "2025-07-14T00:00:00Z"
updated_at: "2025-07-14T00:00:00Z"

Context

  • Session ID: !`gdate +%s%N`
  • Current directory: !`pwd`
  • Observability tools: !`fd "(loki|grafana|prometheus|jaeger|zipkin|otel)" . --type d | head -5 || echo "No observability tools found"`
  • Logging usage: !`rg "logger|logging|log\." . --type go --type js --type ts --type rust --type java | wc -l | tr -d ' ' || echo "0"`
  • Container configs: !`fd "(docker-compose\.yml|docker-compose\.yaml)$" . | head -3 || echo "No docker compose files found"`
  • Config files: !`fd "(loki\.yml|grafana\.ini|prometheus\.yml)" . | head -3 || echo "No observability configs found"`
  • Technology stack: !`fd "(deno\.json|package\.json|Cargo\.toml|go\.mod)" . | head -3 || echo "No project files detected"`
  • Kubernetes manifests: !`fd "\.ya?ml$" . | rg -l "kind:|apiVersion:" | head -3 || echo "No K8s manifests found"`
  • Git status: !`git status --porcelain | head -3 || echo "Not a git repository"`

Your Task

Think deeply about logging strategy, observability architecture, and structured logging patterns for comprehensive system monitoring.

STEP 1: Initialize context loading session

  • CREATE session state file: `/tmp/logging-context-$SESSION_ID.json`
  • SET initial state:
  {
    "sessionId": "$SESSION_ID",
    "phase": "discovery",
    "context_sources": [],
    "loaded_topics": [],
    "project_specific_focus": [],
    "documentation_cache": {},
    "observability_features_detected": []
  }

STEP 2: Project-specific observability analysis

  • ANALYZE project structure from Context section
  • DETERMINE specific logging and observability needs
  • IDENTIFY documentation priorities based on detected infrastructure

IF observability tools detected OR logging usage found:

  • FOCUS on project-specific implementation patterns
  • PRIORITIZE relevant configuration and integration guides
  • INCLUDE deployment and monitoring contexts

ELSE:

  • LOAD foundational logging and observability concepts
  • EMPHASIZE setup, configuration, and getting-started guides
  • INCLUDE project integration and best practices workflows

STEP 3: Strategic documentation loading with project adaptation

TRY:

  • EXECUTE systematic context loading from prioritized sources
  • USE WebFetch tool for each documentation URL
  • PROCESS and organize information by functional area
  • SAVE loaded context to session state

**Core Documentation Sources:**

FOR EACH priority source:

1. **Loki Documentation and Configuration**

  • URL: `https://grafana.com/docs/loki/`
  • FETCH: Log aggregation, querying, configuration, storage patterns
  • FOCUS: LogQL query language, label strategies, retention policies
  • EXTRACT: Configuration examples and deployment patterns

2. **Structured Logging and Twelve-Factor Principles**

  • URL: `https://12factor.net/logs`
  • FETCH: Twelve-factor app logging principles and structured formats
  • FOCUS: Log streams, event correlation, centralized collection
  • EXTRACT: Implementation patterns and best practices

3. **OpenTelemetry Logging Integration**

  • URL: `https://opentelemetry.io/docs/concepts/signals/logs/`
  • FETCH: Trace correlation, log collection, exporters configuration
  • FOCUS: Context propagation, correlation IDs, instrumentation
  • EXTRACT: Language-specific implementation examples

4. **Grafana Log Management and Visualization**

  • URL: `https://grafana.com/docs/grafana/latest/explore/logs-integration/`
  • FETCH: Log visualization, correlation, querying interfaces
  • FOCUS: Dashboard design, alerting, log exploration patterns
  • EXTRACT: Query examples and visualization best practices

5. **Loki Best Practices and Performance**

  • URL: `https://grafana.com/docs/loki/latest/best-practices/`
  • FETCH: Label design, performance optimization, retention strategies
  • FOCUS: Query performance, storage efficiency, operational practices
  • EXTRACT: Production deployment and scaling guidance

6. **Observability Stack Integration**

  • URL: `https://grafana.com/docs/grafana/latest/datasources/loki/`
  • FETCH: Integration with Prometheus, Jaeger, and other observability tools
  • FOCUS: Cross-signal correlation, unified observability dashboards
  • EXTRACT: Architecture patterns and configuration examples

CATCH (documentation_fetch_failed):

  • LOG failed sources to session state
  • CONTINUE with available documentation
  • PROVIDE manual context loading instructions
  • SAVE fallback documentation references

STEP 4: Context organization and synthesis

  • ORGANIZE loaded context by functional area:
  • Log aggregation and centralized collection strategies
  • Structured logging formats and schema design
  • Query optimization and LogQL best practices
  • Label design and cardinality management
  • Retention policies and storage optimization
  • Correlation with traces and metrics
  • Security, access control, and compliance
  • Performance monitoring and troubleshooting
  • Deployment patterns and infrastructure automation
  • SYNTHESIZE project-specific guidance:
  • Integration with detected technology stack
  • Migration strategies from existing logging solutions
  • Best practices for identified use cases
  • Security considerations for log pipelines
  • Performance optimization for current scale

STEP 5: Session state management and completion

  • UPDATE session state with loaded context summary
  • SAVE context cache: `/tmp/logging-context-cache-$SESSION_ID.json`
  • CREATE context summary report
  • MARK completion checkpoint

FINALLY:

  • ARCHIVE context session data for future reference
  • PROVIDE context loading summary
  • CLEAN UP temporary session files

Context Loading Strategy

**Adaptive Loa

Read more
Ships withclaude-cmd

A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.

Get the whole plugin