Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Learn more in the [official plugins documentation](https://docs.claude.com/en/do
| [learning-output-style](./learning-output-style/) | Interactive learning mode that requests meaningful code contributions at decision points (mimics the unshipped Learning output style) | **Hook:** SessionStart - Encourages users to write meaningful code (5-10 lines) at decision points while receiving educational insights |
| [plugin-dev](./plugin-dev/) | Comprehensive toolkit for developing Claude Code plugins with 7 expert skills and AI-assisted creation | **Command:** `/plugin-dev:create-plugin` - 8-phase guided workflow for building plugins<br>**Agents:** `agent-creator`, `plugin-validator`, `skill-reviewer`<br>**Skills:** Hook development, MCP integration, plugin structure, settings, commands, agents, and skill development |
| [pr-review-toolkit](./pr-review-toolkit/) | Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification | **Command:** `/pr-review-toolkit:review-pr` - Run with optional review aspects (comments, tests, errors, types, code, simplify, all)<br>**Agents:** `comment-analyzer`, `pr-test-analyzer`, `silent-failure-hunter`, `type-design-analyzer`, `code-reviewer`, `code-simplifier` |
| [project-init](./project-init/) | Initialize new projects with a single command: create directory, git repo, and Claude Code configuration | **Command:** `/new-project` - Create a new project directory with git and CLAUDE.md |
| [ralph-wiggum](./ralph-wiggum/) | Interactive self-referential AI loops for iterative development. Claude works on the same task repeatedly until completion | **Commands:** `/ralph-loop`, `/cancel-ralph` - Start/stop autonomous iteration loops<br>**Hook:** Stop - Intercepts exit attempts to continue iteration |
| [security-guidance](./security-guidance/) | Security reminder hook that warns about potential security issues when editing files | **Hook:** PreToolUse - Monitors 9 security patterns including command injection, XSS, eval usage, dangerous HTML, pickle deserialization, and os.system calls |

Expand Down
9 changes: 9 additions & 0 deletions plugins/project-init/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "project-init",
"description": "Initialize new projects with a single command: create directory, git repo, and Claude Code configuration",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
}
}
56 changes: 56 additions & 0 deletions plugins/project-init/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Project Init Plugin

Initialize new projects with a single command. Creates a directory, initializes git, and sets up Claude Code configuration.

## Commands

### `/new-project <project-name>`

Creates a new project directory with:
- Git repository initialized
- `CLAUDE.md` template for project context
- `.gitignore` with common defaults
- Initial commit

**Usage:**
```bash
/new-project my-awesome-app
```

**What it creates:**
```
my-awesome-app/
├── .git/
├── .gitignore
└── CLAUDE.md
```

## Installation

This plugin is included in the Claude Code plugins directory. To use it:

1. Ensure Claude Code is installed
2. The plugin is automatically available when running Claude Code from the repository
3. Or install via the plugin marketplace

## Why Use This?

This plugin streamlines the project creation workflow. Instead of:
```bash
mkdir my-project
cd my-project
git init
# manually create CLAUDE.md
# manually create .gitignore
git add -A
git commit -m "Initial commit"
```

Just run:
```bash
/new-project my-project
```

## Feature Request

This plugin serves as a workaround until native support is added to the Claude Code CLI. See the feature request: [Add project name argument to init command](https://github.com/anthropics/claude-code/issues/18024)
112 changes: 112 additions & 0 deletions plugins/project-init/commands/new-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
description: Create and initialize a new project directory with git and Claude Code configuration
argument-hint: <project-name>
allowed-tools: Bash(mkdir:*), Bash(cd:*), Bash(git init:*), Bash(git add:*), Bash(git commit:*), Bash(ls:*), Bash(pwd:*), Write, AskUserQuestion
---

## Your Task

Create a new project directory and initialize it for development with Claude Code.

**Project name from arguments:** $ARGUMENTS

## Workflow

### 1. Validate Project Name

If no project name was provided (`$ARGUMENTS` is empty), ask the user:
- "What would you like to name your project?"

Validate the project name:
- Must not be empty
- Should be a valid directory name (no special characters that would cause issues)
- Should not already exist as a directory

### 2. Create Project Structure

Execute these steps:

1. **Create the project directory:**
```bash
mkdir -p <project-name>
```

2. **Initialize git repository:**
```bash
cd <project-name> && git init
```

3. **Create CLAUDE.md with basic structure:**
Create a `CLAUDE.md` file in the new directory with:
```markdown
# <Project Name>

## Overview
[Brief description of what this project does]

## Tech Stack
[List technologies, frameworks, languages used]

## Project Structure
[Describe the directory layout once established]

## Development Guidelines
[Any coding standards, patterns, or practices to follow]

## Getting Started
[How to set up and run the project]
```

4. **Create .gitignore with common defaults:**
```
# Dependencies
node_modules/
venv/
__pycache__/

# Environment
.env
.env.local

# IDE
.idea/
.vscode/
*.swp

# OS
.DS_Store
Thumbs.db

# Build
dist/
build/
*.egg-info/
```

5. **Create initial commit:**
```bash
cd <project-name> && git add -A && git commit -m "Initial commit: project scaffolding"
```

### 3. Report Success

After creating the project, inform the user:

1. What was created:
- Directory: `<project-name>/`
- Git repository initialized
- `CLAUDE.md` created
- `.gitignore` created
- Initial commit made

2. Next steps:
- `cd <project-name>` to enter the project
- Run `claude` to start working with Claude Code
- Edit `CLAUDE.md` to add project-specific context

## Important Notes

- Create all files in the NEW directory, not the current directory
- Use the exact project name provided (preserve casing)
- Do not create unnecessary files beyond what's specified
- If the directory already exists, ask the user how to proceed (overwrite, use different name, or cancel)