Skip to content
/

anilcancakir/claude-code-plugins

anilcancakir-cc-plugins · anilcancakir/claude-code-plugins · ★ 6 · last commit 2026-01-26

Primitive shape 14 total
Skills 4 Subagents 3 Hooks 7
00

Summary

anilcancakir/claude-code-plugins — Summary

A seven-plugin Claude Code marketplace by anilcancakir focused on developer productivity, with the standout feature being the strategic-compact plugin — a hook-driven context management system that triggers at 5 lifecycle events (SessionStart, PreToolUse, PostToolUse, PreCompact, Stop) to track tool usage and suggest strategic compaction at phase transitions. The other plugins address Serena MCP integration, Dart/Flutter LSP, pre-commit automation, business idea research, structured TDD implementation planning, and CLAUDE.md generation. Total: 5 lifecycle hooks (across plugins), 3 skills, 3 agents, multiple commands and scripts per plugin. The strategic-compact plugin is the most architecturally interesting — it uses shell scripts triggered by hooks to count tool calls, detect phase transitions (exploration→implementation), and inject compaction guidance at the right moment rather than relying on Claude's auto-compaction.

differs_from_seeds: The strategic-compact plugin is the closest to a context-compaction-handling system in any personal skill repo — closer to what ccmemory aims to provide for memory, but applied to session compaction timing. Unlike all 11 seeds, it treats compaction as a first-class workflow decision rather than an afterthought. The pre-commit-flow plugin's hook pattern (SessionStart + UserPromptSubmit) resembles spec-kit's approach (2 hooks per command), but is lighter.

01

Overview

anilcancakir/claude-code-plugins — Overview

Origin

Created by @anilcancakir, published with MIT license. The marketplace is focused on practical productivity and workflow improvements for Claude Code users.

Philosophy

The README presents a functional plugin listing without a manifesto, but the strategic-compact plugin embeds a clear philosophy:

Manual compaction at strategic points > Auto-compaction at arbitrary points

"Auto-compact triggers at context limits, often mid-task. Strategic compaction preserves context through logical phases and compacts at natural transition points."

This reflects a broader design philosophy across the plugins: phase-aware automation — detecting where the user is in the development cycle and providing appropriate guidance rather than blanket automation.

Plugins

Seven distinct plugins each solving a specific problem:

  1. strategic-compact — Intelligent context compaction timing
  2. serena-integration — Semantic code navigation with Serena MCP (zero-config)
  3. dart-lsp — Dart/Flutter language server integration
  4. pre-commit-flow — Automated code review, docs, and commits before git push
  5. idea-research — Business idea validation and market research
  6. implementation-planner — Structured TDD implementation planning
  7. project-optimizer — Project setup, CLAUDE.md generation, brand guidelines

Most Notable Innovation

The strategic-compact plugin's hooks.json registers 5 lifecycle events with shell scripts:

  • SessionStartsession-init.sh (initialize session tracking)
  • PreToolUsetrack-and-suggest.sh (count tool calls, suggest compaction)
  • PostToolUse/Bashmilestone-detector.sh (detect test-pass, commit, build milestones)
  • PreCompactcompact-instructions.sh (inject guidance before compaction)
  • Stopstop-check.sh (final check)

This is among the most complete hook coverage in any personal-curation repo in this batch.

02

Architecture

anilcancakir/claude-code-plugins — Architecture

Distribution

  • GitHub: anilcancakir/claude-code-plugins
  • Install: /plugin marketplace add anilcancakir/claude-code-plugins then /plugin install <plugin>
  • License: MIT
  • Primary language: Shell (hooks/scripts)

Directory Structure

