Skip to content

Commit 7f7ca2d

Browse files
committed
Fix skill paths and symlink creation in smartem-workspace
Two fixes for Claude Code skill setup: 1. Update skill paths in bundled config (repos.json) - Add claude-code/ prefix to all skill paths - Before: shared/skills/database-admin - After: claude-code/shared/skills/database-admin - Fixes skill discovery during workspace initialization 2. Fix symlink creation in claude.py - Use os.symlink() with absolute paths instead of Path.symlink_to() - Path.symlink_to() was creating relative symlinks that resolved incorrectly - Ensures skills are accessible from .claude/skills/ directory Tested with wheel installation via uvx. All skills now symlink correctly and are accessible during workspace initialization. Resolves skill symlinking issues reported in testing.
1 parent 6b77df5 commit 7f7ca2d

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

packages/smartem-workspace/smartem_workspace/config/repos.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,13 @@
361361
],
362362
"claudeConfig": {
363363
"skills": [
364-
{ "name": "database-admin", "path": "shared/skills/database-admin" },
365-
{ "name": "devops", "path": "shared/skills/devops" },
366-
{ "name": "technical-writer", "path": "shared/skills/technical-writer" },
367-
{ "name": "git", "path": "shared/skills/git" },
368-
{ "name": "github", "path": "shared/skills/github" },
369-
{ "name": "ascii-art", "path": "shared/skills/ascii-art" },
370-
{ "name": "playwright-skill", "path": "smartem-frontend/skills/playwright-skill" }
364+
{ "name": "database-admin", "path": "claude-code/shared/skills/database-admin" },
365+
{ "name": "devops", "path": "claude-code/shared/skills/devops" },
366+
{ "name": "technical-writer", "path": "claude-code/shared/skills/technical-writer" },
367+
{ "name": "git", "path": "claude-code/shared/skills/git" },
368+
{ "name": "github", "path": "claude-code/shared/skills/github" },
369+
{ "name": "ascii-art", "path": "claude-code/shared/skills/ascii-art" },
370+
{ "name": "playwright-skill", "path": "claude-code/smartem-frontend/skills/playwright-skill" }
371371
],
372372
"defaultPermissions": {
373373
"allow": [

packages/smartem-workspace/smartem_workspace/setup/claude.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Claude Code configuration setup."""
22

33
import json
4+
import os
45
from pathlib import Path
56

67
from rich.console import Console
@@ -40,7 +41,7 @@ def setup_claude_config(
4041
claude_config_link = workspace_path / "claude-config"
4142
if not claude_config_link.exists() and claude_config_source.exists():
4243
try:
43-
claude_config_link.symlink_to(claude_config_source)
44+
os.symlink(str(claude_config_source.resolve()), str(claude_config_link))
4445
console.print(f" [green]Created symlink: claude-config -> {claude_config_source}[/green]")
4546
except OSError as e:
4647
console.print(f" [yellow]Could not create claude-config symlink: {e}[/yellow]")
@@ -61,7 +62,7 @@ def setup_claude_config(
6162

6263
if skill_source.exists():
6364
try:
64-
skill_link.symlink_to(skill_source)
65+
os.symlink(str(skill_source.resolve()), str(skill_link))
6566
console.print(f" [green]Linked skill: {skill.name}[/green]")
6667
except OSError as e:
6768
console.print(f" [yellow]Could not link skill {skill.name}: {e}[/yellow]")
@@ -83,6 +84,7 @@ def setup_claude_config(
8384

8485
if claude_md_source.exists() and not claude_md_target.exists():
8586
import shutil
87+
8688
shutil.copy(claude_md_source, claude_md_target)
8789
console.print(f" [green]Copied CLAUDE.md[/green]")
8890
elif claude_md_target.exists():

0 commit comments

Comments
 (0)