# Claude Code Plugins

Community plugins for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) by [@anilcancakir](https://github.com/anilcancakir).

## Installation

Start a new Claude Code session in the terminal and enter the following commands:

```
> /plugin marketplace add anilcancakir/claude-code-plugins

> /plugin install <plugin-name>
```

Restart Claude Code to activate the plugin.

## Available Plugins

| Plugin | Description |
|--------|-------------|
| [strategic-compact](#strategic-compact) | Smart context management with phase-aware compaction |
| [serena-integration](#serena-integration) | Full-automation Serena MCP integration |
| [dart-lsp](#dart-lsp) | Dart/Flutter language server integration |
| [pre-commit-flow](#pre-commit-flow) | Automated code review, docs, and commits |
| [idea-research](#idea-research) | Business research and idea validation |
| [implementation-planner](#implementation-planner) | Structured implementation planning with TDD |
| [project-optimizer](#project-optimizer) | Project setup, brand guidelines, CLAUDE.md generation |

---

## Strategic Compact

Smart context management that suggests compaction at strategic points instead of arbitrary auto-compaction.

### Features

- **Phase Detection**: Suggests compact when switching from exploration to implementation
- **Milestone Detection**: Detects test passes, commits, builds, deploys
- **Configurable Thresholds**: Control when suggestions appear
- **Compaction Guidance**: Preserves important context during compaction

### Installation

```
> /plugin marketplace add anilcancakir/claude-code-plugins

> /plugin install strategic-compact
```

### Configuration

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

[Full documentation](./strategic-compact/README.md)

---

## Serena Integration

Full-automation Serena MCP integration for Claude Code. Zero manual configuration - semantic navigation, memory management, and tool routing work automatically.

### Prerequisites

Before installing, set up Serena MCP in your project:

```bash
# 1. Add Serena MCP server
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)

# 2. Create project configuration
uvx --from git+https://github.com/oraios/serena serena project create

# 3. Index project (for large codebases)
uvx --from git+https://github.com/oraios/serena serena project index
```

### Features

- **Automatic Tool Suggestions**: Context-aware recommendations for Serena's semantic tools
- **Memory Suggestions**: Prompts to update memory after commits, tests, discoveries
- **Session Tracking**: Tracks edits, commits, tests for session summaries
- **Context Preservation**: Reminds to save context before compaction

### Installation

```
> /plugin marketplace add anilcancakir/claude-code-plugins

> /plugin install serena-integration
```

### Skills

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

[Full documentation](./serena-integration/README.md)

---

## Dart LSP

Dart/Flutter language server integration for enhanced code intelligence.

### Features

- Go-to-definition
- Find references
- Hover information
- Code analysis

### Installation

```
> /plugin marketplace add anilcancakir/claude-code-plugins

> /plugin install dart-lsp
```

[Full documentation](./dart-lsp/README.md)

---

## Pre-Commit Flow

Automated code review, documentation updates, and intelligent commits with stack-specific intelligence.

### Features

- **Code Review**: Security analysis, bug detection, quality checks
- **Documentation**: Auto-update inline docs (PHPDoc, DartDoc, JSDoc)
- **Smart Commits**: Auto-detect commit style, generate semantic messages
- **Multi-Stack**: Laravel, Flutter, Vue 2/3, Nuxt, TailwindCSS, Alpine.js

### Installation

```
> /plugin marketplace add anilcancakir/claude-code-plugins

> /plugin install pre-commit-flow
```

### Commands

| Command | Description |
|---------|-------------|
| `/my_review` | Code review with security analysis |
| `/my_docs` | Update inline documentation |
| `/my_commit` | Generate smart commit message |
| `/my_send` | Full workflow: review → docs → commit |

[Full documentation](./pre-commit-flow/README.md)

---

## Idea Research

Comprehensive business research, market analysis, competitor intelligence, and idea validation.

### Features

- **Market Research**: TAM/SAM/SOM calculation, industry analysis
- **Competitor Analysis**: Profile 10-20 competitors with positioning
- **Trend Analysis**: Signal detection, timing assessment
- **Idea Validation**: 5-dimension scoring, SWOT analysis

### Installation

```
> /plugin marketplace add anilcancakir/claude-code-plugins

> /plugin install idea-research
```

### Commands

| Command | Description |
|---------|-------------|
| `/my_research [topic] --quick` | Quick market overview |
| `/my_research [topic] --standard` | Standard competitor analysis |
| `/my_research [topic] --deep` | Deep idea validation |

[Full documentation](./idea-research/README.md)

---

## Implementation Planner

Structured implementation planning with TDD support. Breaks down features into testable increments.

### Features

- **Plan Mode**: Create detailed implementation plans with phases and tasks
- **TDD Workflow**: Test-driven development with RED-GREEN-REFACTOR cycle
- **Execution Mode**: Step-by-step implementation with progress tracking
- **Multi-Stack**: Laravel, Flutter, Vue/Nuxt support

### Installation

```
> /plugin marketplace add anilcancakir/claude-code-plugins

> /plugin install implementation-planner
```

### Commands

| Command | Description |
|---------|-------------|
| `/my_plan` | Create implementation plan for a feature |
| `/my_tdd` | Start TDD workflow (write tests first) |
| `/my_execute` | Execute plan step by step |

[Full documentation](./implementation-planner/README.md)

---

## Project Optimizer

Optimize existing projects for Claude Code with intelligent setup, brand guidelines, and project documentation.

### Features

- **Project Brief**: Create non-technical project.md with identity and features
- **Brand Guidelines**: Platform-agnostic brand.md with 12 Jungian archetypes
- **CLAUDE.md Generation**: Optimized technical configuration
- **Audit**: Quality assessment with improvement recommendations

### Installation

```
> /plugin marketplace add anilcancakir/claude-code-plugins

> /plugin install project-optimizer
```

### Commands

| Command | Description |
|---------|-------------|
| `/my_project` | Create project brief (project.md) |
| `/my_brand` | Create brand guidelines (brand.md) |
| `/my_setup` | Generate CLAUDE.md configuration |
| `/my_audit` | Audit setup files with quality report |

[Full documentation](./project-optimizer/README.md)

---

## Requirements

- Claude Code CLI
- `jq` (for JSON processing in hooks)
- For serena-integration: Serena MCP server configured
- For idea-research: Internet access for WebSearch/WebFetch

## Contributing

1. Fork the repository
2. Create your plugin folder with required structure
3. Add to `.claude-plugin/marketplace.json`
4. Submit a pull request

### Plugin Structure

```
my-plugin/
├── .claude-plugin/
│   └── plugin.json       # Required: name, version, description
├── agents/               # Subagent definitions
│   └── agent-name.md
├── hooks/
│   └── hooks.json        # Hook definitions
├── scripts/              # Shell scripts for hooks
├── skills/
│   └── skill-name/
│       ├── SKILL.md      # Skill definitions
│       └── references/   # Supporting documents
├── commands/
│   └── command-name.md   # Slash commands
├── README.md
├── CHANGELOG.md
└── LICENSE
```

## License

MIT License - see [LICENSE](LICENSE)

## Author

**Anilcan Cakir** - [@anilcancakir](https://github.com/anilcancakir)
