بنقرة واحدة
init
Bootstrap a clean .claude/ folder structure for any existing repo following official Claude Code best practices
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Bootstrap a clean .claude/ folder structure for any existing repo following official Claude Code best practices
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | init |
| description | Bootstrap a clean .claude/ folder structure for any existing repo following official Claude Code best practices |
| disable-model-invocation | true |
| allowed-tools | Read Glob Bash Write Edit |
Bootstrap a well-structured .claude/ folder for this repo. Never write any file until the user confirms the plan.
Collect context in parallel:
find . -maxdepth 3 -not -path './.git/*' -not -path './node_modules/*' -not -path './vendor/*' -not -path './.claude-plugin/*' | sortpackage.json, composer.json, pyproject.toml, Cargo.toml, go.mod, Gemfilefind . -name "*.md" -not -path './.git/*' -not -path './node_modules/*' -not -path './vendor/*' | sort — then read every one. This includes root-level READMEs, any existing .claude/ files, scattered docs, CONTRIBUTING.md, ARCHITECTURE.md, etc.src/index.ts, src/main.ts, main.py, app.py, main.go, index.php, app.rb, lib/index.js, or equivalentFrom what you read, determine:
openai, anthropic, langchain, llama, ollama, transformers, langfuse, llamaindex, vector store clients (pinecone, weaviate, chroma). Set has_ai = true if found..md file found, classify it:
keep-as-is — already in the right place and well-structured, no changes neededrewrite — right location but content is bloated, outdated, or poorly structured (e.g. a 400-line CLAUDE.md)move — useful content but in the wrong location (e.g. ARCHITECTURE.md at root → .claude/docs/architecture.md)merge — content should be folded into a .claude/ file, original deletedredundant — generic, empty, or fully duplicated content that adds no valuenew — a .claude/ file that needs to be created from scratchPresent a clear, numbered action plan. Do not write any files yet.
Format it exactly like this:
## claudify plan
### Detected
- Stack: [language + framework]
- Commands: build `x`, test `x`, lint `x`, dev `x` (omit any that don't exist)
- AI features: yes / no
### Actions
1. CREATE .claude/CLAUDE.md — entry point with commands and rules
2. CREATE .claude/docs/architecture.md — stack, structure, data flow
3. CREATE .claude/docs/agents.md — AI layer (only if has_ai = true)
4. REWRITE .claude/CLAUDE.md — currently 400 lines; will be reduced to ≤80 with @imports
5. MOVE ARCHITECTURE.md → .claude/docs/architecture.md, original deleted
6. MERGE docs/dev-notes.md → relevant facts folded into .claude/docs/architecture.md, original deleted
7. DELETE .claude/random-notes.md — redundant, no actionable content
### No changes needed
- README.md — not a Claude config file, left untouched
For every REWRITE action, immediately follow it with a fenced before/after diff so the user can see exactly what changes:
#### REWRITE .claude/CLAUDE.md
**Before** (summarised — 400 lines):
> Copy-pasted README, generic advice, outdated npm commands, no structure
**After** (proposed — ~35 lines):
[Show the full proposed file content here, verbatim]
After all actions and diffs, always end with:
Proceed? (yes / no — or tell me what to adjust)
Rules for the action list:
.claude/ that are not markdown config (source code, assets, etc.) are never touchedDo not proceed until the user explicitly says yes (or equivalent). If they say no or ask to adjust, revise the plan and re-present it before doing anything.
Execute exactly the approved plan, in this order: CREATE → REWRITE → MOVE/MERGE → DELETE.
Content rules for generated and rewritten files:
.claude/CLAUDE.md — entry point only, uses @ imports:
# [Project name]
## Commands
- Build: `[exact command]`
- Dev: `[exact command]`
- Test: `[exact command]`
- Lint: `[exact command]`
## Rules
- [Codebase-specific rule]
- [Codebase-specific rule]
...
@.claude/docs/architecture.md
[@.claude/docs/agents.md — only if has_ai = true]
.claude/docs/architecture.md — tech stack, directory structure, data flow, key files, architectural decisions that affect how code is written.
.claude/docs/agents.md (only if has_ai = true) — AI/agent layer structure, prompt locations, models used, tool-calling or retrieval patterns, guardrails.
After writing all .claude/ files, create or update .claude/settings.json with a PostToolUse hook that reminds the user to run /claudify:update whenever a .md file is modified.
If .claude/settings.json does not exist, create it:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "file=$(cat | jq -r '.tool_input.file_path // empty'); [[ \"$file\" == *.md ]] && echo \"Reminder: MD file changed — run /claudify:update to keep CLAUDE.md in sync\""
}
]
}
]
}
}
If .claude/settings.json already exists, read it first, then merge the hooks.PostToolUse entry in — do not overwrite existing keys (e.g. permissions).
After all writes are done, print:
.claude/settings.json to remind you to run /claudify:update on MD changesRun
/claudify:updateany time you want to refresh CLAUDE.md to match the current codebase. (Requiresclaude-md-management@claude-plugins-official— install once with/plugin install claude-md-management@claude-plugins-official)