Claude Code 技能禁止自动调用的方法
AI 总结
一篇引用 Claude Code 文档的 Reddit 帖子介绍,在技能 `SKILL.md` 的前置元数据中设置 `disable-model-invocation: true`,可阻止 Claude 自动加载该技能,同时保留手动调用能力。示例定义了可通过 `/changelog` 运行的变更日志技能;该配置仅为说明,未经独立测试。
深度见解
这为开发者提供了一种明确方法,可让变更日志等工作流仅在需要时调用,避免 Claude 在其他任务中自动加载。
You might want a changelog or weekly-report skill available as a command, without Claude choosing to load it during other work.
Claude Code has a SKILL.md frontmatter field for that:
---
name: changelog
description: Format unreleased changes as a changelog entry
disable-model-invocation: true