diff --git a/tests/test_issue42_skill_blocks.py b/tests/test_issue42_skill_blocks.py index 505fb77..e7d38de 100644 --- a/tests/test_issue42_skill_blocks.py +++ b/tests/test_issue42_skill_blocks.py @@ -238,7 +238,16 @@ def test_frontmatter_name_matches_directory(skill): def test_claude_skills_link_resolves_to_agents_skills(): + """.claude/skills is local (git-ignored) and comes in two layouts: one link + to .agents/skills, or a directory with one link per skill. Either way each + skill Claude Code loads must be the .agents/skills one.""" link = REPO / ".claude" / "skills" if not link.exists(): pytest.skip(".claude/skills is untracked; absent in a worktree") - assert link.resolve() == SKILLS.resolve() + if link.is_symlink(): + assert link.resolve() == SKILLS.resolve() + return + for skill in SKILL_NAMES: + entry = link / skill + assert entry.exists(), f".claude/skills/{skill} is missing" + assert entry.resolve() == (SKILLS / skill).resolve(), f".claude/skills/{skill} -> {entry.resolve()}"