Commit dc2ce9cb0b9f

Vincent Demeester <vincent@sbr.pm>
2025-12-04 14:33:07
docs: Migrate all path references from ~/.claude to ~/.config/claude
- Align documentation with XDG Base Directory specification - Update skills, workflows, and plugin docs to reference correct paths - Ensure user-facing messages show XDG-compliant locations Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 8c129be
Changed files (7)
dots
.config
claude
plugins
session-manager
skills
tools
claude-hooks
cmd
save-session
dots/.config/claude/plugins/session-manager/commands/save-session.md
@@ -4,7 +4,7 @@ description: Save a summary of the current Claude Code session to history
 
 # Save Session
 
-Create a comprehensive session summary following the history-system format and save it to `~/.claude/history/sessions/`.
+Create a comprehensive session summary following the history-system format and save it to `~/.config/claude/history/sessions/`.
 
 ## Important Guidelines
 
@@ -31,7 +31,7 @@ Create a session entry file with:
 
 **Filename format**: `YYYY-MM-DD-HHMMSS_SESSION_description.md`
 
-**Location**: `~/.claude/history/sessions/YYYY-MM/`
+**Location**: `~/.config/claude/history/sessions/YYYY-MM/`
 
 **Template**:
 ```markdown
@@ -68,7 +68,7 @@ Create a session entry file with:
 
 Use the Write tool to save the session entry to:
 ```
-~/.claude/history/sessions/YYYY-MM/YYYY-MM-DD-HHMMSS_SESSION_description.md
+~/.config/claude/history/sessions/YYYY-MM/YYYY-MM-DD-HHMMSS_SESSION_description.md
 ```
 
 Replace:
@@ -80,7 +80,7 @@ Replace:
 
 After saving, inform the user:
 ```
-✅ Session saved to: ~/.claude/history/sessions/YYYY-MM/YYYY-MM-DD-HHMMSS_SESSION_description.md
+✅ Session saved to: ~/.config/claude/history/sessions/YYYY-MM/YYYY-MM-DD-HHMMSS_SESSION_description.md
 
 Summary:
 - X tasks completed
@@ -104,7 +104,7 @@ Summary:
 - Added claude-history folder to globals.nix syncthingFolders
 - Generated syncthing folder ID (j5zdn-6kq4t)
 - Configured claude-history sync for kyushu and aomi
-- Path: /home/vincent/.claude/history
+- Path: /home/vincent/.config/claude/history
 
 ## Decisions Made
 - **Syncthing ID format**: Used random 5-char strings (xxxxx-xxxxx) following existing pattern
@@ -112,7 +112,7 @@ Summary:
 
 ## Technical Details
 - Syncthing folder ID: j5zdn-6kq4t
-- Path: /home/vincent/.claude/history
+- Path: /home/vincent/.config/claude/history
 - Synced machines: kyushu (SBLRZF4-...), aomi (CN5P3MV-...)
 
 ## Next Steps
dots/.config/claude/skills/CORE/history-system.md
@@ -36,7 +36,7 @@ Denote notes use **Org-mode** (`.org`) format:
 
 ### History Directory
 ```
-~/.claude/history/
+~/.config/claude/history/
 ├── sessions/                 # Work session summaries
 │   └── YYYY-MM/
 │       └── YYYY-MM-DD-HHMMSS_SESSION_description.md
@@ -82,7 +82,7 @@ All history-related notes in the denote system use the `:history:` tag, plus cat
 ### Bidirectional Links
 
 **From History to Notes**:
-History entries in `~/.claude/history/` can reference notes (using markdown links):
+History entries in `~/.config/claude/history/` can reference notes (using markdown links):
 ```markdown
 ## Related Notes
 - [PAI Implementation](~/desktop/org/notes/20251203T151822--personal-ai-infrastructure__ai_claude.org)
