改个 Skill 文案也要重新发版?with_directory 让插件目录直接生效

改个 Skill 文案也要重新发版?with_directory 让插件目录直接生效 「Regnexe Python 实战系列」第 5 篇共 10 篇对应仓库examples/readme/05_file_directory_loading.py。上一篇04. 一个 Python 类一次注册搞定 2 个工具 1 个 Skill 1 个 Sub-Agent。一个真实的团队矛盾开发同学通常喜欢把能力写进代码类型明确、能测试、能 Review。但运营或运维同学经常有另一个诉求“我只是想改一个 Skill 的提示词或者加一个插件目录能不能别重新发版”这两个诉求并不冲突。regnexe-py 用with_directory()支持文件系统目录加载让一部分能力可以脱离 Python 类和发版流程。目录长什么样示例里临时创建了一个插件目录大概结构是这样weather-plugin/ plugin.yaml SKILL.mdplugin.yaml负责声明工具能力plugin_id:weather-plugincapabilities:-capability_id:weather-plugin.get_weathertype:mcp_toolname:get_weatherdescription:Get todays weather for a citytags:[weather]SKILL.md负责声明 Skill--- name: advisor plugin_id: weather-plugin capability_id: weather-plugin.advisor description: Outdoor activity advisor... tags: [weather] allowed_tools: [get_weather] --- You are an outdoor activity advisor. 1. Call get_weather for the city the user mentions. 2. Based on the result, give a short go/no-go recommendation.实战代码接入目录只需要一行agent(RegnexeAgentBuilder().with_default_model(Vendor.DEEPSEEK,deepseek-v4-flash).with_tool(get_weather).with_directory(str(plugin_dir)).with_event_listener(ConsoleEventListener()).build())这里get_weather仍然由代码提供目录里的plugin.yaml和SKILL.md提供能力元数据和 Skill 内容。Agent 构建时会扫描目录把这些文件注册成 Marketplace 里的能力。对后续调用来说它们和代码注册的能力没有区别。适用场景with_directory()特别适合Skill 提示词经常调整插件由运维目录管理不同部署环境启用不同能力不希望每次改 Markdown 都重新发版但它不适合所有东西。核心业务工具仍然建议写在 Python 代码里方便测试和类型检查目录加载更适合描述型、配置型、提示词型能力。小结regnexe-py 没有强迫你在“代码插件”和“文件插件”之间二选一。一个应用里完全可以核心能力走plugin运营能力走with_directory()。关键是不管来源是代码还是目录最后都进入同一个 Marketplace。 上一篇04. 一个 Python 类一次注册搞定 2 个工具 1 个 Skill 1 个 Sub-Agent 下一篇06. 能力市场换成数据库要改多少代码regnexe-py 一个 Marketplace 搞定 项目地址https://github.com/flower-trees/regnexe-py