A Claude Code plugin that auto-discovers project tooling and configures .claude/ accordingly.
Detects virtual environments, linters, test runners, IDE settings, and additional source directories, then writes the appropriate .claude/settings.json and .claude/CLAUDE.md configuration.
Your IDE already knows your project: the virtual environment, the linters, the test runner, the source roots. But Claude doesn't — without explicit configuration it falls back to generic assumptions, misses project-specific tooling, and can't access dependency sources sitting one directory over.
This plugin bridges that gap. It reads what your IDE and project files already declare, then writes the matching .claude/ configuration so Claude uses the right interpreter, runs the right linter, and has access to the right directories — no manual setup required.
- Environment detection — Python venvs (standard, Poetry, Pipenv, PDM, uv), Node.js, Rust, Go
- IDE settings — Extracts hints from VSCode, PyCharm, Vim/Neovim, Emacs configs
- Linter detection — pre-commit, ruff, black, mypy, eslint, prettier, clippy, golangci-lint, and more
- Test runner detection — pytest, tox, nox, jest, vitest, cargo test, go test
- Directory detection — Monorepo workspaces, git submodules, IDE source roots, symlinks
See the official Claude Code plugin docs for general guidance on installing and managing plugins.
claude plugin install claude-code-project-setupOr install from the repository directly:
claude plugin install /path/to/project-setupTo test the plugin without installing it, load it for a single session:
cd /your/project
claude --plugin-dir /path/to/project-setupThe plugin is active only for that session. Commands are namespaced by the plugin name, so run /project-setup:project-setup instead of /project-setup.
When the plugin is installed, it automatically detects when you start a new Claude Code session in a project without .claude/settings.json or CLAUDE.md. The hook injects a message into Claude's context suggesting /project-setup:project-setup.
Limitations:
- The message is not displayed in the terminal UI (e.g., "Recent activity" or "Tips"). It's added to Claude's context, so Claude will see the suggestion when you send your first message.
- The
/initcommand cannot be hooked — there's no hook event for built-in CLI commands. If you run/init, it creates a basicCLAUDE.mdwithout the tooling detection this plugin provides. Run/project-setup:project-setupinstead or afterwards for full configuration.
If your project is already configured, the hook stays silent.
- Open a terminal in your PyCharm project root (the folder containing
.idea/) - Launch Claude with the plugin:
cd /your/pycharm/project claude --plugin-dir /path/to/project-setup - Inside the session, run a dry run first:
/project-setup:project-setup --dry-run
The plugin reads .idea/*.iml (source roots), misc.xml (Python interpreter), and runConfigurations/*.xml (test setup). If the output looks right, apply it:
/project-setup:project-setup
Note: The plugin only detects folders that PyCharm has registered as modules in .idea/modules.xml. If you have multiple folders open in PyCharm but they aren't configured as modules (e.g. you opened them informally alongside the main project), the plugin won't find them. In that case, add them manually — see Manual directory configuration below.
/project-setup:project-setup
Runs all detectors, shows a summary of findings, and asks for approval before writing configuration files.
/project-setup:project-setup --dry-run
Runs detection and shows the proposed changes without writing any files.
/project-setup:check
Checks that all referenced paths, tools, and commands in .claude/settings.json and .claude/CLAUDE.md actually work.
/project-setup:copy-from [/path/to/source-project] [--dry-run]
Reads .claude/ configuration from a source project and adapts it for the current project. Rather than a verbatim copy, paths, environments, and tool references are remapped:
- Virtual environment — the source venv path is replaced with the one detected in the current project.
- Additional directories — each source directory is matched to an equivalent relative to the current project root. If the mapping is ambiguous you'll be asked to confirm.
- Allowed commands — tool commands (e.g.
Bash(pytest *)) are kept only if the same tool is present; substitutions are made when the current project uses an equivalent (e.g.pnpminstead ofnpm). - CLAUDE.md sections —
## Environment,## Linting, and## Testingare regenerated from fresh detection; other sections are copied and paths are rewritten.
If no path is given, the command will ask for one. Use --dry-run to preview changes without writing any files.
- Open a terminal in the target project (e.g.
src/projectK) — it does not need an existing.claude/ - Launch Claude with the plugin:
cd src/projectK claude --plugin-dir /path/to/project-setup - Run a dry run first:
/project-setup:copy-from ../projectA --dry-run - Check the summary — the "Adapted" section should show path remapping, not just "Copied as-is"
- If the output looks right, apply it:
/project-setup:copy-from ../projectA
What to check in the output:
| Scenario | Expected result |
|---|---|
| Source has a venv path | Replaced with target project's venv, not copied verbatim |
Source additionalDirectories exist near target |
Carried over automatically |
Source additionalDirectories don't exist near target |
Warned and dropped |
Source additionalDirectories have an ambiguous match |
You are prompted to confirm |
Target has permissions.deny entries |
Unchanged after copy |
Create .claude/project-setup.local.md to customize behavior:
---
dir-permission-default: read
---dir-permission-default controls what permissions are granted for discovered additional directories:
read(default) — addsRead,Glob,Grepread-only— addsReadonly (no search tools)edit— addsRead,Glob,Grep,Edit,Writefull— addsRead,Glob,Grep,Edit,Write,Bash(*)
If the plugin can't detect your extra directories automatically, or you want to fine-tune what it produced, edit .claude/settings.json in your project root directly.
If you have several sibling projects (e.g. src/projectA, src/projectR, src/projectK) and want Claude to work across all of them from projectK:
{
"permissions": {
"additionalDirectories": [
"../projectA",
"../projectR"
],
"allow": [
"Bash(pytest *)",
"Bash(pre-commit run *)",
"Read(../projectA/**)",
"Read(../projectR/**)"
]
},
"env": {
"VIRTUAL_ENV": "/absolute/path/to/projectK/.venv"
},
"hooks": {
"SessionStart": ["source /absolute/path/to/projectK/.venv/bin/activate"]
}
}| Field | Purpose |
|---|---|
permissions.additionalDirectories |
Directories Claude can browse freely (relative to project root) |
permissions.allow |
Pre-approved tool+path combinations, so Claude doesn't prompt for each |
permissions.deny |
Explicitly blocked tools or paths — never modified by the plugin |
env.VIRTUAL_ENV |
Python virtual environment path (absolute) |
hooks.SessionStart |
Shell commands run at session start, e.g. venv activation |
additionalDirectories paths are relative to the project root. env and hooks paths must be absolute. permissions.deny is never touched by the plugin regardless of what other commands run.
permissions.allow— lint and test commandspermissions.additionalDirectories— discovered external source directoriesenv.VIRTUAL_ENV— Python virtual environment pathhooks.SessionStart— PATH activation for venvs
Existing settings are merged, never overwritten. permissions.deny is never modified.
Appends concise sections (only if the ## header doesn't already exist):
## Environment— language version, venv location## Linting— canonical lint command## Testing— canonical test command, single-test pattern
The GitHub Actions workflow publishes to npm automatically when you push a version tag:
npm version patch # or minor/major
git push --follow-tags- Create an account on https://www.npmjs.com
- Go to Access Tokens in your account settings
- Generate a new Automation token
- Add it as a GitHub repo secret named
NPM_TOKENunder Settings > Secrets and variables > Actions
This plugin can be submitted to the Anthropic Plugin Directory for review and distribution.
MIT