openclaw - 💡(How to fix) Fix [Feature]: Skill Usage Tracking & Post-Execution Declaration [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62039Fetched 2026-04-08 03:09:54
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

Automatically track skill invocations and append a skill declaration (name + count) at the end of each response.

Root Cause

Automatically track skill invocations and append a skill declaration (name + count) at the end of each response.

RAW_BUFFERClick to expand / collapse

Summary

Automatically track skill invocations and append a skill declaration (name + count) at the end of each response.

Problem to solve

Current OpenClaw behavior when using skills: No usage feedback: Users cannot see which skills were invoked, making it impossible to judge if skills are working effectively No usage statistics: No way to track skill usage frequency, affecting skill management decisions (delete/retain/upgrade) No skill visibility: Skill calls are completely transparent to users, reducing understanding of Agent capabilities Current behavior is insufficient for users to: Evaluate whether a skill is actually useful Discover skill overlaps/redundancies Optimize skill configuration

Proposed solution

  1. Automatic Skill Tracking Inject a counter into the Agent execution flow. After each skill invocation, automatically record: Skill name Invocation count Timestamp
  2. Skill Declaration at Response End Automatically append to the end of each user-visible response: 🛠️ Skills: [skill-a, skill-b, skill-c] | Calls: 5

When no skills used: 🛠️ Skills: none | Calls: 0 3. Skill Statistics Command Add /skills-stats command to view historical statistics: Top 10 Skills (Last 7 Days): paper-parse 42 calls unified-search 38 calls memory 25 calls ... 4. Configuration Options skills: usageTracking: true # Enable tracking showDeclaration: true # Show skill declaration declarationPosition: "end" # Declaration position (end/start)

Alternatives considered

<div data-lark-html-role="root"><div class="universal-card-table universal-card-table--no-pagination universal-card-element-shell"><div class="ud__table-wrapper"><div class="ud__loading-nested-loading"><div class="ud__loading__container"><div class="ud__table ud__table-md ud__table-bordered ud__table-scrollbar-hidden"><div class="ud__table-container"><div class="ud__table-content"> Approach | Weakness -- | -- Manual recording to MEMORY.md | Relies on Agent self-discipline, unreliable, no statistics Log analysis | Requires users to manually check logs, high barrier, no real-time feedback Skills self-report | Each skill needs separate implementation, inconsistent, high maintenance cost Only show in session_status | Requires user to actively invoke command, passive viewing </div></div></div></div></div></div></div><span class="universal-card-text universal-card-text--bold">Selected approach advantages</span><span class="universal-card-text">:</span><br><div class="universal-card-markdown-list"><ul class="universal-card-markdown-list__ul"><li data-marker="0"><div class="universal-card-markdown-list__li-content"><span class="universal-card-text">Automated (no extra user/skill action needed)</span></div></li></ul><ul class="universal-card-markdown-list__ul"><li data-marker="0"><div class="universal-card-markdown-list__li-content"><span class="universal-card-text">Real-time visible (visible in every response)</span></div></li></ul><ul class="universal-card-markdown-list__ul"><li data-marker="0"><div class="universal-card-markdown-list__li-content"><span class="universal-card-text">Low intrusion (fixed declaration format, doesn't affect response content)</span></div></li></ul></div></div>

Impact

Affected Users All OpenClaw users: Especially those with multiple skills installed Skill developers: Can get real usage data feedback Agent operators: Easier skill configuration optimization Severity Medium: Affects skill management efficiency, but doesn't block core functionality Current state: Users cannot judge if skills are working effectively, which may lead to: Keeping useless skills wasting resources Deleting useful skills causing functionality loss Unable to discover skill overlaps Frequency Every conversation: Whenever there's a skill call, feedback is needed Practical Consequences Blind skill configuration, cannot optimize Insufficient user understanding of Agent capabilities Skill developers lack usage data feedback

Evidence/examples

Skill Status Report (Mandatory)

At the end of each conversation, must append the skill status used in this session.

Format example: 🛠️ Skills: [memory, github, tavily-search] | Calls: 3

Additional information

// Tool call wrapper async function callTool(toolName: string, args: any) { skillUsageCounter.increment(toolName); const result = await tool.execute(args); return result; }

{ "skill_usage": { "paper-parse": { "count": 42, "last_used": "2026-04-07T01:00:00Z" }, "unified-search": { "count": 38, "last_used": "2026-04-07T00:55:00Z" } } }

extent analysis

TL;DR

Implement automatic skill tracking and append a skill declaration to the end of each response to provide users with feedback on skill usage.

Guidance

  • Modify the callTool function to record skill usage by incrementing the skillUsageCounter for each tool invocation.
  • Append a skill declaration to the end of each response, including the skills used and the number of calls, using the format 🛠️ Skills: [skill-a, skill-b, skill-c] | Calls: 5.
  • Consider adding a /skills-stats command to view historical statistics on skill usage.
  • Update the configuration options to include usageTracking, showDeclaration, and declarationPosition to control the behavior of skill tracking and declaration.

Example

// Example of modified callTool function
async function callTool(toolName: string, args: any) {
  skillUsageCounter.increment(toolName);
  const result = await tool.execute(args);
  return result;
}

// Example of appending skill declaration to response
const response = '...'; // original response
const skillDeclaration = `🛠️ Skills: [${usedSkills.join(', ')}] | Calls: ${callCount}`;
const finalResponse = `${response}\n${skillDeclaration}`;

Notes

The implementation details may vary depending on the specific requirements and constraints of the OpenClaw system. The provided example is a simplified illustration of the proposed solution.

Recommendation

Apply the proposed solution to implement automatic skill tracking and append a skill declaration to the end of each response, as it provides a low-intrusion and real-time visible solution that meets the requirements.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING