home / skills / arjenschwarz / agentic-coding / project-init
This skill initializes a Claude Code project with standard hooks and language-specific permissions for seamless setup.
npx playbooks add skill arjenschwarz/agentic-coding --skill project-initReview the files below or copy the command above to add this skill to your agents.
---
name: project-init
description: 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.
---
# Project Init
Initialize a project with standard Claude Code configuration.
## What It Does
1. Adds a SessionStart hook to `.claude/settings.json` for remote environment setup
2. 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:
```bash
~/.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:
```bash
for dir in ~/projects/*; do
(cd "$dir" && ~/.claude/skills/project-init/scripts/setup-project.sh)
done
```
This skill initializes Claude Code project settings with a standard SessionStart hook and language-specific tool permissions. It creates or merges into .claude/settings.json, adding remote-environment setup and minimal required tools without overwriting existing settings. The setup is idempotent and safe to run repeatedly.
The setup script scans the project tree for language indicator files (for example: package.json, pyproject.toml, go.mod, Cargo.toml, Dockerfile, etc.). It ensures git permission is present and adds a tailored list of tool permissions for each detected language. It then inserts or merges a SessionStart hook into .claude/settings.json using jq, preserving any existing configuration.
Will the script overwrite my existing .claude/settings.json?
No. The script merges hooks and permissions into the existing file and is designed to avoid overwriting user settings.
Is it safe to run the script multiple times?
Yes. The setup is idempotent; running it repeatedly will not duplicate entries or corrupt settings.
What dependency is required to run the script?
jq is required for JSON manipulation. Ensure jq is installed and on your PATH before running the setup.