opsx-trace-log

Instruments suspected call chains with structured trace logs for runtime diagnosis.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill opsx-trace-log-te-quanbzhang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opsx-trace-log
Source: https://github.com/TE-QuanBZhang/skills-pool/tree/main/ai-coding/skills/opsx-trace-log
Command: npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill opsx-trace-log-te-quanbzhang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Diagnosing runtime issues in Android code often requires guessing where a failure occurs. This Skill instruments a suspected call chain with structured trace logs, captures runtime evidence via logcat, analyzes the results, and removes all instrumentation afterward. ## Core Features & Use Cases - Call Chain Discovery: Uses CodeGraph to explore the call chain from a given entry point before instrumenting. - Structured Trace Logging: Detects the project's logging framework (Timber, android.util.Log, or custom utilities) and applies a consistent trace-logging contract with entry, exit, key-state, and exception logs. - Guided Log Analysis: Provides adb logcat filter commands and analyzes captured logs for sequence, timing, thread, state, and lifecycle issues. - Use Case: When a button click intermittently fails to trigger a network request, invoke /opsx:trace-log with the click handler as the entry point, capture logs during reproduction, and pinpoint where the flow breaks. ## Quick Start Run the slash command /opsx:trace-log followed by the entry point or suspected flow you want to diagnose, then follow the guided instrumentation and log-capture steps.

Frequently Asked Questions about opsx-trace-log

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

FAQPage Schema
How do I trace a suspected code path in Android?

Invoke /opsx:trace-log with the entry point or suspicion as the argument. The skill discovers the call chain with CodeGraph, adds structured trace logs, and guides you through capturing and analyzing adb logcat output.

How to add temporary diagnostic logging without polluting the codebase?

This skill defines a trace-logging contract with TAG, log level, and entry/exit/key-state/exception logs, then mandates cleanup as the final step. All instrumentation markers are removed before the session ends.

Does it work with Timber and android.util.Log?

Yes, the skill detects the project's logging framework, supporting Timber, android.util.Log, or project-specific logging utilities, and applies the trace-logging contract consistently with the detected framework.

What tools are required to use this trace logging skill?

It requires the openspec CLI and works alongside the openspec workflow skills and the openspec-trace-logger skill. CodeGraph is used for call chain discovery, and adb logcat is used for log capture.

Can trace logging affect app performance in loops?

The skill includes a performance guardrail step that detects high-frequency or looping patterns before instrumentation. This prevents trace logs from flooding logcat or degrading runtime performance in hot paths.