From 7cb2e63541462bed990dec35970396aa475a5997 Mon Sep 17 00:00:00 2001 From: Lesan Alexandru Date: Thu, 26 Mar 2026 09:29:18 +0200 Subject: [PATCH 1/4] feat: add review-claudemd skill and enable MCP servers Add the review-claudemd skill that analyzes recent conversations to find improvements for CLAUDE.md files. Also enable laravel-boost MCP server and project MCP servers in local settings. --- .claude/settings.local.json | 10 ++- .claude/skills/review-claudemd/SKILL.md | 84 +++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 .claude/skills/review-claudemd/SKILL.md diff --git a/.claude/settings.local.json b/.claude/settings.local.json index ca0a2ba..8b3e7a7 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -8,7 +8,13 @@ "Bash(bash)", "Bash(export PATH=\"$HOME/.bun/bin:$PATH\")", "Bash(bun install:*)", - "Bash(bun run:*)" + "Bash(bun run:*)", + "Bash(git -C /Users/lsn/Documents/GitHub/laravel-agentic-starter-kit log --oneline -5)", + "Bash(git checkout:*)" ] - } + }, + "enableAllProjectMcpServers": true, + "enabledMcpjsonServers": [ + "laravel-boost" + ] } diff --git a/.claude/skills/review-claudemd/SKILL.md b/.claude/skills/review-claudemd/SKILL.md new file mode 100644 index 0000000..4f377ba --- /dev/null +++ b/.claude/skills/review-claudemd/SKILL.md @@ -0,0 +1,84 @@ +--- +name: review-claudemd +description: Review recent conversations to find improvements for CLAUDE.md files. +--- + +# Review CLAUDE.md from conversation history + +Analyze recent conversations to improve both global (~/.claude/CLAUDE.md) and local (project) CLAUDE.md files. + +## Step 1: Find conversation history + +The project's conversation history is in `~/.claude/projects/`. The folder name is the project path with slashes replaced by dashes. + +```bash +# Find the project folder (replace / with -) +PROJECT_PATH=$(pwd | sed 's|/|-|g' | sed 's|^-||') +CONVO_DIR=~/.claude/projects/-${PROJECT_PATH} +ls -lt "$CONVO_DIR"/*.jsonl | head -20 +``` + +## Step 2: Extract recent conversations + +Extract the 15-20 most recent conversations (excluding the current one) to a temp directory: + +```bash +SCRATCH=/tmp/claudemd-review-$(date +%s) +mkdir -p "$SCRATCH" + +for f in $(ls -t "$CONVO_DIR"/*.jsonl | head -20); do + basename=$(basename "$f" .jsonl) + # Skip current conversation if known + cat "$f" | jq -r ' + if .type == "user" then + "USER: " + (.message.content // "") + elif .type == "assistant" then + "ASSISTANT: " + ((.message.content // []) | map(select(.type == "text") | .text) | join("\n")) + else + empty + end + ' 2>/dev/null | grep -v "^ASSISTANT: $" > "$SCRATCH/${basename}.txt" +done + +ls -lhS "$SCRATCH" +``` + +## Step 3: Spin up Sonnet subagents + +Launch parallel Sonnet subagents to analyze conversations. Each agent should read: +- Global CLAUDE.md: `~/.claude/CLAUDE.md` +- Local CLAUDE.md: `./CLAUDE.md` (if exists) +- Batch of conversation files + +Give each agent this prompt template: + +``` +Read: +1. Global CLAUDE.md: ~/.claude/CLAUDE.md +2. Local CLAUDE.md: [project]/CLAUDE.md +3. Conversations: [list of files] + +Analyze the conversations against BOTH CLAUDE.md files. Find: +1. Instructions that exist but were violated (need reinforcement or rewording) +2. Patterns that should be added to LOCAL CLAUDE.md (project-specific) +3. Patterns that should be added to GLOBAL CLAUDE.md (applies everywhere) +4. Anything in either file that seems outdated or unnecessary + +Be specific. Output bullet points only. +``` + +Batch conversations by size: +- Large (>100KB): 1-2 per agent +- Medium (10-100KB): 3-5 per agent +- Small (<10KB): 5-10 per agent + +## Step 4: Aggregate findings + +Combine results from all agents into a summary with these sections: + +1. **Instructions violated** - existing rules that weren't followed (need stronger wording) +2. **Suggested additions - LOCAL** - project-specific patterns +3. **Suggested additions - GLOBAL** - patterns that apply everywhere +4. **Potentially outdated** - items that may no longer be relevant + +Present as tables or bullet points. Ask user if they want edits drafted. From 64225e4eddb9aeaf27ee9096974119901cd60912 Mon Sep 17 00:00:00 2001 From: Lesan Alexandru Date: Thu, 26 Mar 2026 09:32:36 +0200 Subject: [PATCH 2/4] refactor: clean up permissions in settings.local.json --- .claude/settings.local.json | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 8b3e7a7..f02a3a2 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,16 +1,14 @@ { "permissions": { "allow": [ - "Bash(php artisan:*)", - "Bash(composer show:*)", - "Bash(composer run:*)", - "Bash(curl -fsSL https://bun.sh/install)", - "Bash(bash)", - "Bash(export PATH=\"$HOME/.bun/bin:$PATH\")", - "Bash(bun install:*)", - "Bash(bun run:*)", - "Bash(git -C /Users/lsn/Documents/GitHub/laravel-agentic-starter-kit log --oneline -5)", - "Bash(git checkout:*)" + "Bash(php artisan:*)", + "Bash(composer show:*)", + "Bash(composer run:*)", + "Bash(curl -fsSL https://bun.sh/install)", + "Bash(bash)", + "Bash(export PATH=\"$HOME/.bun/bin:$PATH\")", + "Bash(bun install:*)", + "Bash(bun run:*)" ] }, "enableAllProjectMcpServers": true, From 0a3383216446831944ebda277fa25025eaf6c2b6 Mon Sep 17 00:00:00 2001 From: Lesan Alexandru Date: Thu, 26 Mar 2026 09:33:06 +0200 Subject: [PATCH 3/4] feat: add missing permission for bun run command in settings.local.json --- .claude/settings.local.json | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index f02a3a2..ea4c6a5 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,18 +1,16 @@ { - "permissions": { - "allow": [ - "Bash(php artisan:*)", - "Bash(composer show:*)", - "Bash(composer run:*)", - "Bash(curl -fsSL https://bun.sh/install)", - "Bash(bash)", - "Bash(export PATH=\"$HOME/.bun/bin:$PATH\")", - "Bash(bun install:*)", - "Bash(bun run:*)" - ] - }, - "enableAllProjectMcpServers": true, - "enabledMcpjsonServers": [ - "laravel-boost" - ] + "permissions": { + "allow": [ + "Bash(php artisan:*)", + "Bash(composer show:*)", + "Bash(composer run:*)", + "Bash(curl -fsSL https://bun.sh/install)", + "Bash(bash)", + "Bash(export PATH=\"$HOME/.bun/bin:$PATH\")", + "Bash(bun install:*)", + "Bash(bun run:*)" + ] + }, + "enableAllProjectMcpServers": true, + "enabledMcpjsonServers": ["laravel-boost"] } From 8505688dc7ed11e59b928615c2774a33303b4051 Mon Sep 17 00:00:00 2001 From: Lesan Alexandru Date: Thu, 26 Mar 2026 09:35:14 +0200 Subject: [PATCH 4/4] chore: gitignore .claude/settings.local.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Personal Claude Code config (permissions, MCP servers) shouldn't be tracked — each developer has their own local settings. --- .claude/settings.local.json | 16 ---------------- .gitignore | 1 + 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 .claude/settings.local.json diff --git a/.claude/settings.local.json b/.claude/settings.local.json deleted file mode 100644 index ea4c6a5..0000000 --- a/.claude/settings.local.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "permissions": { - "allow": [ - "Bash(php artisan:*)", - "Bash(composer show:*)", - "Bash(composer run:*)", - "Bash(curl -fsSL https://bun.sh/install)", - "Bash(bash)", - "Bash(export PATH=\"$HOME/.bun/bin:$PATH\")", - "Bash(bun install:*)", - "Bash(bun run:*)" - ] - }, - "enableAllProjectMcpServers": true, - "enabledMcpjsonServers": ["laravel-boost"] -} diff --git a/.gitignore b/.gitignore index fa484c3..4f012aa 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ Homestead.yaml /.vscode /.zed /tmp/ +.claude/settings.local.json