Project Init
Initialize a project with standard Claude Code configuration.
What It Does
- Adds a SessionStart hook to
.claude/settings.json for remote environment setup
- Detects project languages and adds appropriate tool permissions
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 hooks and language-specific permissions. Use when setting up a new project for Claude Code or adding standard configuration to an existing project.4metadata:5 source: https://skillmd.com/skills/bishal-pdmsft/project-init6---78# Project Init910Initialize a project with standard Claude Code configuration.1112## What It Does13141. Adds a SessionStart hook to `.claude/settings.json` for remote environment setup152. Detects project languages and adds appropriate tool permissions1617## Language Detection1819The script detects languages based on project files and adds permissions:2021| Detection File | Language | Permissions Added |22|----------------|----------|-------------------|23| `go.mod` | Go | `go`, `golangci-lint`, `staticcheck`, `govulncheck` |24| `Package.swift`, `*.xcodeproj` | Swift | `swift`, `xcodebuild`, `swiftlint`, `xcrun` |25| `package.json` | Node.js | `npm`, `npx`, `node`, plus `yarn`/`pnpm`/`bun` if lockfiles present |26| `pyproject.toml`, `requirements.txt` | Python | `python`, `pip`, `uv`, `pytest`, `ruff`, `mypy` |27| `Cargo.toml` | Rust | `cargo`, `rustc` |28| `Gemfile` | Ruby | `ruby`, `bundle`, `rake`, `rspec` |29| `pom.xml` | Java (Maven) | `mvn`, `java` |30| `build.gradle` | Java (Gradle) | `gradle`, `./gradlew`, `java` |31| `Dockerfile` | Docker | `docker`, `docker-compose` |32| `*.tf` | Terraform | `terraform`, `tofu` |33| `Makefile` | Make | `make` |3435`git` is always included.3637## Usage3839Run the setup script from your project directory:4041```bash42~/.claude/skills/project-init/scripts/setup-project.sh43```4445The script:46- Creates `.claude/settings.json` if it doesn't exist47- Merges hooks and permissions into existing settings without overwriting48- Is idempotent (safe to run multiple times)49- Requires `jq` for JSON manipulation5051## Batch Setup5253To initialize multiple projects:5455```bash56for dir in ~/projects/*; do57 (cd "$dir" && ~/.claude/skills/project-init/scripts/setup-project.sh)58done59```