Skip to content

Commit 535ddbe

Browse files
authored
fix: add user-invocable: true to skill frontmatter (#2077)
Skills were missing this field, causing them to be treated as "managed" instead of user-invocable via /speckit-* commands.
1 parent 8353830 commit 535ddbe

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/specify_cli/agents.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ def build_skill_frontmatter(
275275
},
276276
}
277277
if agent_name == "claude":
278-
# Claude skills should only run when explicitly invoked.
278+
# Claude skills should be user-invocable (accessible via /command)
279+
# and only run when explicitly invoked (not auto-triggered by the model).
280+
skill_frontmatter["user-invocable"] = True
279281
skill_frontmatter["disable-model-invocation"] = True
280282
return skill_frontmatter
281283

tests/integrations/test_integration_claude.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def test_setup_creates_skill_files(self, tmp_path):
5858
parts = content.split("---", 2)
5959
parsed = yaml.safe_load(parts[1])
6060
assert parsed["name"] == "speckit-plan"
61+
assert parsed["user-invocable"] is True
6162
assert parsed["disable-model-invocation"] is True
6263
assert parsed["metadata"]["source"] == "templates/commands/plan.md"
6364

@@ -176,7 +177,9 @@ def test_interactive_claude_selection_uses_integration_path(self, tmp_path):
176177

177178
skill_file = project / ".claude" / "skills" / "speckit-plan" / "SKILL.md"
178179
assert skill_file.exists()
179-
assert "disable-model-invocation: true" in skill_file.read_text(encoding="utf-8")
180+
skill_content = skill_file.read_text(encoding="utf-8")
181+
assert "user-invocable: true" in skill_content
182+
assert "disable-model-invocation: true" in skill_content
180183

181184
init_options = json.loads(
182185
(project / ".specify" / "init-options.json").read_text(encoding="utf-8")
@@ -276,6 +279,7 @@ def test_claude_preset_creates_new_skill_without_commands_dir(self, tmp_path):
276279
content = skill_file.read_text(encoding="utf-8")
277280
assert "preset:claude-skill-command" in content
278281
assert "name: speckit-research" in content
282+
assert "user-invocable: true" in content
279283
assert "disable-model-invocation: true" in content
280284

281285
metadata = manager.registry.get("claude-skill-command")

0 commit comments

Comments
 (0)