claude-code-plugins/
├── .claude-plugin/
│   └── marketplace.json
├── strategic-compact/
│   ├── .claude-plugin/
│   ├── hooks/
│   │   ├── hooks.json         # 5 lifecycle events
│   │   └── strategic-compact  # (hook scripts dir)
│   ├── scripts/
│   │   ├── session-init.sh
│   │   ├── track-and-suggest.sh
│   │   ├── milestone-detector.sh
│   │   ├── compact-instructions.sh
│   │   └── stop-check.sh
│   └── skills/
│       └── strategic-compact/
│           └── SKILL.md
├── serena-integration/
│   ├── .claude-plugin/
│   ├── scripts/
│   └── skills/
│       ├── serena-navigator/
│       ├── serena-refactor/
│       └── serena-memory/
├── dart-lsp/
│   └── ...
├── pre-commit-flow/
│   ├── .claude-plugin/
│   ├── hooks/
│   │   └── hooks.json         # SessionStart + UserPromptSubmit
│   ├── agents/
│   │   ├── code-reviewer.md
│   │   ├── doc-updater.md
│   │   └── test-checker.md
│   ├── commands/
│   └── scripts/
│       ├── detect-project-config.sh
│       └── git-status-context.sh
├── idea-research/
├── implementation-planner/
└── project-optimizer/

Hook Runtime

