context-state

context-state is a skill for Claude Code, Codex from donaldfilimon/abi. It costs 0 tokens per session (425 once invoked), scanned A, original, Apache-2.0.

A command for viewing or clearing an agent session's temporary context, such as recent turns, mentioned files, and session data. It maps to the /context and /reset commands in the agent terminal interface.

In plain words
What is it for?
Use it to report recent context and file mentions, or reset conversation history, file mentions, input, and streaming state.
Why use it?
It helps you inspect what the agent is carrying from earlier work or start with a clean temporary state without changing the selected model or profile.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to report recent context and file mentions, or reset conversation history, file mentions, input, and streaming state.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/donaldfilimon/abi/context-state
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add donaldfilimon/abi --skill context-state
Clone the repo
git clone --depth 1 https://github.com/donaldfilimon/abi

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-state

README.md
[![agentmods](https://agentmods.dev/badge/skills/donaldfilimon/abi/context-state/github.svg)](https://agentmods.dev/skills/donaldfilimon/abi/context-state)
Your own site
<a href="https://agentmods.dev/skills/donaldfilimon/abi/context-state"><img src="https://agentmods.dev/badge/skills/donaldfilimon/abi/context-state/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-state

Your own site · 80×15
<a href="https://agentmods.dev/skills/donaldfilimon/abi/context-state"><img src="https://agentmods.dev/badge/skills/donaldfilimon/abi/context-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 425 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00425
Opus 5.5 $0.00000 $0.00170
Sonnet 5.5 $0.00000 $0.00085
Haiku 4.5 $0.00000 $0.00042

Measured 15d ago against content hash 9ce39e2ca833, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-state scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/context-state/SKILL.md · 78 lines

What it actually says

Agent context state

Merged from the former context-state-reporter and context-resetter skills on 2026-09-21.

Context State Reporter

Use when: Show current agent context state including history, file mentions, and session data. Maps to /context slash command in abi agent tui.

Reports the current state of the agent REPL context.

Usage

/context

Output Includes

  • Turn history (last 10 entries by default)
  • Current file mentions in context
  • Session name if saved
  • Learning mode status
  • Active model/profile

Implementation

Reads ReplState from crates/abi-cli/src/terminal.rs:

  • turn_history ring buffer
  • file_mentions cache
  • learn_mode flag
  • current_model selection

Skill Integration

Direct mapping to abi agent tui REPL /context command.

Context Resetter

Use when: Reset agent context - clear history, file mentions, and transient state. Maps to /reset slash command in abi agent tui.

Clears all transient agent context state for a fresh start.

Usage

/reset

Cleared State

  • Turn history (all entries)
  • File mentions cache
  • Input buffer
  • Streaming state

Preserved State

  • Model/profile selection
  • Learning mode setting
  • Session name (if loaded)
  • Feature flags

Implementation

Calls clearTurnHistory() and resets ReplState fields in crates/abi-cli/src/terminal.rs:

  • turn_history = empty ring buffer
  • file_mentions = empty
  • input_buffer = empty

Skill Integration

Maps to abi agent tui REPL /reset command.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago First seen · 78 lines · 0 tokens per session scan A 9ce39e2ca833

Subscribe to this mod's changes

context-state is a skill published in the GitHub repository donaldfilimon/abi (18 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 425 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-15.

Related

context-state compared with skills from other repositories

context-state next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
context-statedonaldfilimon/abiSkill185d agoApache-2.0A0Claude Code, Codex
clinical-reportssynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A71Claude Code
imaging-data-commonssynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A62Claude Code, Codex
clinical-decision-supportsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A97Claude Code
clinical-imagingsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A69Claude Code, Codex
curated-bio-datasetssynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A79Claude Code, Codex
ggetsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A66Claude Code, Codex