activity-monitor
Guardian service that monitors the active runtime agent's state and automatically restarts it if stopped. Use when checking agent…
Accurately check current context window and token usage. Use when the user asks about context usage, token consumption, or when monitoring context levels.
Claude Code
$ npx -y skills add zylos-ai/zylos-core --skill check-context --agent claude-code
Codex
$ npx skills add zylos-ai/zylos-core --skill check-context -a codex -y
Cursor
$ npx skills add zylos-ai/zylos-core --skill check-context -a cursor -y
Gemini CLI
$ npx skills add zylos-ai/zylos-core --skill check-context -a gemini-cli -y
GitHub Copilot
$ npx skills add zylos-ai/zylos-core --skill check-context -a github-copilot -y
OpenCode
$ npx skills add zylos-ai/zylos-core --skill check-context -a opencode -y
Windsurf
$ npx skills add zylos-ai/zylos-core --skill check-context -a windsurf -y
name: check-context description: Accurately check current context window and token usage. Use when the user asks about context usage, token consumption, or when monitoring context levels. user-invocable: false
Check current context/token usage. The data source depends on the active runtime.
First, check the active runtime:
node -e "try { const c=JSON.parse(require('fs').readFileSync(require('path').join(process.env.HOME,'zylos/.zylos/config.json'),'utf8')); console.log(c.runtime||'claude'); } catch { console.log('claude'); }"Read the statusLine data file (updated after every turn):
cat ~/zylos/activity-monitor/statusline.json
Report from the JSON:
Read token usage from the most recently modified Codex JSONL session file:
node -e "
const fs=require('fs'),path=require('path');
const base=path.join(process.env.HOME,'.codex/sessions');
let best=null,bestMtime=0;
function walk(d,depth){if(depth>3)return;try{fs.readdirSync(d).forEach(f=>{const p=path.join(d,f);try{const s=fs.statSync(p);if(s.isDirectory())walk(p,depth+1);else if(f.startsWith('rollout-')&&f.endsWith('.jsonl')&&s.mtimeMs>bestMtime){bestMtime=s.mtimeMs;best=p;}}catch{}});}catch{}}
walk(base,0);
if(!best){console.log('No session found');process.exit(0);}
const lines=fs.readFileSync(best,'utf8').split('\n').filter(Boolean);
for(let i=lines.length-1;i>=0;i--){try{const j=JSON.parse(lines[i]);if(j.type==='event_msg'&&j.payload?.type==='token_count'&&j.payload.info.last_token_usage){const u=j.payload.info.last_token_usage.input_tokens;const c=j.payload.info.model_context_window||128000;console.log('used:'+u+' ceiling:'+c+' pct:'+Math.round(u/c*100)+'%');process.exit(0);}}catch{}}
console.log('No token_count event found');
"Report:
Guardian service that monitors the active runtime agent's state and automatically restarts it if stopped. Use when checking agent…
C4 communication bridge — central gateway for ALL external communication (Telegram, Lark, etc.). Use when replying to users via…
Guidelines for managing zylos components via CLI and C4 channels. Use when installing, upgrading, or uninstalling components, or…
Guide for creating effective skills. Use when asked to create a new skill (or update an existing skill) that extends Claude's…
System health check dispatched by the activity monitor via Control queue. Checks PM2 services, disk space, and memory usage. Use…
Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…
Keep a durable record of work passed between Bots in the shared Hindsight memory bank. Use when handing work to another Bot, when…
Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…
Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…