Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tools/skill_manager_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,21 @@ def skill_manage(
return gate_result

if action == "create":
try:
from hermes_cli.config import load_config
_allow_create = is_truthy_value(
cfg_get(load_config(), "skills", "allow_create"),
default=True,
)
if not _allow_create:
return tool_error(
"skill_manage(action='create') is disabled by config "
"(skills.allow_create = false). Use patch/edit to modify "
"existing skills instead.",
success=False,
)
except Exception as e:
logger.warning("skills.allow_create lookup failed, skipping gate: %s", e)
if not content:
return tool_error("content is required for 'create'. Provide the full SKILL.md text (frontmatter + body).", success=False)
result = _create_skill(name, content, category)
Expand Down
Loading