m-newhauser

Gliner25 Compaction — Development skill for Claude Code

Development community

Local, evidence-first GLiNER2.5 context compaction for Claude Code.

How to install Gliner25 Compaction

This entry records only its repository, not the path inside it, so there is no exact command to give. Open m-newhauser/gliner25-compaction and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Gliner25 Compaction does

Local, evidence-first GLiNER2.5 context compaction for Claude Code.

Alternatives in Development

  • IPolloWork — Enterprise-grade, local-first Agent Workbench for people and agent teams 4.9k ★
  • Alethe Agents — A local-first desktop workspace for running, organizing, and resuming multiple coding agents and shells with r 511 ★
  • Lacp — Local-first policy, evidence, memory, and recovery controls for Claude, Codex, Hermes, and other CLI coding ag 300 ★

README

GLiNER2.5 Context Compaction for Claude Code

Experimental, local-first context compaction for Claude Code. [GLiNER2.5](https://huggingface.co/collections/fastino/gliner25-models) chooses a retention action for completed tool interactions and extracts exact source spans when the full result is unnecessary.

This project does not generate a prose summary. User and assistant text remains unchanged, retained evidence is copied from original character offsets, and mutating tool interactions are preserved in full.

How it works

For each completed, eligible tool interaction, the local model receives:

  • The current goal
  • Nearby conversation text
  • The tool name and input
  • The original tool result

It returns one action:

  • keep_full: preserve the complete call and result
  • keep_evidence: preserve exact excerpts from the result
  • keep_call_only: preserve the call and replace its result with a rerun notice
  • drop: remove the paired call and result

Deterministic safeguards override uncertain predictions, protect validated diagnostic spans, preserve recent messages and mutations, validate exact offsets, and reject orphaned tool results.

Requirements

  • Python 3.11 or newer
  • uv
  • Claude Code 2.1.274 or newer
  • Claude Code function hooks enabled

The default checkpoint is `fastino/gliner2.5-base-v1`. Model weights are downloaded from Hugging Face during setup and are not stored in this repository. The checkpoint model card declares Apache-2.0 licensing.

Install

git clone https://github.com/m-newhauser/gliner25-compaction.git
cd gliner25-compaction
uv sync --frozen
uv run python scripts/download_model.py

Start Claude Code with the plugin:

export CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1
export GLINER_COMPACTION_PYTHON="$PWD/.venv/bin/python"
claude --plugin-dir .

The public default is `shadowMode: true`. Shadow mode runs local analysis and logs the proposed reduction without replacing session history. Revi