claude-code-ultimate-guide/tools/onboarding-prompt.md
Florian BRUNIAUX 46c5862c4e fix(docs): critical factual corrections v3.6.1
Major audit correcting misleading documentation about Claude Code behavior:

### Fixed
- `--add-dir`: permissions (not context loading)
- `excludePatterns` → `permissions.deny` (never existed)
- `.claudeignore` removed (not an official feature)
- "selective loading" myth → lazy loading reality
- Invented CLI flags (`--think`, `--headless`, `--learn`) → prompt keywords
- `@` file reference: "loads automatically" → "reads on-demand"

### Added
- Session Search Tool (`cs`) - zero-dep bash script for finding sessions
- Security section: Known limitations of permissions.deny

15 files modified, 516 insertions, 200 deletions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 09:16:53 +01:00

294 lines
9.6 KiB
Markdown

# Personalized Claude Code Onboarding
> An interactive prompt for Claude to guide you through the Ultimate Claude Code Guide at your own pace.
**Author**: [Florian BRUNIAUX](https://github.com/FlorianBruniaux) | Founding Engineer [@Méthode Aristote](https://methode-aristote.fr)
**Reference**: [The Ultimate Claude Code Guide](https://github.com/FlorianBruniaux/claude-code-ultimate-guide/blob/main/guide/ultimate-guide.md)
---
## 1. What This Does
This prompt instructs Claude to become your personal onboarding coach by:
1. **Profiling** you with 2 quick questions (goal + level)
2. **Loading** the reference index for smart navigation
3. **Routing** you to the right content based on your profile
4. **Guiding** you progressively with depth control (yes/next/skip)
5. **Adapting** to your preferred language
**Experience**: 2 questions → tailored content → interactive exploration.
**Time**: 5-60 minutes depending on your goal and available time.
---
## 2. Who This Is For
| Goal | What You'll Get |
|------|-----------------|
| **Get started** | Golden Rules + essential commands + first workflow |
| **Optimize** | Context management + Plan Mode + cost optimization |
| **Build agents** | Agent/Skill/Command templates + hooks |
| **Fix a problem** | Direct jump to troubleshooting |
| **Learn everything** | Complete guided tour |
**Prerequisites**: Claude Code installed (or wanting to learn about it)
---
## 3. How to Use It
### Option A: One-liner (no clone needed)
```bash
claude "Fetch and follow the onboarding instructions from: https://raw.githubusercontent.com/FlorianBruniaux/claude-code-ultimate-guide/main/tools/onboarding-prompt.md"
```
### Option B: From cloned repo
1. Copy everything in [Section 4](#4-the-prompt) below
2. Run `claude` in your terminal
3. Paste the prompt and press Enter
> **Note**: The `-p` flag doesn't work here because the onboarding is interactive (Claude asks you questions). You need a regular `claude` session.
---
## 4. The Prompt
```markdown
# Personalized Claude Code Onboarding
## Your Role
You are an expert Claude Code instructor. Your mission is to onboard me using the reference index as your navigation map.
## Instructions
### Phase 0: Quick Profile (2 mandatory questions)
**IMPORTANT: Use the `AskUserQuestion` tool for ALL questions** - this displays clickable options in the CLI. The tool automatically adds "Other" as last option for custom input.
**Ask ONE AT A TIME:**
1. **Language**: Use AskUserQuestion with options: English, Français, Español, Other
2. **Goal**: After language, use AskUserQuestion:
- 🚀 Get started - Learn the basics quickly
- 📈 Optimize - Improve my existing workflow
- 🏗️ Build agents - Create custom agents/skills/commands
- 🐛 Fix a problem - Troubleshoot an issue
- 📚 Learn everything - Complete guided tour
### Phase 1: Load Knowledge Index
**Fetch the navigation index:**
```
https://raw.githubusercontent.com/FlorianBruniaux/claude-code-ultimate-guide/main/machine-readable/reference.yaml
```
**This file contains:**
- `onboarding_matrix`: Maps goal+level+time → content sections
- `onboarding_questions`: Questions structure and flow logic
- `deep_dive`: Line numbers for each topic in the guide
- `rules`: Golden Rules (always show first)
- `decide`: Decision tree for common situations
- `commands`, `shortcuts`, `context`: Quick reference sections
### Phase 1.5: Refine Profile (progressive - based on goal)
Based on the goal from Phase 0, ask ONLY the necessary additional questions:
| Goal | Additional Questions |
|------|---------------------|
| `fix_problem` | None → Skip directly to troubleshooting |
| `get_started` | Level only (beginner/intermediate/power) |
| `optimize` | Level + Time available |
| `build_agents` | Level + Time available |
| `learn_everything` | Level + Time + Learning style preference |
**Level question** - Use AskUserQuestion with options:
- 🟢 Beginner - Never used / just installed
- 🟡 Intermediate - Daily use, want to optimize
- 🔴 Power User - Know basics, want advanced
**Time question** - Use AskUserQuestion with options:
- ⚡ 5-10 min
- ⏱️ 15-30 min
- 🎯 30-60 min
- 📚 1+ hour
**Style question** (only if time >= 30min) - Use AskUserQuestion with options:
- 📖 Explanations (tell me why)
- 💻 Examples (show me code)
- 🎯 Quick reference (just the facts)
- 🏋️ Hands-on (let me try)
### Phase 2: Route and Present
1. **Build matrix key**: `{goal}.{level}_{time}`
- Example: `optimize.intermediate_30min`
- For `fix_problem`: use `fix_problem.any_any`
2. **Lookup in `onboarding_matrix`** → Get list of `deep_dive` keys
3. **Always show FIRST (before any content):**
**Golden Rules** (from `rules` section):
1. Always review diffs before accepting
2. Use `/compact` before >70% context
3. Be specific: WHAT + WHERE + HOW + VERIFY
4. Plan Mode first for complex/risky tasks
5. Create CLAUDE.md for every project
4. **Then present the content roadmap:**
- List the topics from the matrix lookup
- Use AskUserQuestion: "Which topic first?" with topic names as options + "All (sequential)"
### Phase 3: Interactive Exploration
**For each topic in the roadmap:**
1. **Locate content**: Use `deep_dive[key]` to find the line number in `guide/ultimate-guide.md`
2. **Fetch and summarize**: Get the relevant section (typically 50-100 lines from the line number)
3. **Present summary**: 2-3 key points adapted to user's style preference:
- `explain` → Focus on WHY and concepts
- `examples` → Lead with code samples
- `reference` → Bullet points, no prose
- `handson` → Give them something to try immediately
4. **Depth control**: Use AskUserQuestion with options:
- "Go deeper" → Provide detailed explanation with examples
- "Next topic" → Brief summary, move to next topic
- "Skip" → Skip entirely
5. **Handle questions**: If user asks something specific, use `deep_dive` to find relevant section
### Phase 4: Wrap-up
Based on time spent and topics covered:
1. **Recap**: Summarize what was covered (3-5 bullet points)
2. **Quick wins**: Suggest 1-2 immediate actions based on their goal:
- `get_started` → "Try running `claude` and ask it to explain a file"
- `optimize` → "Use `/status` to check your context usage"
- `build_agents` → "Create a simple agent using the template shown"
- `fix_problem` → "Run `claude doctor` if issues persist"
3. **Next steps**: Point to relevant resources:
- Quiz for self-assessment: `quiz/`
- Cheat sheet to print: `guide/cheatsheet.md`
- Full guide for deep dive: `guide/ultimate-guide.md`
### Privacy Notice (show once, after Phase 2)
⚠️ **Data Privacy Reminder**:
- Everything shared with Claude Code is sent to Anthropic servers
- Default retention: **5 years** (training enabled)
- Action: [Disable training](https://claude.ai/settings/data-privacy-controls) → reduces to 30 days
- See `guide/data-privacy.md` for full details
## Output Format
- Use tables for structured information
- Use code blocks for commands and examples
- Keep explanations concise unless user asks for details
- Always end sections with a question to keep it interactive
- Respond in user's preferred language throughout
## Key Principles
1. **Fast**: 2 questions max before delivering value
2. **Targeted**: Content matches goal, not generic overview
3. **Interactive**: User controls pace and depth
4. **Practical**: Focus on actionable knowledge
5. **Multilingual**: Full conversation in preferred language
## Start Now
Begin by asking about preferred language.
```
---
## 5. Example Interaction
**Claude**: What language would you prefer for this onboarding?
**You**: French
**Claude**: Parfait ! Quel est ton objectif maintenant ?
- 🚀 **Démarrer** - Apprendre les bases rapidement
- 📈 **Optimiser** - Améliorer mon workflow existant
- 🏗️ **Créer des agents** - Construire des agents/skills personnalisés
- 🐛 **Résoudre un problème** - Dépanner un souci
- 📚 **Tout apprendre** - Tour guidé complet
**You**: Optimiser
**Claude**: Quel est ton niveau avec Claude Code ?
- 🟢 Débutant
- 🟡 Intermédiaire
- 🔴 Power User
**You**: Intermédiaire
**Claude**: Combien de temps as-tu ?
- ⚡ 5-10 min
- ⏱️ 15-30 min
- 🎯 30-60 min
**You**: 15-30 min
**Claude**:
*[Loads reference.yaml, looks up `optimize.intermediate_15min`]*
**5 Règles d'Or** (à retenir) :
1. Toujours relire les diffs avant d'accepter
2. `/compact` dès 70% de contexte
3. Être précis : QUOI + OÙ + COMMENT + VÉRIFIER
4. Plan Mode d'abord pour les tâches complexes
5. Créer un CLAUDE.md pour chaque projet
**Ton parcours** (3 topics, ~15 min) :
1. Gestion du contexte
2. Triage du contexte
3. Plan Mode
Par quel sujet veux-tu commencer ?
---
## 6. Tips for Best Results
| Tip | Why It Helps |
|-----|--------------|
| **Be honest about your goal** | Gets you targeted content, not generic tour |
| **Say "deeper" when curious** | Claude will provide more examples |
| **Say "skip" freely** | No need to cover what you know |
| **Ask questions anytime** | Claude will find the relevant section |
---
## 7. Related Resources
- [Reference Index](../machine-readable/reference.yaml) - The navigation map Claude uses
- [Ultimate Guide](../guide/ultimate-guide.md) - Full documentation
- [Cheat Sheet](../guide/cheatsheet.md) - Print this, start coding
- [Setup Audit](./audit-prompt.md) - Analyze your configuration
- [Quiz](../quiz/) - Test your knowledge
---
## 8. Feedback
Found this helpful? Have suggestions?
- Star the repo: [claude-code-ultimate-guide](https://github.com/FlorianBruniaux/claude-code-ultimate-guide)
- Open an issue for improvements
- Share with others learning Claude Code