Skip to content
Back to skills

Cfn Context Pruner

ASecurity

**Version:** 1.0.0 **Purpose:** Hierarchical context summarization for CFN Loop v3 iterations

  • 14 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 7, 2026
code-qualitygobashsecurity

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add masharratt/claude-flow-novice --skill cfn-context-pruner --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cfn Context Pruner?

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

Security grade badge for Cfn Context Pruner
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/masharratt-cfn-context-pruner/badge)](https://www.skillsdirectory.com/skills/masharratt-cfn-context-pruner)

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
# Context Pruner Skill

**Version:** 1.0.0
**Purpose:** Hierarchical context summarization for CFN Loop v3 iterations

## Overview

Reduces context size across iterations by:
- Keeping current iteration in full detail
- Summarizing previous iterations
- Extracting key themes from feedback
- Maintaining deliverable tracking

## Goal

Reduce context from 120 KB (iteration 10) to 15 KB (88% reduction)

## Usage

```bash
PRUNED_CONTEXT=$(./.claude/skills/context-pruner/prune-context.sh \
  --iteration 3 \
  --full-history "$FULL_HISTORY" \
  --current-context "$CURRENT_CONTEXT")

echo "$PRUNED_CONTEXT"
```

## Pruning Strategy

### Iteration 1
- Full detail (no pruning)
- Context size: ~5 KB

### Iteration 2
- Iteration 1: Summary only
- Iteration 2: Full detail
- Context size: ~8 KB

### Iteration 3+
- Iterations 1-(N-1): Summary with key themes
- Iteration N: Full detail
- Context size: ~10-15 KB (stable)

## Summary Format

```
Iterations 1-2 Summary:
- Initial confidence: 0.72
- Key feedback themes:
  * Add error handling
  * Improve test coverage
  * Address security concerns
- Final confidence: 0.82
- Progress: +0.10
```

## Key Themes Extraction

Analyze all feedback across iterations to extract recurring themes:

```bash
# Count feedback occurrences
"Add error handling" - 3 times (iterations 1, 2, 3)
"Improve test coverage" - 2 times (iterations 1, 2)
"Security concerns" - 2 times (iterations 2, 3)

# Output top 5 themes
```

## Integration

Used by:
- Main Chat loop orchestration
- Coordinator for iteration context building

Files in this skill

  • SKILL.md1.6 KB
  • prune-context.sh1.6 KB

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.