skill-trace

Records skill invocations, durations, and outcomes in JSON trace files during operator generation.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill skill-trace-wangwindow
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: skill-trace
Source: https://github.com/WangWindow/CANN-BatchMatMulMaxsum/tree/main/.agents/skills/skill-trace
Command: npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill skill-trace-wangwindow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When running multi-stage AI pipelines for Ascend C operator generation (cake, cake-evo, cake-partial modes), there is no visibility into which skills were called, how long each took, or how skill usage correlates with final compilation success and speedup. This Skill provides a standardized JSON tracing mechanism to answer those questions. ## Core Features & Use Cases - Lifecycle Tracing: TRACE-INIT, TRACE-START, TRACE-END, and TRACE-FINALIZE operations record each skill's start time, duration, status, retry count, inputs, and outputs into skill_trace.json. - Metadata Attachment: TRACE-META appends extra context such as optimization strategies applied during dsl-lowering. - Multi-Variant Aggregation: TRACE-AGGREGATE merges traces across cake-evo variants to compute skill frequency, average duration, success rate, and best/worst variant correlation analysis. - Use Case: After running a cake-evo pipeline with multiple parallel variants, aggregate all skill_trace.json files to identify which skills and strategies the best-speedup variant used compared to the worst. ## Quick Start Initialize a skill trace file for this operator task, then record the start and completion of each skill invocation and finalize the trace with the evaluation results.

Frequently Asked Questions about skill-trace

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

FAQPage Schema
How do I track skill execution times in an AI agent pipeline?▼

Create a skill_trace.json file at task start, then append an entry before each skill runs and update it with completion time, duration, and status afterward. The trace records started_at, completed_at, duration_s, and retry_count per skill.

How to correlate skill usage with final operator performance?▼

Run TRACE-FINALIZE to merge evaluation results (speedup, precision, compilation status) into the trace, then use TRACE-AGGREGATE across variants. It computes skill frequency, average duration, success rate, and identifies which skills the best and worst variants used.

Where is the skill trace file stored?▼

The location depends on the pipeline mode: output/{op_name}/skill_trace.json for cake mode, output/{op_name}_evo_{timestamp}/ for cake-evo, and round_{r}/parallel_{p}/ subdirectories for cake-partial variants.

What happens if a skill fails or is retried during tracing?▼

The trace entry records status as failed and increments retry_count, with the error message stored in error_message. Failed and retried skills are listed separately in the final skill_impact_summary for debugging analysis.

Can I attach custom metadata to a skill trace entry?▼

Yes, TRACE-META appends a metadata object to the most recent skill entry, such as strategies_applied or compilation_attempts for dsl-lowering. This metadata is later extracted during aggregation to compare strategies across variants.