Skip to content
Back to skills

Ac Context Compactor

ASecurity

Manage and compact context for long sessions. Use when context is filling up, creating handoff summaries, optimizing context usage, or preparing for session continuation.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
databasespythonsqlapidatabase

Works with

  • api

Security analysis

A100/100

Scanned May 31, 2026

npx -y skills add majiayu000/claude-skill-registry --skill ac-context-compactor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ac Context Compactor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ac Context Compactor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-ac-context-compactor/badge)](https://www.skillsdirectory.com/skills/majiayu000-ac-context-compactor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ac-context-compactor
description: Manage and compact context for long sessions. Use when context is filling up, creating handoff summaries, optimizing context usage, or preparing for session continuation.
---

# AC Context Compactor

Manage context usage and create compact summaries for session continuation.

## Purpose

Monitors context usage and creates compact summaries when approaching limits, enabling seamless session continuation without losing critical information.

## Quick Start

```python
from scripts.context_compactor import ContextCompactor

compactor = ContextCompactor(project_dir)
if await compactor.should_compact():
    summary = await compactor.create_compact_summary()
```

## Context Management

```
Context threshold: 85%
│
├── Below 85%: Continue normally
├── At 85%: Create compact summary
└── Above 90%: Force handoff
```

## Compaction Strategy

1. **Preserve**: Critical state and progress
2. **Summarize**: Completed features
3. **Extract**: Key decisions and context
4. **Compress**: Verbose information

## Summary Structure

```json
{
  "session_summary": {
    "features_completed": ["auth-001", "auth-002"],
    "current_feature": "api-001",
    "progress_percentage": 45.5
  },
  "key_decisions": [
    "Using JWT for auth",
    "PostgreSQL for database"
  ],
  "active_context": {
    "current_file": "src/api/routes.py",
    "current_task": "Implementing user endpoint"
  },
  "next_actions": [
    "Complete user endpoint",
    "Add authentication middleware"
  ]
}
```

## Integration

- Used by: `ac-session-manager` for auto-continuation
- Triggers: `ac-handoff-creator` when compacting

## API Reference

See `scripts/context_compactor.py` for full implementation.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.