check-context
Accurately check current context window and token usage.
Skill by zylos-ai
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/zylos-ai-check-context
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: monitoring-observability
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/check-context
What's inside
- Skill 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.
- License
- MIT
- Instructions
- 54 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- package.json
SKILL.md (first lines)
# Check Context Skill
Check current context/token usage. The data source depends on the active runtime.
## When to Use
- When the user asks about context usage
- When the user wants to know token consumption
## How to Use
First, check the active runtime:
```bash
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'); }"
```
### If Claude runtime
Read the statusLine data file (updated after every turn):
```bash
cat ~/zylos/activity-monitor/statusline.json
```
Report from the JSON:
- **Context usage**: `context_window.used_percentage`% used, `context_window.remaining_percentage`% remaining
- **Tokens**: `context_window.total_input_tokens` input, `context_window.total_output_tokens` output (window size: `context_window.context_window_size`)
- **Session cost**: `cost.total_cost_usd`
- **Model**: `model.display_name`
### If Codex runtime
Read token usage from the most recently modified Codex JSONL session file:
```bash
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:
- **Context usage**: pct% used (used / ceiling tokens)
- Report the pct value clearly so the user knows if rotation is needed (threshold: 75%)From zylos-ai/zylos-core, MIT.
More from zylos-ai/zylos-core
- 0.828score
component-management
zylos-ai
Guidelines for managing zylos components via CLI and C4 channels.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
upgrade-claude
zylos-ai
Upgrade Claude Code to the latest version with graceful shutdown and auto-restart.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
scheduler
zylos-ai
Use when user wants to schedule tasks for future, recurring, or interval execution.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
http
zylos-ai
Caddy-based web server providing web console hosting, file sharing, and health check endpoints.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
health-check
zylos-ai
System health check dispatched by the activity monitor via Control queue.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
comm-bridge
zylos-ai
C4 communication bridge — central gateway for ALL external communication (Telegram, Lark, etc.).
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
activity-monitor
zylos-ai
Guardian service that monitors the active runtime agent's state and automatically restarts it if stopped.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
zylos-memory
zylos-ai
Core memory system.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.823score
create-skill
zylos-ai
Guide for creating effective skills.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.823score
web-console
zylos-ai
Built-in web interface for communicating with Claude without external services.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
new-session
zylos-ai
Start a new session when context is high.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.815score
shell
zylos-ai
CLI interactive mode channel.
SkillAFreshness: A★ 1.2KClaude Code +9
Signals
- Stars
- 1,159
- Forks
- 131
- Open issues
- 124
- Last commit (this folder)
- Mar 31, 2026 (7 months ago)
- Last release
- Oct 22, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/zylos-ai/zylos-core
- Website
- zylos.ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from zylos-ai
- 0.828score
scheduler
zylos-ai
Use when user wants to schedule tasks for future, recurring, or interval execution.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
http
zylos-ai
Caddy-based web server providing web console hosting, file sharing, and health check endpoints.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
component-management
zylos-ai
Guidelines for managing zylos components via CLI and C4 channels.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
upgrade-claude
zylos-ai
Upgrade Claude Code to the latest version with graceful shutdown and auto-restart.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
zylos-memory
zylos-ai
Core memory system.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.828score
health-check
zylos-ai
System health check dispatched by the activity monitor via Control queue.
SkillAFreshness: A★ 1.2KClaude Code +9
Cite this page
check-context skill. Agent Mart. https://agentmart.dev/skills/zylos-ai-check-context (last updated 2026-10-24)