From a5f441bceaeb455bcc81b53542a6eab514914fb6 Mon Sep 17 00:00:00 2001 From: Florian BRUNIAUX Date: Mon, 19 Jan 2026 08:42:33 +0100 Subject: [PATCH] feat: add ecosystem positioning, install script & new commands Ecosystem & Positioning: - Add README section with competitive positioning (davila7, awesome-claude-code, wesammustafa) - Add comparison table highlighting unique features (architecture, TDD/SDD, quiz, YAML index) - Add ecosystem section to reference.yaml Template Installation: - Add scripts/install-templates.sh for one-liner template installation - Support for agents, hooks, commands, skills, memory templates New Commands: - catchup, explain, optimize, refactor, security, ship New Content: - Semantic anchors catalog and documentation - Extended guide content (+470 lines) Co-Authored-By: Claude Opus 4.5 --- CHANGELOG.md | 102 ++++- README.md | 77 +++- VERSION | 2 +- examples/README.md | 14 + examples/commands/catchup.md | 122 +++++ examples/commands/explain.md | 166 +++++++ examples/commands/optimize.md | 217 +++++++++ examples/commands/refactor.md | 209 +++++++++ examples/commands/security.md | 160 +++++++ examples/commands/ship.md | 232 ++++++++++ examples/semantic-anchors/anchor-catalog.md | 310 +++++++++++++ guide/ultimate-guide.md | 470 +++++++++++++++++++- machine-readable/llms.txt | 4 +- machine-readable/reference.yaml | 88 ++-- scripts/install-templates.sh | 220 +++++++++ tools/audit-prompt.md | 2 +- 16 files changed, 2333 insertions(+), 62 deletions(-) create mode 100644 examples/commands/catchup.md create mode 100644 examples/commands/explain.md create mode 100644 examples/commands/optimize.md create mode 100644 examples/commands/refactor.md create mode 100644 examples/commands/security.md create mode 100644 examples/commands/ship.md create mode 100644 examples/semantic-anchors/anchor-catalog.md create mode 100755 scripts/install-templates.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 844af70..e2cb0b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,43 +6,111 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +## [3.9.0] - 2026-01-19 + ### Added +- **6 new slash commands** (Sprint 1 + Sprint 2 implementation) + - `examples/commands/catchup.md` - Restore context after `/clear` (137 lines) + - Git history analysis (last 10 commits, recent diffs) + - TODO/FIXME scanning across codebase + - Project state summary with actionable next steps + - `examples/commands/security.md` - Quick OWASP security audit (149 lines) + - Secrets detection (API keys, tokens, passwords) + - Injection vulnerability scanning (SQL, XSS, command) + - Dependency audit integration + - Severity-based output (Critical/High/Medium/Low) + - `examples/commands/refactor.md` - SOLID-based code improvements (195 lines) + - SOLID violation detection with examples + - Risk level assessment for each suggestion + - Atomic commit recommendations + - `examples/commands/explain.md` - Code explanations with 3 depth levels (174 lines) + - Simple (TL;DR), Standard, Deep modes + - Supports files, functions, concepts, flows + - Example outputs at each level + - `examples/commands/optimize.md` - Performance analysis and roadmap (195 lines) + - Runtime, memory, database, bundle analysis + - Profiling commands per language + - Prioritized optimization roadmap + - `examples/commands/ship.md` - Pre-deploy checklist (189 lines) + - Blocker/High/Recommended categorization + - Tests, lint, build, secrets, security audit + - Migration and rollback verification + +- **Named Prompting Patterns** section in `guide/ultimate-guide.md` (Section 9.15, ~155 lines) + - **"As If" Pattern**: Set quality expectations ("Implement as if senior engineer at Google") + - **Constraint Pattern**: Force creative solutions ("Solve without new dependencies") + - **"Explain First" Pattern**: Force planning before implementation + - **"Rubber Duck" Pattern**: Collaborative debugging through questions + - **Incremental Pattern**: Gradual complexity building + - **Boundary Pattern**: Define scope and constraints explicitly + - Combination examples and anti-patterns + +- **Mermaid Diagram Generation** section in `guide/ultimate-guide.md` (Section 9.7, ~90 lines) + - 6 diagram types: Flowchart, Sequence, Class, ER, State, Gantt + - Prompt templates for each type + - Visualization tools reference (GitHub, mermaid.live, VS Code) + +- **Eight Beginner Mistakes** checklist in `guide/ultimate-guide.md` (Section 1.7, ~70 lines) + - Based on competitive analysis vs Jo Vinkenroye's Mastery series + - 8 common mistakes with symptoms and solutions + - Prevention patterns for each mistake + +- **Commands vs Skills vs Agents** enhanced comparison table (Section 5.1, ~50 lines) + - Detailed comparison across 8 aspects + - When to use each type with decision criteria + - Combination patterns for complex workflows + - **Learning with AI guide** for junior developers (`guide/learning-with-ai.md`, ~900 lines) - **Quick Self-Check** (L31-81): 5 diagnostic questions to assess AI dependency - **Three Developer Patterns** (L82-126): Dependent, Avoidant, Augmented profiles with action paths - - **UVAL Protocol** (L127-352): Understand → Verify → Apply → Learn framework with Claude Code implementations - - **Claude Code for Learning** (L353-469): CLAUDE.md configuration, slash commands, hooks for learning mode + - **UVAL Protocol** (L127-352): Understand → Verify → Apply → Learn framework + - **Claude Code for Learning** (L353-469): CLAUDE.md configuration, slash commands, hooks - **Breaking Dependency** (L470-517): Recovery plan for over-reliant developers - **Embracing AI** (L518-709): Onboarding for AI-skeptical developers - **30-Day Progression Plan** (L710-769): Week-by-week AI ratio progression - **Red Flags Checklist** (L770-850): Warning signs and corrective actions - - Case study: Méthode Aristote principles (human supervision + AI assistance) - **Learning mode templates** (3 new files) - `examples/claude-md/learning-mode.md`: CLAUDE.md template for learning-focused development - - `examples/commands/quiz.md`: /quiz slash command for self-testing (5 difficulty levels) + - `examples/commands/quiz.md`: /quiz slash command for self-testing - `examples/hooks/bash/learning-capture.sh`: Stop event hook for daily learning capture - **Wireframing & Figma MCP documentation** in `guide/ultimate-guide.md` (+143 lines) - - **Wireframing Tools for AI Development** (L483-518): Comparison table for Excalidraw, tldraw, Frame0, Paper+Photo with MCP support indicators - - **Figma MCP Integration** (L520-583): Official Anthropic MCP server setup, available tools (`get_design_context`, `get_variable_defs`, `get_code_connect_map`), workflow examples - - **Image Optimization for Claude Vision** (L585-624): Resolution guidelines, token calculation formula, format recommendations - - New config template: `examples/mcp-configs/figma.json` - - Updated `machine-readable/reference.yaml` with new entries and shifted line numbers + - Wireframing tools comparison (Excalidraw, tldraw, Frame0, Paper+Photo) + - Figma MCP Integration with official Anthropic server + - Image Optimization for Claude Vision with resolution guidelines ### Changed -- **README.md**: Added prominent "Visit Website" badge linking to landing page -- **Templates count**: 52 → 55 in README.md badges (3 new learning templates) -- **Navigation updated**: `guide/README.md`, `examples/hooks/README.md` with new learning resources -- **Reference index expanded**: `machine-readable/reference.yaml` with 10 new deep_dive entries for learning topics +- **README.md** updates: + - Lines badge: 9,800+ → 10,200+ + - Templates badge: 56 → 62 (55 → 60+ in text) + - Commands table: Added 6 new commands + - Version: 3.8.2 → 3.9.0 + - Added prominent "Visit Website" badge linking to landing page + +- **examples/README.md**: Added 6 new commands to Commands table + +- **scripts/install-templates.sh**: Updated commands list with new templates + +- **guide/ultimate-guide.md**: + - Table of Contents updated with sections 1.6, 1.7 + - Section 9 Recap enhanced with Communication Patterns checklist + - Guide expanded by ~385 lines (9,881 → 10,266) - **Semantic search tools priority**: grepai now recommended over mgrep - - `guide/ultimate-guide.md`: Sections reordered (grepai first as "Recommended", mgrep as "Alternative") - - `guide/cheatsheet.md`: MCP Servers table updated (mgrep → grepai) - - `quiz/questions/08-mcp-servers.yaml`: Question 08-013 updated to reference grepai - - Rationale: grepai is fully open-source, runs locally (privacy), and offers call graph analysis + - Sections reordered (grepai first as "Recommended", mgrep as "Alternative") + - `guide/cheatsheet.md`: MCP Servers table updated + - Rationale: grepai is fully open-source, runs locally (privacy) + +### Stats + +- 6 new command files created (~1,039 lines total) +- ~385 lines added to ultimate-guide.md +- Templates count: 56 → 62 +- Focus on competitive analysis gaps vs community resources +- Named patterns and beginner-friendly content added --- diff --git a/README.md b/README.md index c312f57..024fb88 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@

