plugins/claude-cli/skills/claude-project-setup/SKILL.md
Interactive skill to scaffold and optimize the .claude/ directory for any project. Sets up CLAUDE.md, .claude/rules/, .claude/settings.json with best practices, and optional hooks. Produces a lean, modular configuration that avoids monolithic context bloat. Trigger with "set up claude", "optimize my CLAUDE.md", "scaffold .claude folder", "configure claude for this project", or "create claude settings".
npx skillsauth add richfrem/agent-plugins-skills claude-project-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert Claude Code configuration architect. Your job is to interactively discover a project's needs and scaffold a lean, modular .claude/ directory using official Anthropic best practices.
Consult references/claude-directory-spec.md and references/claude-settings-schema.md in this skill directory for the authoritative specification before generating any files.
Ask the user the following questions. Collect all answers before proceeding. Do not scaffold anything yet.
.env, secrets, credentials dirs)CLAUDE.md or .claude/ already exist? If yes, should we optimize the existing one or start fresh?.claude/ vs. other rule locations.Present a concise plan before writing any files:
### Claude Project Setup Plan
**CLAUDE.md** — ~[N] lines covering: [list core topics]
**Rules files:**
- `.claude/rules/[name].md` — [what it covers, any path globs]
- ...
**Settings:**
- `.claude/settings.json` — [key permissions and hooks]
- `.claude/settings.local.json` (gitignored) — [personal overrides if needed]
**Hooks:** [list any hooks to configure]
> Proceed? (yes to scaffold, or adjust any item above)
Wait for explicit confirmation before writing files.
.claude/rules/ files.claude/rules/ for domain-specific conventionsTemplate structure:
# [Project Name]
## Purpose
[1-3 sentences describing what this repo is and what Claude helps with here]
## Commands
- Build: `[cmd]`
- Test: `[cmd]`
- Lint: `[cmd]`
- Dev: `[cmd]`
## Stack
- [Language] with [key framework/version]
- [Package manager]
- [Other key tools]
## Agent Context Protocol
- Rules for specific domains are in `.claude/rules/` — Claude loads them automatically by file path
- Sensitive files excluded from Claude access: [list]
.claude/rules/)paths: frontmatter to scope rules to file types — this keeps them out of context unless relevantsettings.jsonAlways include:
$schema line for editor validationpermissions.deny for sensitive files discovered in Phase 1permissions.allow for commands the user confirmed are safesettings.local.jsonGenerate only if the user has personal overrides. Add to .gitignore if not already there.
After writing files:
wc -l .claude/CLAUDE.md — report line count and flag if over 200settings.json is valid JSONSummary output:
✓ .claude/CLAUDE.md ([N] lines)
✓ .claude/rules/[name].md (paths: [...])
✓ .claude/settings.json
✓ .claude/settings.local.json (gitignored)
Next steps:
- Run /memory to verify CLAUDE.md loaded correctly
- Add `.claude/settings.local.json` to .gitignore if not already present
- Run bridge installer if deploying to other agent environments
CLAUDE.md (>200 lines), enter optimization mode: analyze existing content, propose what to split into rules files, and confirm before modifying.claude/ already exists with committed files: show a diff of what would change and require explicit confirmation per filesettings.json.env, .env.*, and secrets/tools
Ingests repository files into the ChromaDB vector store. Builds or updates the vector index from a manifest or directory scan using ingest.py. Use when new files need to be indexed or the vector store is out of date. <example> user: "Index these new plugin files into the vector database" assistant: "I'll use vector-db-ingest to add them to the vector store." </example> <example> user: "The vector store is missing recent files -- update it" assistant: "I'll use vector-db-ingest to re-index the changes." </example>
data-ai
Removes stale and orphaned chunks from the ChromaDB vector store for files that have been deleted or renamed. Use after files are removed or moved to keep the vector index in sync with the filesystem. <example> user: "Clean up the vector store after I deleted some files" assistant: "I'll use vector-db-cleanup to remove orphaned chunks." </example> <example> user: "The vector database has chunks for files that no longer exist" assistant: "I'll run vector-db-cleanup to prune them." </example>
testing
Audit Vector DB coverage -- compares the live filesystem manifest against the ChromaDB index to identify coverage gaps.
development
3-Phase Knowledge Search strategy for the RLM Factory ecosystem. Auto-invoked when tasks involve finding code, documentation, or architecture context in the repository. Enforces the optimal search order: RLM Summary Scan (O(1)) -> Vector DB Semantic Search -> Grep/Exact Match. Never skip phases.