plugin-logging

Route OpenCode plugin logs through client.app.log with structured fields.

10|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/benjaminshafii/digital-empire --skill plugin-logging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-logging
Source: https://github.com/benjaminshafii/digital-empire/tree/main/.opencode/skill/plugin-logging
Command: npx skills add https://github.com/benjaminshafii/digital-empire --skill plugin-logging

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill replaces ad-hoc console.log calls in OpenCode plugins with a standardized client.app.log interface, ensuring consistent, structured logging across plugins.

Core Features & Use Cases

  • Structured logging: Logs are emitted with fields like service, level, message, and extra for better filtering and observability.
  • Consistent instrumentation: Replaces direct console output with a unified logging pathway suitable for production diagnostics.
  • Use Case: OpenCode plugin developers can quickly adopt logging best practices during initialization, operation, and error handling.

Quick Start

Use the plugin-logging pattern to replace console.log calls with client.app.log in your OpenCode plugin code.

Frequently Asked Questions about plugin-logging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace console.log with structured logging in an OpenCode plugin?

Replace ad-hoc console.log calls with the client.app.log interface to emit structured logs in OpenCode plugins. This routing standardizes logging by capturing initialization, operation, and error events with consistent metadata fields.

What fields does client.app.log support for structured plugin logs?

The client.app.log interface supports structured logging fields including service, level, message, and extra. These fields ensure consistent reporting and enable filterable observability across different plugin events.

When should I use structured logs instead of console output for plugin development?

Use structured logs during plugin development and debugging workflows when initialization, operation, and error events must be captured with metadata. This standardized approach provides better filtering and observability than direct console output for production diagnostics.

Does OpenCode plugin logging require any specific runtime dependencies?

OpenCode plugin logging requires access to the client.app.log interface within the plugin runtime. No additional dependencies are needed, as the skill standardizes logging by leveraging this built-in client application pathway.

Can I filter OpenCode plugin logs by service or log level?

Yes, you can filter OpenCode plugin logs by service and level. The client.app.log interface emits structured fields for each event, enabling consistent, filterable observability across your plugin's initialization and error handling workflows.

What is the best way to standardize logging across multiple OpenCode plugins?

The best way to standardize logging across OpenCode plugins is routing all log events through the client.app.log interface. This unified pathway replaces ad-hoc console output, ensuring consistent instrumentation and structured metadata for production diagnostics.