Stars - Lines - Templates + Lines + Templates Quiz

@@ -133,7 +133,7 @@ Claude asks 2-4 questions then guides you through personalized content based on - You read official docs → dense, no progression - You search tutorials → scattered, outdated in weeks -**This guide:** Structured learning path with 55 copy-paste templates. Your mileage may vary—but this saves you the exploration time. +**This guide:** Structured learning path with 60+ copy-paste templates. Your mileage may vary—but this saves you the exploration time. | Traditional Docs | This Guide | |------------------|------------| @@ -432,7 +432,7 @@ Weak Areas (< 75%): ``` claude-code-ultimate-guide/ ├── guide/ # 📖 Core documentation -│ ├── ultimate-guide.md # Complete reference (~9800 lines) +│ ├── ultimate-guide.md # Complete reference (~10200 lines) │ ├── cheatsheet.md # 1-page printable reference │ ├── architecture.md # How Claude Code works internally │ ├── adoption-approaches.md # Team implementation strategies @@ -499,6 +499,12 @@ Copy-paste templates from [`examples/`](./examples/) for immediate use: | [/review-pr](./examples/commands/review-pr.md) | Review pull requests | Code quality analysis | | [/git-worktree](./examples/commands/git-worktree.md) | Manage git worktrees | Parallel development | | [/validate-changes](./examples/commands/validate-changes.md) | Validate code changes | Pre-commit checks | +| [/catchup](./examples/commands/catchup.md) | Restore context after /clear | Git history, TODOs, project state | +| [/security](./examples/commands/security.md) | Quick OWASP security audit | Secrets, injection, dependencies | +| [/refactor](./examples/commands/refactor.md) | SOLID-based improvements | Violation detection, risk levels | +| [/explain](./examples/commands/explain.md) | Code explanations (3 depths) | Files, functions, concepts | +| [/optimize](./examples/commands/optimize.md) | Performance analysis | Runtime, memory, bundle | +| [/ship](./examples/commands/ship.md) | Pre-deploy checklist | Tests, security, migrations | ### Utility Scripts @@ -649,6 +655,67 @@ Found an error? Have a suggestion? See [CONTRIBUTING.md](./CONTRIBUTING.md) for --- +## 🌐 Ecosystem & Positioning + +### Quick Start vs Deep Understanding + +| I need... | Best Resource | +|-----------|---------------| +| Install templates NOW | → [claude-code-templates](https://github.com/davila7/claude-code-templates) (CLI, 17k⭐) | +| Discover community tools | → [awesome-claude-code](https://github.com/hesreallyhim/awesome-claude-code) | +| Visual walkthrough | → [Claude-Code-Everything](https://github.com/wesammustafa/Claude-Code-Everything) (screenshots, BMAD) | +| Understand & master | → **This guide** | +| Debug issues | → **This guide** → [Troubleshooting](./guide/ultimate-guide.md#troubleshooting) | + +### What Makes This Guide Different + +| Feature | claude-code-templates | awesome-claude-code | This Guide | +|---------|----------------------|---------------------|------------| +| **Focus** | Distribution | Curation | Education | +| **Approach** | Install & use | Discover & link | Learn & master | +| **Content** | Aggregated | Aggregated | Original | +| **Architecture docs** | ❌ | ❌ | ✅ Unique | +| **Methodologies (TDD/SDD)** | ❌ | ❌ | ✅ Unique | +| **Interactive quiz** | ❌ | ❌ | ✅ 217 questions | +| **Machine-readable index** | ❌ | ❌ | ✅ YAML with line numbers | + +**Recommended path**: +1. Read this guide (2-3h) → Understand the concepts +2. Use CLI tools for installation → Faster setup +3. Return here for debugging/advanced patterns + +### Quick Template Install + +Install templates from this guide directly into your project: + +```bash +# Base URL for convenience +URL="https://raw.githubusercontent.com/FlorianBruniaux/claude-code-ultimate-guide/main/scripts/install-templates.sh" + +# List all available templates +curl -fsSL "$URL" | bash -s -- list + +# Install specific templates +curl -fsSL "$URL" | bash -s -- command pr +curl -fsSL "$URL" | bash -s -- hook dangerous-actions-blocker +curl -fsSL "$URL" | bash -s -- agent security-reviewer +``` + +
+All template types + +| Type | Install | Examples | +|------|---------|----------| +| **agent** | `bash -s -- agent ` | security-reviewer, code-reviewer | +| **hook** | `bash -s -- hook ` | dangerous-actions-blocker, auto-format | +| **command** | `bash -s -- command ` | pr, release-notes, commit | +| **skill** | `bash -s -- skill ` | TDD, pdf-generator | +| **memory** | `bash -s -- memory ` | minimal, comprehensive, nextjs | + +
+ +--- + ## 📄 License Licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). Free to share and adapt with attribution and same-license distribution. @@ -674,7 +741,7 @@ Get notified about major updates, new templates, and Claude Code best practices: --- -*Version 3.8.2 | January 2026 | Crafted with Claude* +*Version 3.9.0 | January 2026 | Crafted with Claude* B{Authenticated?} + B -->|Yes| C[Process Request] + B -->|No| D[Return 401] + C --> E[Return Response] +``` + +**Sequence:** +```mermaid +sequenceDiagram + Client->>+API: POST /checkout + API->>+Payment: charge() + Payment-->>-API: success + API->>+Inventory: reserve() + Inventory-->>-API: confirmed + API-->>-Client: order_id +``` + +**Class:** +```mermaid +classDiagram + class User { + +String email + +String passwordHash + +login() + +logout() + } + class Role { + +String name + +Permission[] permissions + } + User "1" --> "*" Role +``` + +#### Where to Visualize + +| Platform | Support | +|----------|---------| +| **GitHub** | Native rendering in README, issues, PRs | +| **VS Code** | Mermaid Preview extension | +| **GitLab** | Native rendering | +| **Notion** | Code block with mermaid language | +| **mermaid.live** | Online editor with export | + +#### Integration Tips + +1. **In CLAUDE.md**: Ask Claude to document architecture decisions with diagrams +2. **In PRs**: Include sequence diagrams for complex flows +3. **In docs/**: Generate architecture.md with embedded diagrams +4. **Export**: Use mermaid.live to export as PNG/SVG for presentations + ## 9.8 Vibe Coding & Skeleton Projects **Reading time**: 5 minutes @@ -8548,6 +8847,165 @@ Time savings from effective Claude Code usage typically far outweigh API costs f --- +## 9.15 Named Prompting Patterns + +**Reading time**: 5 minutes +**Skill level**: Week 2+ + +Memorable named patterns for effective Claude Code interaction. These patterns have emerged from community best practices and help you communicate more effectively. + +### The "As If" Pattern + +Set quality expectations by establishing context and standards. + +**Pattern**: "Implement as if you were a [role] at [high-standard company/context]" + +**Examples:** +```markdown +# High quality code +Implement this authentication system as if you were a senior security engineer at a major bank. + +# Production readiness +Review this code as if preparing for a SOC2 audit. + +# Performance focus +Optimize this function as if it will handle 10,000 requests per second. +``` + +**Why it works**: Activates relevant knowledge patterns and raises output quality to match the stated context. + +### The Constraint Pattern + +Force creative solutions by adding explicit limitations. + +**Pattern**: "Solve this [with constraint X] [without using Y]" + +**Examples:** +```markdown +# Dependency constraint +Implement this feature without adding any new dependencies. + +# Size constraint +Solve this in under 50 lines of code. + +# Time constraint (execution) +This must complete in under 100ms. + +# Simplicity constraint +Use only standard library functions. +``` + +**Why it works**: Constraints prevent over-engineering and force focus on the essential solution. + +### The "Explain First" Pattern + +Force planning before implementation. + +**Pattern**: "Before implementing, explain your approach in [N] sentences" + +**Examples:** +```markdown +# Simple planning +Before writing code, explain in 2-3 sentences how you'll approach this. + +# Detailed planning +Before implementing, outline: +1. What components you'll modify +2. What edge cases you've considered +3. What could go wrong + +# Trade-off analysis +Before choosing an approach, explain 2-3 alternatives and why you'd pick one. +``` + +**Why it works**: Prevents premature coding and catches misunderstandings early. Especially useful for complex tasks. + +### The "Rubber Duck" Pattern + +Debug collaboratively by having Claude ask questions. + +**Pattern**: "I'm stuck on [X]. Ask me questions to help me figure it out." + +**Examples:** +```markdown +# Debugging +I'm stuck on why this test is failing. Ask me questions to help diagnose the issue. + +# Design +I can't decide on the right architecture. Ask me questions about my requirements. + +# Problem understanding +I don't fully understand what I need to build. Ask clarifying questions. +``` + +**Why it works**: Often the problem is unclear requirements or assumptions. Questions surface hidden constraints. + +### The "Incremental" Pattern + +Build complex features step by step with validation. + +**Pattern**: "Let's build this incrementally. Start with [minimal version], then we'll add [features]." + +**Examples:** +```markdown +# Feature development +Build the user registration incrementally: +1. First: Basic form that saves to database +2. Then: Email validation +3. Then: Password strength requirements +4. Finally: Email verification flow + +Show me step 1 first. + +# Refactoring +Refactor this incrementally. First extract the validation logic, +run tests, then we'll continue. +``` + +**Why it works**: Reduces risk, enables validation at each step, maintains working code throughout. + +### The "Boundary" Pattern + +Define explicit scope to prevent over-engineering. + +**Pattern**: "Only modify [X]. Don't touch [Y]." + +**Examples:** +```markdown +# File scope +Only modify auth.ts. Don't change any other files. + +# Function scope +Fix just the calculateTotal function. Don't refactor surrounding code. + +# Feature scope +Add the logout button only. Don't add session management or remember-me features. +``` + +**Why it works**: Prevents scope creep and keeps changes focused and reviewable. + +### Pattern Combinations + +| Situation | Pattern Combination | +|-----------|---------------------| +| Critical feature | As If + Explain First + Incremental | +| Quick fix | Constraint + Boundary | +| Debugging session | Rubber Duck + Incremental | +| Architecture decision | Explain First + As If | +| Refactoring | Boundary + Incremental + Constraint | + +### Anti-Patterns to Avoid + +| Anti-Pattern | Problem | Better Approach | +|--------------|---------|-----------------| +| "Make it perfect" | Undefined standard | Use "As If" with specific context | +| "Fix everything" | Scope explosion | Use "Boundary" pattern | +| "Just do it" | No validation | Use "Explain First" | +| "Make it fast" | Vague constraint | Specify: "under 100ms" | +| Overwhelming detail | Context pollution | Focus on relevant constraints only | + +--- + ## 🎯 Section 9 Recap: Pattern Mastery Checklist Before moving to Section 10 (Reference), verify you understand: @@ -8570,6 +9028,10 @@ Before moving to Section 10 (Reference), verify you understand: - [ ] **Best Practices**: Do/Don't patterns for professional work - [ ] **Development Methodologies**: TDD, SDD, BDD, and other structured approaches +**Communication Patterns**: +- [ ] **Named Prompting Patterns**: As If, Constraint, Explain First, Rubber Duck, Incremental, Boundary +- [ ] **Mermaid Diagrams**: Generate visual documentation for architecture and flows + ### What's Next? **Section 10 is your command reference** — bookmark it for quick lookups during daily work. diff --git a/machine-readable/llms.txt b/machine-readable/llms.txt index 27fdb78..546424d 100644 --- a/machine-readable/llms.txt +++ b/machine-readable/llms.txt @@ -37,7 +37,7 @@ This repository provides everything needed to go from Claude Code beginner to po - Context7 (library documentation lookup) - Sequential (structured multi-step reasoning) - Playwright (browser automation) -- **Trinity Pattern**: Combining Plan Mode + Think Levels + MCP for complex tasks +- **Trinity Pattern**: Combining Plan Mode + Extended Thinking + MCP for complex tasks - **CI/CD Integration**: Headless mode, GitHub Actions, Verify Gate pattern ### Best Practices @@ -155,7 +155,7 @@ For fast LLM parsing, see `machine-readable/reference.yaml` (~2K tokens) - struc - Prompting formula (WHAT/WHERE/HOW/VERIFY) - Commands, shortcuts, CLI flags - Context management zones and symptoms -- MCP servers, think levels, cost optimization +- MCP servers, extended thinking, cost optimization - Anti-patterns and troubleshooting ## Keywords diff --git a/machine-readable/reference.yaml b/machine-readable/reference.yaml index d48dc8e..cef243a 100644 --- a/machine-readable/reference.yaml +++ b/machine-readable/reference.yaml @@ -15,6 +15,8 @@ deep_dive: # Claude Code Releases claude_code_releases: "guide/claude-code-releases.md" claude_code_releases_yaml: "machine-readable/claude-code-releases.yaml" + # Template Installation + install_templates_script: "scripts/install-templates.sh" # Session management session_search: "guide/observability.md:29" session_search_script: "examples/scripts/session-search.sh" @@ -57,38 +59,40 @@ deep_dive: fresh_context_pattern: 1289 plan_mode: 1822 rewind: 2000 - mental_model: 2082 - xml_prompting: 2139 - memory_files: 2787 - claude_folder: 2938 - settings: 2989 - precedence_rules: 3211 - agents: 3309 - agent_template: 3382 - agent_examples: 3520 - skills: 3898 - skill_template: 3976 - skill_examples: 4044 - commands: 4323 - command_template: 4393 - hooks: 4646 - hook_templates: 4791 - security_hooks: 5053 - mcp_servers: 5194 - mcp_config: 5488 - mcp_security: 5856 - cicd: 6157 - ide_integration: 6846 - feedback_loops: 6916 - batch_operations: 7254 - pitfalls: 7373 - git_best_practices: 7642 - cost_optimization: 8108 - commands_table: 8598 - shortcuts_table: 8631 - troubleshooting: 8757 - cheatsheet: 9132 - daily_workflow: 9208 + mental_model: 2154 + xml_prompting: 2211 + semantic_anchors: 2664 + semantic_anchors_catalog: "examples/semantic-anchors/anchor-catalog.md" + memory_files: 2952 + claude_folder: 3103 + settings: 3154 + precedence_rules: 3376 + agents: 3474 + agent_template: 3547 + agent_examples: 3685 + skills: 4063 + skill_template: 4183 + skill_examples: 4251 + commands: 4530 + command_template: 4600 + hooks: 4853 + hook_templates: 4998 + security_hooks: 5260 + mcp_servers: 5401 + mcp_config: 5695 + mcp_security: 6063 + cicd: 6381 + ide_integration: 7070 + feedback_loops: 7140 + batch_operations: 7570 + pitfalls: 7689 + git_best_practices: 7957 + cost_optimization: 8423 + commands_table: 9076 + shortcuts_table: 9109 + troubleshooting: 9235 + cheatsheet: 9610 + daily_workflow: 9686 # ════════════════════════════════════════════════════════════════ # DECISION TREE (most important - en premier) @@ -325,6 +329,26 @@ rules: 5: "Create CLAUDE.md for every project" 6: "Commit frequently after each task" +# ════════════════════════════════════════════════════════════════ +# ECOSYSTEM - Related resources & positioning +# ════════════════════════════════════════════════════════════════ +ecosystem: + this_guide: + focus: "Education - Learn & master" + unique: ["architecture docs", "TDD/SDD methodologies", "217-question quiz", "YAML index"] + complementary: + claude_code_templates: + url: "github.com/davila7/claude-code-templates" + focus: "Distribution - Install & use (CLI)" + stars: "17k+" + awesome_claude_code: + url: "github.com/hesreallyhim/awesome-claude-code" + focus: "Curation - Discover & link" + claude_code_everything: + url: "github.com/wesammustafa/Claude-Code-Everything" + focus: "Visual walkthrough - Screenshots, BMAD method" + install_templates: "scripts/install-templates.sh" + # ════════════════════════════════════════════════════════════════ # ONBOARDING MATRIX - Maps user profile → content sections # Used by tools/onboarding-prompt.md for personalized learning paths diff --git a/scripts/install-templates.sh b/scripts/install-templates.sh new file mode 100755 index 0000000..7efeb76 --- /dev/null +++ b/scripts/install-templates.sh @@ -0,0 +1,220 @@ +#!/bin/bash +# Claude Code Ultimate Guide - Template Installer +# Usage: curl -fsSL https://raw.githubusercontent.com/FlorianBruniaux/claude-code-ultimate-guide/main/scripts/install-templates.sh | bash -s -- [type] [name] +# +# Examples: +# ./install-templates.sh list # List all available templates +# ./install-templates.sh agent security-reviewer # Install a specific agent +# ./install-templates.sh hook dangerous-actions-blocker # Install a specific hook +# ./install-templates.sh command pr # Install a specific command + +set -e + +REPO_RAW="https://raw.githubusercontent.com/FlorianBruniaux/claude-code-ultimate-guide/main" +CLAUDE_DIR=".claude" + +# Colors +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +show_help() { + echo -e "${BLUE}Claude Code Ultimate Guide - Template Installer${NC}" + echo "" + echo "Usage:" + echo " $0 list List all available templates" + echo " $0 agent Install an agent template" + echo " $0 hook Install a hook (bash)" + echo " $0 command Install a slash command" + echo " $0 skill Install a skill" + echo " $0 memory Install a CLAUDE.md template" + echo "" + echo "Examples:" + echo " $0 list" + echo " $0 agent security-reviewer" + echo " $0 hook dangerous-actions-blocker" + echo " $0 command pr" + echo " $0 command release-notes" + echo "" + echo "Templates are installed to .claude/ directory" +} + +list_templates() { + echo -e "${BLUE}📦 Available Templates${NC}" + echo "" + + echo -e "${GREEN}Agents:${NC}" + echo " security-reviewer, performance-auditor, migration-assistant," + echo " accessibility-auditor, documentation-writer, refactoring-specialist," + echo " test-coverage-analyst, dependency-updater, code-reviewer" + echo "" + + echo -e "${GREEN}Hooks (bash):${NC}" + echo " dangerous-actions-blocker, prompt-injection-detector, unicode-injection-scanner," + echo " repo-integrity-scanner, mcp-config-integrity, output-secrets-scanner," + echo " notification, auto-format, security-check, session-logger, claudemd-scanner" + echo "" + + echo -e "${GREEN}Commands:${NC}" + echo " pr, release-notes, sonarqube, commit, diagnose, generate-tests," + echo " review-pr, git-worktree, validate-changes, quiz," + echo " catchup, security, refactor, explain, optimize, ship" + echo "" + + echo -e "${GREEN}Skills:${NC}" + echo " pdf-generator, TDD, backend-architect, security-guardian," + echo " bilan-hebdo-tech-product, skill-creator, using-git-worktree" + echo "" + + echo -e "${GREEN}Memory (CLAUDE.md templates):${NC}" + echo " minimal, comprehensive, nextjs, python, rust, security-focused" + echo "" + + echo -e "${YELLOW}Tip:${NC} Run '$0 ' to install" +} + +ensure_dir() { + local dir="$1" + if [ ! -d "$dir" ]; then + mkdir -p "$dir" + echo -e "${YELLOW}Created directory: $dir${NC}" + fi +} + +install_agent() { + local name="$1" + local dest_dir="${CLAUDE_DIR}/agents" + local dest_file="${dest_dir}/${name}.md" + local url="${REPO_RAW}/examples/agents/${name}.md" + + ensure_dir "$dest_dir" + + echo -e "${BLUE}Downloading agent: ${name}...${NC}" + if curl -fsSL "$url" -o "$dest_file" 2>/dev/null; then + echo -e "${GREEN}✓ Installed: ${dest_file}${NC}" + else + echo -e "${RED}✗ Failed to download agent: ${name}${NC}" + echo " Check available agents with: $0 list" + exit 1 + fi +} + +install_hook() { + local name="$1" + local dest_dir="${CLAUDE_DIR}/hooks" + local dest_file="${dest_dir}/${name}.sh" + local url="${REPO_RAW}/examples/hooks/bash/${name}.sh" + + ensure_dir "$dest_dir" + + echo -e "${BLUE}Downloading hook: ${name}...${NC}" + if curl -fsSL "$url" -o "$dest_file" 2>/dev/null; then + chmod +x "$dest_file" + echo -e "${GREEN}✓ Installed: ${dest_file}${NC}" + echo -e "${YELLOW}Note: Configure in settings.json to enable this hook${NC}" + else + echo -e "${RED}✗ Failed to download hook: ${name}${NC}" + echo " Check available hooks with: $0 list" + exit 1 + fi +} + +install_command() { + local name="$1" + local dest_dir="${CLAUDE_DIR}/commands" + local dest_file="${dest_dir}/${name}.md" + local url="${REPO_RAW}/examples/commands/${name}.md" + + ensure_dir "$dest_dir" + + echo -e "${BLUE}Downloading command: ${name}...${NC}" + if curl -fsSL "$url" -o "$dest_file" 2>/dev/null; then + echo -e "${GREEN}✓ Installed: ${dest_file}${NC}" + echo -e "${YELLOW}Use with: /${name} in Claude Code${NC}" + else + echo -e "${RED}✗ Failed to download command: ${name}${NC}" + echo " Check available commands with: $0 list" + exit 1 + fi +} + +install_skill() { + local name="$1" + local dest_dir="${CLAUDE_DIR}/skills" + local dest_file="${dest_dir}/${name}.md" + local url="${REPO_RAW}/examples/skills/${name}.md" + + ensure_dir "$dest_dir" + + echo -e "${BLUE}Downloading skill: ${name}...${NC}" + if curl -fsSL "$url" -o "$dest_file" 2>/dev/null; then + echo -e "${GREEN}✓ Installed: ${dest_file}${NC}" + else + echo -e "${RED}✗ Failed to download skill: ${name}${NC}" + echo " Check available skills with: $0 list" + exit 1 + fi +} + +install_memory() { + local name="$1" + local dest_file="CLAUDE.md" + local url="${REPO_RAW}/examples/memory/${name}.md" + + if [ -f "$dest_file" ]; then + echo -e "${YELLOW}Warning: CLAUDE.md already exists${NC}" + read -p "Overwrite? (y/N) " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Aborted." + exit 0 + fi + fi + + echo -e "${BLUE}Downloading memory template: ${name}...${NC}" + if curl -fsSL "$url" -o "$dest_file" 2>/dev/null; then + echo -e "${GREEN}✓ Installed: ${dest_file}${NC}" + echo -e "${YELLOW}Customize this file for your project${NC}" + else + echo -e "${RED}✗ Failed to download memory template: ${name}${NC}" + echo " Check available templates with: $0 list" + exit 1 + fi +} + +# Main +case "${1:-}" in + ""|help|--help|-h) + show_help + ;; + list) + list_templates + ;; + agent) + [ -z "${2:-}" ] && { echo -e "${RED}Error: Agent name required${NC}"; exit 1; } + install_agent "$2" + ;; + hook) + [ -z "${2:-}" ] && { echo -e "${RED}Error: Hook name required${NC}"; exit 1; } + install_hook "$2" + ;; + command) + [ -z "${2:-}" ] && { echo -e "${RED}Error: Command name required${NC}"; exit 1; } + install_command "$2" + ;; + skill) + [ -z "${2:-}" ] && { echo -e "${RED}Error: Skill name required${NC}"; exit 1; } + install_skill "$2" + ;; + memory) + [ -z "${2:-}" ] && { echo -e "${RED}Error: Memory template name required${NC}"; exit 1; } + install_memory "$2" + ;; + *) + echo -e "${RED}Unknown type: $1${NC}" + echo "Use: agent, hook, command, skill, memory" + exit 1 + ;; +esac diff --git a/tools/audit-prompt.md b/tools/audit-prompt.md index cb097a2..c551b66 100644 --- a/tools/audit-prompt.md +++ b/tools/audit-prompt.md @@ -510,7 +510,7 @@ Here's an example of what the audit report looks like: | **PostToolUse** | Hook that runs AFTER Claude executes a tool - great for formatting | | **Plan Mode** | Read-only exploration mode for safe analysis before making changes | | **Thinking Mode** | Extended thinking (Opus 4.5: ON by default). Toggle with Alt+T, configure in /config | -| **Trinity Pattern** | Combining Plan Mode + Think Levels + MCP for complex tasks | +| **Trinity Pattern** | Combining Plan Mode + Extended Thinking + MCP for complex tasks | | **Verify Gate** | CI/CD pattern: build → lint → test → typecheck before merge | | **Context Zones** | Green (0-50%), Yellow (50-70%), Red (70%+) - context usage thresholds | | **Data Retention** | Anthropic stores conversations: 5 years (default), 30 days (opt-out), 0 days (Enterprise ZDR) |