@@ -92,7 +92,7 @@ History entries in `~/.claude/history/` can reference notes (using markdown link
 Notes can reference history entries:
 ```org
 * Related History
-- [[file:~/.claude/history/sessions/2025-12/2025-12-03-151822_SESSION_claude-skills-implementation.md][Implementation Session]]
+- [[file:~/.config/claude/history/sessions/2025-12/2025-12-03-151822_SESSION_claude-skills-implementation.md][Implementation Session]]
 ```
 
 ## Capture Workflows
@@ -264,8 +264,8 @@ Brief context of what this documents
 Main content...
 
 * Related History Entries
-- [[file:~/.claude/history/sessions/...][Session Entry]]
-- [[file:~/.claude/history/learnings/...][Learning Entry]]
+- [[file:~/.config/claude/history/sessions/...][Session Entry]]
+- [[file:~/.config/claude/history/learnings/...][Learning Entry]]
 
 * Related Notes
 - [[file:~/desktop/org/notes/...][Other Note]]
@@ -281,7 +281,7 @@ Main content...
 2. **After fixing**: Create learning entry
    ```bash
    # Create learning in history
-   vim ~/.claude/history/learnings/2025-12/2025-12-03-160000_LEARNING_wireguard-connection-issue.md
+   vim ~/.config/claude/history/learnings/2025-12/2025-12-03-160000_LEARNING_wireguard-connection-issue.md
    ```
 3. **Optionally**: Create denote note for reference (with pkai signature)
    ```bash
@@ -298,8 +298,8 @@ Main content...
 1. **Research the topic**: Gather information
 2. **Create research entry**:
    ```bash
-   mkdir -p ~/.claude/history/research/2025-12-03_nix-flake-best-practices
-   vim ~/.claude/history/research/2025-12-03_nix-flake-best-practices/analysis.md
+   mkdir -p ~/.config/claude/history/research/2025-12-03_nix-flake-best-practices
+   vim ~/.config/claude/history/research/2025-12-03_nix-flake-best-practices/analysis.md
    ```
 3. **Create denote note** for easy discovery (with pkai signature):
    ```bash
@@ -313,7 +313,7 @@ Main content...
 1. **Work on implementation**
 2. **After completion**, create session entry:
    ```bash
-   vim ~/.claude/history/sessions/2025-12/2025-12-03-150000_SESSION_claude-skills-implementation.md
+   vim ~/.config/claude/history/sessions/2025-12/2025-12-03-150000_SESSION_claude-skills-implementation.md
    ```
 3. **Update planning note** with completion status:
    ```bash
@@ -339,25 +339,25 @@ ls ~/desktop/org/notes/*==pkai*__history_session*.org
 ### By Category in History Directory
 ```bash
 # Find all sessions
-ls ~/.claude/history/sessions/*/*_SESSION_*.md
+ls ~/.config/claude/history/sessions/*/*_SESSION_*.md
 
 # Find all learnings
-ls ~/.claude/history/learnings/*/*_LEARNING_*.md
+ls ~/.config/claude/history/learnings/*/*_LEARNING_*.md
 
 # Find recent research
-ls -lt ~/.claude/history/research/
+ls -lt ~/.config/claude/history/research/
 ```
 
 ### By Content
 ```bash
 # Search all history
-rg "wireguard" ~/.claude/history/
+rg "wireguard" ~/.config/claude/history/
 
 # Search history notes
 rg "wireguard" ~/desktop/org/notes/*__history*.org
 
 # Combined search
-rg "wireguard" ~/.claude/history/ ~/desktop/org/notes/*__history*.org
+rg "wireguard" ~/.config/claude/history/ ~/desktop/org/notes/*__history*.org
 ```
 
 ## When to Use History vs Notes
@@ -400,7 +400,7 @@ rg "wireguard" ~/.claude/history/ ~/desktop/org/notes/*__history*.org
 - Use org-mode file links for portability
 
 ### Organization
-- Keep history in `~/.claude/history/` (chronological)
+- Keep history in `~/.config/claude/history/` (chronological)
 - Keep notes in `~/desktop/org/notes/` (topical)
 - Use tags consistently in both systems
 
@@ -433,16 +433,16 @@ rg "wireguard" ~/.claude/history/ ~/desktop/org/notes/*__history*.org
 ```bash
 DATE=$(date +"%Y-%m")
 TIMESTAMP=$(date +"%Y-%m-%d-%H%M%S")
-mkdir -p ~/.claude/history/sessions/$DATE
-vim ~/.claude/history/sessions/$DATE/${TIMESTAMP}_SESSION_description.md
+mkdir -p ~/.config/claude/history/sessions/$DATE
+vim ~/.config/claude/history/sessions/$DATE/${TIMESTAMP}_SESSION_description.md
 ```
 
 ### Create Learning Entry
 ```bash
 DATE=$(date +"%Y-%m")
 TIMESTAMP=$(date +"%Y-%m-%d-%H%M%S")
-mkdir -p ~/.claude/history/learnings/$DATE
-vim ~/.claude/history/learnings/$DATE/${TIMESTAMP}_LEARNING_description.md
+mkdir -p ~/.config/claude/history/learnings/$DATE
+vim ~/.config/claude/history/learnings/$DATE/${TIMESTAMP}_LEARNING_description.md
 ```
 
 ### Create History Note (with pkai signature)
dots/.config/claude/skills/Createskill/workflows/CreateSkill.md
@@ -20,12 +20,12 @@ Ask the user:
 ### 3. Create Directory Structure
 
 ```bash
-mkdir -p ~/.claude/skills/[SkillName]/{workflows,tools}
+mkdir -p ~/.config/claude/skills/[SkillName]/{workflows,tools}
 ```
 
 ### 4. Create SKILL.md
 
-Create `~/.claude/skills/[SkillName]/SKILL.md` with:
+Create `~/.config/claude/skills/[SkillName]/SKILL.md` with:
 
 ```yaml
 ---
@@ -76,7 +76,7 @@ Show the created structure and ask for confirmation or adjustments.
 Created skill: [SkillName]
 
 Structure:
-~/.claude/skills/[SkillName]/
+~/.config/claude/skills/[SkillName]/
 ├── SKILL.md
 ├── workflows/
 │   └── [WorkflowName].md
dots/.config/claude/skills/Createskill/workflows/ValidateSkill.md
@@ -6,7 +6,7 @@ Validate a skill's structure, naming, and compliance with conventions.
 
 ### 1. Read the Skill File
 
-Read `~/.claude/skills/[SkillName]/SKILL.md`
+Read `~/.config/claude/skills/[SkillName]/SKILL.md`
 
 ### 2. Check Directory Naming
 
dots/.config/claude/skills/notes/SKILL.md
@@ -116,7 +116,7 @@ Additional content...
 - `:history:decision:` - Architecture and design decisions
 - `:history:execution:` - Command execution logs
 
-**Note**: History-tagged notes are interconnected with `~/.claude/history/` entries. See the history-system skill for details.
+**Note**: History-tagged notes are interconnected with `~/.config/claude/history/` entries. See the history-system skill for details.
 
 ## Creating Notes
 
@@ -410,8 +410,8 @@ What this documents
 Main content
 
 * Related History Entries
-- [[file:~/.claude/history/sessions/2025-12/...][Session Entry]]
-- [[file:~/.claude/history/learnings/2025-12/...][Learning Entry]]
+- [[file:~/.config/claude/history/sessions/2025-12/...][Session Entry]]
+- [[file:~/.config/claude/history/learnings/2025-12/...][Learning Entry]]
 
 * Related Notes
 - [[file:~/desktop/org/notes/...][Other Note]]
@@ -442,7 +442,7 @@ rg "topic" ~/desktop/org/notes/*==pkai*.org
 **From Notes to History**:
 ```org
 * Related History
-- [[file:~/.claude/history/sessions/2025-12/2025-12-03-150000_SESSION_implementation.md][Implementation Session]]
+- [[file:~/.config/claude/history/sessions/2025-12/2025-12-03-150000_SESSION_implementation.md][Implementation Session]]
 ```
 
 **From History to Notes**:
tools/claude-hooks/cmd/save-session/main.go
@@ -31,7 +31,7 @@ func main() {
 	fmt.Println("")
 	fmt.Println("**Session ending**. Would you like me to save a summary of this session to your history?")
 	fmt.Println("")
-	fmt.Println("I can create a session entry in `~/.claude/history/sessions/` documenting:")
+	fmt.Println("I can create a session entry in `~/.config/claude/history/sessions/` documenting:")
 	fmt.Println("- What was accomplished")
 	fmt.Println("- Decisions made")
 	fmt.Println("- Next steps")
tools/claude-hooks/README.md
@@ -12,7 +12,7 @@ Migrated from TypeScript/Bun implementation in `dots/.claude/hooks/`.
 **What it does**:
 - Detects and skips subagent sessions
 - Sets terminal tab title to "Claude Ready"
-- Logs session start to `~/.claude/history/sessions/YYYY-MM/YYYY-MM-DD_session-log.txt`
+- Logs session start to `~/.config/claude/history/sessions/YYYY-MM/YYYY-MM-DD_session-log.txt`
 - Implements debouncing to prevent duplicate triggers (2 second window)
 
 ### 2. `claude-hooks-capture-tool-output`
@@ -20,7 +20,7 @@ Migrated from TypeScript/Bun implementation in `dots/.claude/hooks/`.
 
 **What it does**:
 - Captures outputs from interesting tools (Bash, Edit, Write, Read, Task, NotebookEdit, Skill, SlashCommand)
-- Logs to JSONL files: `~/.claude/history/tool-outputs/YYYY-MM/YYYY-MM-DD_tool-outputs.jsonl`
+- Logs to JSONL files: `~/.config/claude/history/tool-outputs/YYYY-MM/YYYY-MM-DD_tool-outputs.jsonl`
 - Silent failure - doesn't disrupt workflow if logging fails
 - Automatically creates directory structure
 
@@ -42,7 +42,7 @@ Migrated from TypeScript/Bun implementation in `dots/.claude/hooks/`.
 - Skips subagent sessions (silent)
 - Displays a message asking if session should be saved
 - Works with `/save-session` slash command for creating session entries
-- Saves to `~/.claude/history/sessions/YYYY-MM/YYYY-MM-DD-HHMMSS_SESSION_description.md`
+- Saves to `~/.config/claude/history/sessions/YYYY-MM/YYYY-MM-DD-HHMMSS_SESSION_description.md`
 
 ## Architecture
 
@@ -222,13 +222,13 @@ The old TypeScript hooks in `dots/.claude/hooks/` can be removed after verifying
 - Verify hooks are executable: `ls -la $(which claude-hooks-initialize-session)`
 
 **Permission errors:**
-- Ensure directories exist: `mkdir -p ~/.claude/history/{sessions,tool-outputs}`
-- Check write permissions on `~/.claude/history`
+- Ensure directories exist: `mkdir -p ~/.config/claude/history/{sessions,tool-outputs}`
+- Check write permissions on `~/.config/claude/history`
 
 **Debugging:**
 - Hooks write errors to stderr - check terminal output
 - Run hooks manually to test: `claude-hooks-initialize-session`
-- Check log files: `ls -la ~/.claude/history/`
+- Check log files: `ls -la ~/.config/claude/history/`
 
 **Build errors:**
 - Run `go mod tidy` to update dependencies
@@ -237,7 +237,7 @@ The old TypeScript hooks in `dots/.claude/hooks/` can be removed after verifying
 
 ## Environment Variables
 
-- `CLAUDE_DIR` - Override default `~/.claude` directory (optional)
+- `CLAUDE_DIR` - Override default `~/.config/claude` directory (optional)
 - `CLAUDE_PROJECT_DIR` - Set by Claude Code (used for subagent detection)
 - `CLAUDE_AGENT_TYPE` - Set by Claude Code for subagents (used for detection)