deer-flow/skills/public
Zhipeng Zheng 53a80d3ad1
feat(skills): per-user custom skill isolation with sandbox mounting (#3889)
* feat(skills): per-user skill isolation (#2905)

Implement user-scoped skill storage that isolates custom skills between
users while sharing public skills globally.

Key changes:
- Add UserScopedSkillStorage class for per-user custom skill directories
- Introduce get_or_new_user_skill_storage() factory with user_id context
- Auth middleware sets effective_user_id for request-scoped storage
- Agent/prompt/middleware now use user-scoped storage and prompt cache
- Sandbox mounts user-scoped skill directories for search/read tools
- Add validate_skill_file_path() to SkillStorage for path security
- Migration script supports --all-users bulk migration
- Frontend: add editable field to Skill type, error check in enableSkill
- All skill categories can be toggled (custom skills default to enabled)
- Update skill-creator SKILL.md with isolation-aware instructions

Tests:
- Add test_user_scoped_skill_storage.py (new)
- Update all existing skill tests for user-scoped storage
- Update sandbox, client, and router tests

* fix(skills): address second-round PR review feedback (#3889)

- P1-1: restrict legacy skill mount to users without custom skills
- P1-2: fail-closed for _is_disabled_skill_path (OSError → return True)
- P2-1: AND-merge global extensions_config skill disabled state
- P2-2: atomic write for _skill_states.json (mkstemp + replace)
- P2-3: normalize X-DeerFlow-Owner-User-Id in trusted boundary
- P2-4: LRU-bounded _enabled_skills_by_config_cache (OrderedDict, maxsize=256)
- P2-5: clear global prompt cache on PUBLIC skill toggle
- P2-6: invalidate skill caches on client.update_skill

* fix(tests): correct tool policy test after merge

* fix(skills): use DEFAULT_SKILLS_CONTAINER_PATH in UserScopedSkillStorage

The "/mnt/skills" literal in UserScopedSkillStorage.__init__ triggers
test_skill_container_path_defaults::test_mnt_skills_literal_is_owned_by_skill_constants_module
on CI. Migrate the default to the existing deerflow.constants constant,
matching the pattern already used by LocalSkillStorage, SkillStorage, and
the durable/tool_error middlewares.

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-07-04 13:54:04 +08:00
..
academic-paper-review feat(skills): add academic-paper-review, code-documentation, and newsletter-generation skills (#1861) 2026-04-05 10:19:35 +08:00
bootstrap fix(skills): validate bundled SKILL.md front-matter in CI (fixes #2443) (#2457) 2026-04-23 14:06:14 +08:00
chart-visualization fix(skills): validate bundled SKILL.md front-matter in CI (fixes #2443) (#2457) 2026-04-23 14:06:14 +08:00
claude-to-deerflow docs: align runtime docs with gateway mode (#2868) 2026-05-12 16:19:21 +08:00
code-documentation feat(skills): add academic-paper-review, code-documentation, and newsletter-generation skills (#1861) 2026-04-05 10:19:35 +08:00
consulting-analysis fix(skill): enhance data authenticity protocols and clarify reporting guidelines (#905) 2026-02-25 22:25:23 +08:00
data-analysis fix: remove unnecessary f-string prefixes and unused import (#2352) 2026-04-21 09:53:18 +08:00
deep-research feat(agent):Supports custom agent and chat experience with refactoring (#957) 2026-03-03 21:32:01 +08:00
find-skills feat: add find-skills skill for discovering agent skills 2026-02-01 23:54:08 +08:00
frontend-design refactor: refine skills 2026-01-21 21:22:56 +08:00
github-deep-research feat: Support gitHub PAT configuration for higher github API accessing rate. (#1374) 2026-03-27 09:54:14 +08:00
image-generation feat: MiniMax provider for image/video/podcast skills + new music-generation skill (#3437) 2026-06-08 22:04:38 +08:00
music-generation feat: MiniMax provider for image/video/podcast skills + new music-generation skill (#3437) 2026-06-08 22:04:38 +08:00
newsletter-generation feat(skills): add academic-paper-review, code-documentation, and newsletter-generation skills (#1861) 2026-04-05 10:19:35 +08:00
podcast-generation feat: MiniMax provider for image/video/podcast skills + new music-generation skill (#3437) 2026-06-08 22:04:38 +08:00
ppt-generation fix: issue 1138 windows encoding (#1139) 2026-03-16 16:53:12 +08:00
skill-creator feat(skills): per-user custom skill isolation with sandbox mounting (#3889) 2026-07-04 13:54:04 +08:00
surprise-me docs: update description for surprise-me skill to enhance clarity 2026-02-07 10:51:43 +08:00
systematic-literature-review test(skills): add evaluation + trigger analysis for systematic-literature-review (#2061) 2026-04-10 18:02:45 +08:00
vercel-deploy-claimable feat: use list of links 2026-02-02 13:25:21 +08:00
video-generation feat: MiniMax provider for image/video/podcast skills + new music-generation skill (#3437) 2026-06-08 22:04:38 +08:00
web-design-guidelines fix: fix skill md path 2026-01-20 21:10:05 +08:00