Shell scripts only — no Node.js/TypeScript runtime required (unlike CEK's Bun hooks). All hooks use ${CLAUDE_PLUGIN_ROOT} variable expansion.

Required Runtime

  • Claude Code
  • Bash/shell environment
  • Serena MCP server (optional, for serena-integration plugin)
    claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena start-mcp-server
    

Configuration (strategic-compact)

Via environment variables:

export STRATEGIC_COMPACT_T1=50    # First suggestion (tool calls threshold)
export STRATEGIC_COMPACT_T2=75    # Second suggestion
export STRATEGIC_COMPACT_T3=100   # Strong recommendation
export STRATEGIC_COMPACT_TIME=1800 # Time threshold (30 min)
03

Components

anilcancakir/claude-code-plugins — Components

strategic-compact Plugin

Skills (1):

Name Purpose
strategic-compact Detect phase transitions, suggest optimal compaction timing, provide /compact, /handoff, /clear options

Hooks (5 events):

Event Script Purpose
SessionStart session-init.sh Initialize tool-call counter and session tracking
PreToolUse (all tools) track-and-suggest.sh Increment counter; suggest compaction at T1/T2/T3 thresholds
PostToolUse (Bash) milestone-detector.sh Detect test-pass, commit, build, deploy milestones
PreCompact compact-instructions.sh Inject guidance on what to preserve during compaction
Stop stop-check.sh Final session check

serena-integration Plugin

Skills (3):

Name Triggers
serena-navigator "navigate code", "find definition", "explore codebase"
serena-refactor "rename function", "refactor", "rename symbol"
serena-memory "save context", "load memories", "persist knowledge"

dart-lsp Plugin

Features: go-to-definition, find references, hover info, code analysis for Dart/Flutter.

pre-commit-flow Plugin

Agents (3):

Name Purpose
code-reviewer Automated code review before commit
doc-updater Update documentation before commit
test-checker Verify tests pass before commit

Hooks (2 events):

Event Script
SessionStart detect-project-config.sh
UserPromptSubmit git-status-context.sh

idea-research Plugin

Business research and idea validation skills.

implementation-planner Plugin

Structured implementation planning with TDD emphasis.

project-optimizer Plugin

Project setup, brand guidelines, CLAUDE.md generation.

Total Primitive Count

  • Skills: 4+ (1 strategic-compact + 3 serena + others)
  • Agents: 3 (pre-commit-flow)
  • Hooks: 7 (5 strategic-compact + 2 pre-commit-flow)
  • Scripts: 7 shell scripts (5 strategic + 2 pre-commit)
  • Commands: unknown exact count
05

Prompts

anilcancakir/claude-code-plugins — Prompts

Prompt File 1: strategic-compact SKILL.md (verbatim excerpt)

Technique: Phase-detection pattern matching with explicit transition vocabulary.

---
name: strategic-compact
description: Context management intelligence for Claude Code sessions. ACTIVATE when context
  filling up, phase transitions detected, user mentions "running out of context"...
---

# Strategic Compact

## Core Principle

**Manual compaction at strategic points > Auto-compaction at arbitrary points**

## When to Suggest Compaction

### Optimal Compaction Points

| Trigger | Reason |
|---------|--------|
| Exploration complete, implementation starting | Exploration context rarely needed for coding |
| Milestone completed | Clean slate for next phase |
| Plan finalized and documented | Plan captured, context can reset |
| Debug session resolved | Debug traces clutter future work |
| Switching to unrelated task | Previous context not relevant |
| 50+ tool calls in session | Accumulated context likely stale |

### Avoid Compaction During

| Scenario | Why |
|----------|-----|
| Mid-implementation | Loses code context and decisions |
| Active debugging | Loses diagnostic information |
| Incomplete task | May need earlier context |
| Code review in progress | Loses review thread |

## Phase Detection Patterns

Detect phase transitions by monitoring:

EXPLORATION → IMPLEMENTATION

  • Many Read/Grep/Glob calls → Edit/Write calls starting
  • Questions answered → Code being written

IMPLEMENTATION → TESTING

  • Edit/Write heavy → Bash(test) calls
  • Feature code done → Verification starting

Prompting technique: Decision-table encoding — uses tables to encode heuristics (when TO compact vs when NOT to), making the decision logic machine-readable and verifiable.

Prompt File 2: strategic-compact hooks.json (verbatim)

Technique: Lifecycle event registration with 5-point hook coverage.

{
  "description": "Strategic compact hooks for intelligent context management",
  "hooks": {
    "SessionStart": [{"hooks": [{"type": "command",
      "command": "${CLAUDE_PLUGIN_ROOT}/scripts/session-init.sh", "timeout": 5}]}],
    "PreToolUse": [{"matcher": ".*", "hooks": [{"type": "command",
      "command": "${CLAUDE_PLUGIN_ROOT}/scripts/track-and-suggest.sh", "timeout": 5}]}],
    "PostToolUse": [{"matcher": "Bash", "hooks": [{"type": "command",
      "command": "${CLAUDE_PLUGIN_ROOT}/scripts/milestone-detector.sh", "timeout": 5}]}],
    "PreCompact": [{"matcher": "manual|auto", "hooks": [{"type": "command",
      "command": "${CLAUDE_PLUGIN_ROOT}/scripts/compact-instructions.sh", "timeout": 5}]}],
    "Stop": [{"hooks": [{"type": "command",
      "command": "${CLAUDE_PLUGIN_ROOT}/scripts/stop-check.sh", "timeout": 5}]}]
  }
}

Prompting technique: Hook-as-injector pattern — shell scripts inject ephemeral guidance text into the conversation at lifecycle events, rather than loading static skill content. The matcher ".*" on PreToolUse catches all tools; the Bash-specific PostToolUse matcher targets milestone detection narrowly.

09

Uniqueness

anilcancakir/claude-code-plugins — Uniqueness

differs_from_seeds

The strategic-compact plugin addresses a problem none of the 11 seeds solve explicitly: when to compact. While ccmemory manages what to remember and all seeds handle context compaction passively, strategic-compact actively monitors session state (tool counts, phase transitions, milestones) to suggest the optimal compaction moment. The closest seed is spec-kit (18 hooks, 2 per command) in hook coverage, but spec-kit's hooks enforce workflow steps, not session meta-management. The 5-event hook registration (SessionStart + PreToolUse/all + PostToolUse/Bash + PreCompact + Stop) is the most complete lifecycle coverage in any single plugin examined in this batch.

Most Distinctive Feature

The PreCompact hook with compact-instructions.sh — this is the only plugin in the entire batch that fires before compaction to inject guidance on what to preserve. This turns the typically uncontrolled compaction event into a manageable transition with explicit preservation rules.

Positioning

  • Context lifecycle management (when to compact) is the primary value proposition
  • Seven pragmatic plugins covering practical developer workflow needs
  • Configurable via environment variables (unusual level of user control)
  • Light dependencies: shell scripts only (no Node.js/Bun required)

Observable Failure Modes

  1. Shell script timing: All hooks have 5-second timeouts. On slow machines or large repos, scripts may time out before completing analysis.
  2. Counter reset: If SessionStart hook misses (plugin not loaded, crashed), the counter starts from 0 mid-session giving wrong tool-call counts.
  3. Milestone detection brittleness: milestone-detector.sh likely uses grep on Bash output — easily broken by non-standard test output formats.
  4. Serena prerequisite friction: The serena-integration plugin requires a multi-step manual setup before any skill works.
  5. HANDOFF.md naming convention: Relies on users knowing to reference HANDOFF.md in the next session — no automated loading.
04

Workflow

anilcancakir/claude-code-plugins — Workflow

Strategic Compact Workflow

SessionStart
  ↓ session-init.sh: initialize counter=0, timestamp=now

Each tool call (PreToolUse)
  ↓ track-and-suggest.sh: counter++
  ↓ IF counter >= T1 (50): "Consider compaction — many tools used"
  ↓ IF counter >= T2 (75): "Second suggestion"
  ↓ IF counter >= T3 (100): "Strong recommendation: compact now"

Bash tool completes (PostToolUse)
  ↓ milestone-detector.sh: scan output for test-pass, commit hash, build success
  ↓ IF milestone detected: "Good time to compact — milestone achieved"

PreCompact fires
  ↓ compact-instructions.sh: inject guidance on preserving:
    - Current goal and progress
    - Key decisions made
    - What worked / didn't
    - Next steps

Stop fires
  ↓ stop-check.sh: final housekeeping

Phase Detection Logic (from strategic-compact SKILL.md)

EXPLORATION → IMPLEMENTATION
- Many Read/Grep/Glob calls → Edit/Write calls starting
- Questions answered → Code being written

IMPLEMENTATION → TESTING
- Edit/Write heavy → Bash(test) calls
- Feature code done → Verification starting

DEBUGGING → RESOLUTION
- Error investigation → Fix confirmed working
- Multiple attempts → Success achieved

Pre-Commit Workflow

User invokes pre-commit flow
  ↓ SessionStart: detect-project-config.sh (detect stack, test framework)
  ↓ UserPromptSubmit: git-status-context.sh (inject git status into context)
  ↓ code-reviewer agent runs
  ↓ test-checker agent runs
  ↓ doc-updater agent updates docs
  ↓ Commit proceeds (or blocked on issues)

Compaction Options (from SKILL.md)

Three options presented to user when compaction is suggested:

  • /compact — Built-in summarization (fast, may lose nuance)
  • /handoff — Creates HANDOFF.md with goal, progress, decisions, next steps (recommended for complex work)
  • /clear — Complete reset (best for task switching)

Approval Gates

The pre-commit-flow agents present findings; the user decides whether to proceed. No automated blocking.

06

Memory Context

anilcancakir/claude-code-plugins — Memory & Context

State Storage

The strategic-compact plugin uses shell scripts to track session state:

  • Tool call counter: incremented by track-and-suggest.sh on every PreToolUse
  • Session timestamp: set by session-init.sh at SessionStart
  • Milestone log: maintained by milestone-detector.sh

These are likely stored in temporary shell variables or a session-specific temp file. The exact storage mechanism is in the shell scripts (not fetched, but inferred from the 5-second timeout constraints).

HANDOFF.md Pattern

The strategic-compact skill explicitly recommends creating a HANDOFF.md file before compaction:

### /handoff (Recommended for complex work)
Creates HANDOFF.md with:
- Current goal and progress
- What worked / what didn't
- Next steps
- Key decisions made

Then start fresh with: > HANDOFF.md

This is a cross-session handoff mechanism: the HANDOFF.md file persists on disk and can be loaded as the first message of the next session.

Memory Type

Session-level (tool call counter, timestamps) + project-level (HANDOFF.md, if created).

Serena Memory (serena-integration)

The serena-memory skill integrates with Serena MCP's memory system for semantic code knowledge persistence. This is external memory via the Serena MCP server.

Compaction Handling

This is the only plugin in the batch specifically designed around compaction. The PreCompact hook fires before any compaction event (manual or auto) and injects guidance on what to preserve. The compact-instructions.sh script tells Claude what critical context to include in the compaction summary.

07

Orchestration

anilcancakir/claude-code-plugins — Orchestration

Multi-Agent

Yes — pre-commit-flow uses 3 agents (code-reviewer, doc-updater, test-checker).

Orchestration Pattern

Sequential for pre-commit-flow (review → test → doc → commit).

Subagent Definition Format

persona-md — agent files in agents/ directory.

Isolation Mechanism

None.

Multi-Model

No explicit model routing.

Execution Mode

Event-driven (hooks fire on lifecycle events) + interactive-loop for skills.

Lifecycle Event Coverage

The strategic-compact plugin covers the most lifecycle events of any single plugin in this batch:

Event Coverage
SessionStart Initialize tracking state
PreToolUse Count tools, suggest compaction
PostToolUse/Bash Detect milestones
PreCompact Inject compaction guidance
Stop Final check

This 5-event coverage compares to spec-kit's 18 hooks (2 per command) but serves a different purpose: meta-session management rather than per-command enforcement.

Prompt Chaining

In pre-commit-flow: code-reviewer output informs test-checker decision.

Consensus

None.

08

Ui Cli Surface

anilcancakir/claude-code-plugins — UI & CLI Surface

CLI Binary

None.

Local UI

None.

IDE Integration

  • Claude Code: Primary target via /plugin marketplace add
  • Restart required after plugin install to activate

Configuration Surface

The strategic-compact plugin has the most explicit configuration surface of any plugin in this batch:

# Environment variables for threshold tuning
export STRATEGIC_COMPACT_T1=50    # First suggestion threshold (tool calls)
export STRATEGIC_COMPACT_T2=75    # Second suggestion threshold
export STRATEGIC_COMPACT_T3=100   # Strong recommendation threshold
export STRATEGIC_COMPACT_TIME=1800 # Time threshold (seconds, default: 30 min)

This makes the compaction timing tunable per user preference or project type — a rare explicit configuration surface in personal skill repos.

Serena Prerequisites

The serena-integration plugin requires manual Serena MCP setup before installing:

cd /path/to/your/project
claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena start-mcp-server \
  --context claude-code --project $(pwd)
uvx --from git+https://github.com/oraios/serena serena project create

Observability

The tool-call counter and milestone detection scripts provide implicit session observability through the compaction suggestion messages. No structured log is written.

Related frameworks

same archetype · same primary tool · same memory type

Claude-Flow / Ruflo ★ 55k

Eliminates single-agent context limits and sequential bottlenecks by orchestrating fault-tolerant swarms of specialized AI agents…

Hermes Agent (NousResearch) ★ 168k

Self-improving personal AI agent with closed learning loop, 7 terminal backends, and messaging gateway — not tied to any AI…

OpenCode ★ 165k

Terminal-first AI coding agent with multi-model routing, native desktop app, and a typed .opencode/ configuration system for…

OpenHands ★ 75k

Open-source AI software development platform (open-source Devin alternative) with Docker sandbox isolation, 77.6% SWE-bench…

DeerFlow ★ 70k

Long-horizon superagent that researches, codes, and creates by orchestrating parallel sub-agents with isolated contexts in Docker…

oh-my-openagent (omo) ★ 60k

Multi-provider AI agent orchestration for OpenCode: escape vendor lock-in by routing Sisyphus (Claude/Kimi/GLM) and Hephaestus…