Install
openclaw skills install skill-trackerTrack skill execution details including matched skills, decomposed tasks, execution status, outputs, and timestamps. Called at the start of every conversatio...
openclaw skills install skill-trackerTrack skill execution for analysis and debugging. This skill monitors which skills are used in conversations and records detailed task information.
This skill MUST be called at the start of every conversation turn (every user message you respond to — see AGENTS.md Mandatory Workflow). It is a hard gate — no user request is processed until skill-tracker has run.
Skip condition: If the current conversation turn does NOT involve calling any tool AND does NOT match any skill (i.e., the response is pure text with no tool invocations and no skill is triggered), do NOT append a record to the tracking file. Simply skip recording for this turn.
Record condition: A record MUST be appended when either of the following is true:
Records are stored in: workspace/tracker-result/skill-execution.jsonl (one JSON record per line, append-only)
skill-tracker skill's own execution must NOT be recorded in the skills or tasks arrays. It is infrastructure, not a tracked skill. Only record other skills that were matched and executed during this turn.{
"sessionId": "string",
"turnId": "string",
"turnName": "string (summary name for this turn, concisely describing all sub-tasks in this turn)",
"timestamp": "ISO8601",
"messages": [
{
"role": "user|assistant",
"content": "string (the message content)",
"timestamp": "ISO8601"
}
],
"skills": [
{
"name": "string",
"description": "string"
}
],
"tasks": [
{
"id": "task-1",
"name": "string",
"skill": "string",
"taskType": "instant|scheduled",
"scheduledName": "string or null",
"detail": "string (30-150 chars, summarize the task context and purpose; if there is a likely next step, append 1-2 sentences describing it)",
"status": "pending|running|completed|failed",
"output": "string or null",
"startedAt": "ISO8601 or null",
"endedAt": "ISO8601 or null",
"error": "string or null"
}
],
"artifacts": [
{
"taskId": "task-1",
"fileName": "example.md",
"fileSize": 1234,
"absolutePath": "/home/node/.openclaw/workspace/tracker-result/example.md"
}
]
}
Notes:
sessionId identifies the session; turnId identifies the specific conversation turn (e.g. turn-1, turn-2, ...).turnName is a concise summary name for the entire turn, summarizing all sub-tasks (e.g. "Check weather in London", "Plan weekend trip itinerary"). Keep it short and descriptive.messages is an array of chat messages for this turn. Each entry has role ("user" for user input, "assistant" for AI reply), content (the message text), and timestamp (ISO8601). Record the user's input when creating the initial record; add the assistant's reply when updating after execution.skills is an array — a single turn may match multiple skills.skill field linking it to the skill it belongs to.artifacts is optional. Only include if there are output files generated by the skill.taskId field linking it to the task that produced it (matches the task's id field).taskType: Either "instant" or "scheduled".
"instant" — The task is triggered by a direct user request in the current conversation."scheduled" — The task is triggered by a scheduled/timed mechanism (e.g. heartbeat, cron job, recurring check). Determine this from the conversation context, trigger source, and execution metadata.scheduledName: If taskType is "scheduled", populate with the name/label of the scheduled task (e.g. "heartbeat", "daily-email-check", the cron label, etc.). If taskType is "instant", set to null.detail: A summary of 30–150 characters describing the task's context, cause, and purpose. This should help the user quickly understand what the task is about and why it was executed. If there is a likely next step to be executed after this task, append 1–2 sentences describing it; if there is no next step, do not append anything.sessionId, turnId, timestamp, matched skills, and initial tasks (including taskType, scheduledName, and detail).workspace/tracker-result/skill-execution.jsonl (create the directory if it doesn't exist).Once the matched skill finishes executing within this turn:
"completed" or "failed", fill in endedAt, output, error.artifacts if any output files were generated.This final update only touches the current turn's line (the last line). All prior lines remain untouched.
This skill operates completely silently during execution — it must NEVER interfere with, delay, or alter the normal reply content to the user.
Output rule: After the record is saved, append a short Deck reminder as the very last line of your reply (after all normal content). The reminder must be separated from the main reply by a blank line. It should feel like a subtle footer, not part of the answer itself.
Language rule: The reminder line MUST be written in the same language the user used in their message.
Do NOT:
Every time a record is saved, you MUST run the following shell command to detect the Deck URL in real time. The port is NOT fixed — do NOT cache, hardcode, or reuse a previous result. Always execute the command fresh.
pm2 jlist 2>/dev/null | node -e "
let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{
try{const l=JSON.parse(d);const f=l.find(p=>p.name==='deck-backend'&&p.pm2_env&&p.pm2_env.status==='online');
if(f){
const cwd=f.pm2_env.pm_cwd||'';
const path=require('path');
const fs=require('fs');
let port='19520';
try{const envFile=fs.readFileSync(path.join(cwd,'.env'),'utf8');const m=envFile.match(/^PORT\s*=\s*(\d+)/m);if(m)port=m[1];}catch(e){}
const publicIp=(require('child_process').execSync('curl -s --connect-timeout 3 ifconfig.me 2>/dev/null').toString()||'').trim();
if(publicIp){
const http=require('http');
const req=http.get('http://'+publicIp+':'+port+'/',{timeout:3000},res=>{
console.log('http://'+publicIp+':'+port);process.exit(0);
});
req.on('error',()=>{console.log('http://localhost:'+port);process.exit(0);});
req.on('timeout',()=>{req.destroy();console.log('http://localhost:'+port);process.exit(0);});
}else{console.log('http://localhost:'+port);process.exit(0);}
}else{process.exit(1)}}catch(e){process.exit(1)}})
"
Behavior:
deck-backend process (not deck-frontend) in PM2..env file to detect the PORT (default 19520).http://<public_ip>:<port>/. If reachable, use the public URL; otherwise fall back to http://localhost:<port>."📋 Task recorded — view details in Deck: [Deck](http://103.126.92.85:19520)""📋 Task recorded — check the Deck for details."Do not expose internal JSON structure or file paths to the user.