Skip to content

fix(skill): reduce watcher inotify usage#310

Merged
xiami762 merged 1 commit into
devfrom
fix/reduce-skill-watcher-inotify
May 26, 2026
Merged

fix(skill): reduce watcher inotify usage#310
xiami762 merged 1 commit into
devfrom
fix/reduce-skill-watcher-inotify

Conversation

@JohnYin-hub

Copy link
Copy Markdown
Contributor

概述

  • 将 Skill 文件监听范围从整个 .flocks / .claude 目录收敛到实际的 skill 发现目录。
  • 避免递归监听 .flocks/flockshub、工具目录、配置目录、缓存目录等无关大目录。
  • 补充 watcher 目录收集逻辑和 .claude/skills 兼容性的回归测试。

影响分析

该修复保留了已支持 skill 路径下的热加载能力,同时显著降低 Linux inotify watch 消耗。.flocks 下非 skill 文件变更不再触发 skill 缓存失效,这与现有 skill discovery 边界一致。

测试

  • source .venv/bin/activate && pytest tests/skill/test_skill.py
  • source .venv/bin/activate && pytest tests/tool/test_watcher_atomic_save.py tests/skill/test_skill.py
  • 已验证当前项目 watcher 根目录从整个 .flocks 收敛为 .flocks/plugins/skills

Co-authored-by: Cursor <cursoragent@cursor.com>
@xiami762 xiami762 merged commit bb43e79 into dev May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants