Skip to content

Commit 3dbcece

Browse files
committed
fix: move hooks and skills to root to avoid EXDEV error
Move hooks/ and skills/ directories from .claude-plugin/ to repository root and update marketplace.json source field accordingly. This resolves cross-device link errors on Linux systems where /tmp is on a separate filesystem. Remove unnecessary README symlink from skill reference and update all corresponding file paths in configuration and tests.
1 parent a06f78d commit 3dbcece

File tree

22 files changed

+23
-43
lines changed

22 files changed

+23
-43
lines changed

.claude-plugin/CLAUDE.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
11
# Claude Code Plugin Guidelines
22

3-
## Skills Directory Location
3+
## Plugin Structure
44

5-
**Working solution**: Using `source: "./.claude-plugin"` in `marketplace.json` allows skills to remain in `.claude-plugin/skills/`
5+
This plugin uses `source: "./"` in `marketplace.json`, which means:
6+
- `marketplace.json` and `plugin.json` live in `.claude-plugin/`
7+
- `hooks/` and `skills/` directories are at the repository root
68

7-
Configuration in `marketplace.json`:
9+
Configuration in `.claude-plugin/marketplace.json`:
810
```json
911
{
10-
"source": "./.claude-plugin",
12+
"source": "./",
1113
"skills": ["./skills/worktrunk"]
1214
}
1315
```
1416

15-
Configuration in `plugin.json`:
17+
Configuration in `.claude-plugin/plugin.json`:
1618
```json
1719
{
1820
"hooks": "./hooks/hooks.json",
1921
"skills": ["./skills/worktrunk"]
2022
}
2123
```
2224

23-
**Path resolution**:
24-
- Source base: `./.claude-plugin`
25-
- Skills: `./.claude-plugin + ./skills/worktrunk = ./.claude-plugin/skills/worktrunk`
26-
- Hooks: `./.claude-plugin + ./hooks/hooks.json = ./.claude-plugin/hooks/hooks.json`
27-
28-
This approach keeps all Claude Code components organized together in `.claude-plugin/` and avoids root directory clutter.
29-
30-
**Note**: The official Claude Code documentation states "All other directories (commands/, agents/, skills/, hooks/) must be at the plugin root" but using the `source` field to point to `./.claude-plugin` makes paths relative to that directory, allowing this organizational structure.
31-
32-
**Why this works**: The `source` field in `marketplace.json` changes the base directory for path resolution. When `source: "./"` (the default), skills paths are resolved from the plugin root. When `source: "./.claude-plugin"`, skills paths are resolved from `.claude-plugin/`, allowing the entire plugin to be self-contained in one directory.
25+
**Why this structure**: Using `source: "./.claude-plugin"` caused EXDEV (cross-device link) errors on Linux systems where `/tmp` is on a separate filesystem (Ubuntu 21.04+, Fedora, Arch). See https://github.com/anthropics/claude-code/issues/14799 for details. Once that upstream bug is fixed, we could consolidate back to `.claude-plugin/` if desired.
3326

3427
## Known Limitations
3528

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{
1313
"name": "worktrunk",
1414
"description": "Worktrunk is a git worktree management CLI that streamlines multi-branch development. This plugin provides Claude Code integration with two features: (1) A configuration skill guiding you through LLM-powered commit message generation, project automation hooks (post-create, pre-merge), and worktree path customization. (2) Automatic activity tracking that displays 🤖 (working) and 💬 (waiting) indicators in `wt list`, showing which branches have active Claude sessions. Use when setting up Worktrunk configuration, automating project workflows, or monitoring AI activity across branches.",
15-
"source": "./.claude-plugin",
15+
"source": "./",
1616
"strict": false,
1717
"skills": [
1818
"./skills/worktrunk"

.claude-plugin/skills/worktrunk/reference/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ allow-branch = ["*"]
2020
consolidate-commits = true
2121
pre-release-replacements = [
2222
# Update skill version marker
23-
{ file = ".claude-plugin/skills/worktrunk/SKILL.md", search = "worktrunk-skill-version: [0-9.]+", replace = "worktrunk-skill-version: {{version}}" },
23+
{ file = "skills/worktrunk/SKILL.md", search = "worktrunk-skill-version: [0-9.]+", replace = "worktrunk-skill-version: {{version}}" },
2424
]
2525

2626
[package.metadata.cargo-udeps.ignore]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)