Project Init
Initialize a project with standard Claude Code configuration.
What It Does
- Detects project languages and adds appropriate tool permissions to
.claude/settings.json
Language Detection
The script detects languages based on project files and adds permissions:
| Detection File |
Language |
Permissions Added |
go.mod |
Go |
go, golangci-lint, staticcheck, govulncheck |
Package.swift, *.xcodeproj |
Swift |
swift, xcodebuild, swiftlint, xcrun |
package.json |
Node.js |
npm, npx, node, plus yarn/pnpm/bun if lockfiles present |
pyproject.toml, requirements.txt |
Python |
python, pip, uv, pytest, ruff, mypy |
Cargo.toml |
Rust |
cargo, rustc |
Gemfile |
Ruby |
ruby, bundle, rake, rspec |
pom.xml |
Java (Maven) |
mvn, java |
build.gradle |
Java (Gradle) |
gradle, ./gradlew, java |
Dockerfile |
Docker |
docker, docker-compose |
*.tf |
Terraform |
terraform, tofu |
Makefile |
Make |
make |
git is always included.
Usage
Run the setup script from your project directory:
~/.claude/skills/project-init/scripts/setup-project.sh
The script:
- Creates
.claude/settings.json if it doesn't exist
- Merges hooks and permissions into existing settings without overwriting
- Is idempotent (safe to run multiple times)
- Requires
jq for JSON manipulation
Batch Setup
To initialize multiple projects:
for dir in ~/projects/*; do
(cd "$dir" && ~/.claude/skills/project-init/scripts/setup-project.sh)
done
1---2name: project-init3description: Initialize Claude Code project settings with standard language-specific permissions. Use when setting up a new project for Claude Code or adding standard configuration to an existing project.4---5
6# Project Init
7
8Initialize a project with standard Claude Code configuration.
9
10## What It Does
11
121. Detects project languages and adds appropriate tool permissions to `.claude/settings.json`
13
14## Language Detection
15
16The script detects languages based on project files and adds permissions:
17
18| Detection File | Language | Permissions Added |
19|----------------|----------|-------------------|
20| `go.mod` | Go | `go`, `golangci-lint`, `staticcheck`, `govulncheck` |
21| `Package.swift`, `*.xcodeproj` | Swift | `swift`, `xcodebuild`, `swiftlint`, `xcrun` |
22| `package.json` | Node.js | `npm`, `npx`, `node`, plus `yarn`/`pnpm`/`bun` if lockfiles present |
23| `pyproject.toml`, `requirements.txt` | Python | `python`, `pip`, `uv`, `pytest`, `ruff`, `mypy` |
24| `Cargo.toml` | Rust | `cargo`, `rustc` |
25| `Gemfile` | Ruby | `ruby`, `bundle`, `rake`, `rspec` |
26| `pom.xml` | Java (Maven) | `mvn`, `java` |
27| `build.gradle` | Java (Gradle) | `gradle`, `./gradlew`, `java` |
28| `Dockerfile` | Docker | `docker`, `docker-compose` |
29| `*.tf` | Terraform | `terraform`, `tofu` |
30| `Makefile` | Make | `make` |
31
32`git` is always included.
33
34## Usage
35
36Run the setup script from your project directory:
37
38```bash
39~/.claude/skills/project-init/scripts/setup-project.sh
40```
41
42The script:
43- Creates `.claude/settings.json` if it doesn't exist
44- Merges hooks and permissions into existing settings without overwriting
45- Is idempotent (safe to run multiple times)
46- Requires `jq` for JSON manipulation
47
48## Batch Setup
49
50To initialize multiple projects:
51
52```bash
53for dir in ~/projects/*; do
54 (cd "$dir" && ~/.claude/skills/project-init/scripts/setup-project.sh)
55done
56```