Skills skill-knowledge-share
apiVersion: skill.ooder.net/v1
git clone https://github.com/oodercn/skills
skills/scenes/skill-knowledge-share/skill.yamlapiVersion: skill.ooder.net/v1 kind: Skill
metadata: id: skill-knowledge-share name: 知识共享管理 version: 1.0.0 description: 知识库权限管理和分享场景能力,支持部门内和跨部门的知识共享 author: Ooder Team license: Apache-2.0 homepage: https://gitee.com/ooderCN repository: https://gitee.com/ooderCN/ooder-skills keywords: - knowledge - share - permission - collaboration sceneCategory: ass
spec: skillForm: SCENE
capability: category: biz
scene: type: AUTO visibility: public participantMode: multi-role name: 知识共享 description: 知识库权限管理和分享
roles: - id: OWNER name: 知识库所有者 description: 知识库创建者,拥有完全控制权限 required: true minCount: 1 maxCount: 1 permissions: - kb:manage - kb:share - kb:delete - permission:manage - id: COLLABORATOR name: 协作者 description: 参与知识库协作的用户 required: false minCount: 0 maxCount: 100 permissions: - kb:read - kb:write - kb:comment - id: VIEWER name: 查看者 description: 只有查看权限的用户 required: false minCount: 0 maxCount: 1000 permissions: - kb:read
activationSteps: OWNER: - stepId: configure-kb step: 1 action: configure-kb title: 配置知识库 description: 选择要共享的知识库 type: CONFIG_SKILL required: true skippable: false autoExecute: false - stepId: set-permissions step: 2 action: set-permissions title: 设置权限 description: 配置知识库访问权限 type: CONFIG_CONDITIONS required: true skippable: false autoExecute: false - stepId: invite-collaborators step: 3 action: invite-collaborators title: 邀请协作者 description: 添加知识库协作者 type: CONFIRM_PARTICIPANTS required: false skippable: true autoExecute: false - stepId: confirm-activation step: 4 action: confirm-activation title: 确认激活 description: 确认场景激活 type: CONFIRM_ACTIVATION required: true skippable: false autoExecute: false COLLABORATOR: - stepId: accept-invitation step: 1 action: accept-invitation title: 接受邀请 description: 加入知识库协作 type: CONFIRM_JOIN required: true skippable: false autoExecute: false VIEWER: - stepId: accept-invitation step: 1 action: accept-invitation title: 接受邀请 description: 获取知识库访问权限 type: CONFIRM_JOIN required: true skippable: false autoExecute: false
menus: OWNER: - id: overview name: 共享概览 icon: ri-dashboard-line path: /knowledge-share/overview order: 1 visible: true - id: permissions name: 权限管理 icon: ri-shield-keyhole-line path: /knowledge-share/permissions order: 2 visible: true - id: shares name: 分享管理 icon: ri-share-line path: /knowledge-share/shares order: 3 visible: true - id: collaboration name: 协作设置 icon: ri-team-line path: /knowledge-share/collaboration order: 4 visible: true COLLABORATOR: - id: my-kbs name: 我的协作 icon: ri-folder-line path: /knowledge-share/my-kbs order: 1 visible: true - id: shared-with-me name: 共享给我 icon: ri-share-forward-line path: /knowledge-share/shared-with-me order: 2 visible: true VIEWER: - id: shared-with-me name: 共享给我 icon: ri-share-forward-line path: /knowledge-share/shared-with-me order: 1 visible: true
classification: categoryName: 自驱系统场景 mainFirst: true businessSemanticsScore: 6 detectedAt: "2026-03-06T00:00:00Z" detectionVersion: "2.3.0" autoDetect: true
dependencies: - id: skill-knowledge-base version: ">=1.0.0" required: true autoInstall: true description: "知识库核心服务" capabilities: - knowledge-base
- id: skill-user-auth version: ">=1.0.0" required: true autoInstall: true description: "用户认证服务" capabilities: - user-auth - permission-check
sceneCapabilities: - id: scene-knowledge-share name: 知识共享管理场景能力 type: SCENE mainFirst: true
mainFirstConfig: selfCheck: - checkCapabilities: [manage-permission, create-share, collaboration] - checkDependencies: [skill-knowledge-base, skill-user-auth] selfStart: - initCapabilities: [manage-permission, create-share, collaboration] selfDrive: scheduleRules: - trigger: "0 0 * * *" action: cleanup-expired-shares capabilityChains: cleanup-expired-shares: - capability: manage-permission input: action: cleanup-expired capabilities: - manage-permission - create-share - collaboration collaborativeCapabilities: - capabilityId: notify role: PROVIDER interface: notification-service autoStart: false optional: true
capabilities: - id: manage-permission name: 权限管理 description: 知识库权限设置和管理 category: service type: ATOMIC inputSchema: type: object properties: kbId: type: string action: type: string enum: [grant, revoke, check, list] userId: type: string permission: type: string enum: [READ, WRITE, ADMIN, OWNER] outputSchema: type: object properties: success: type: boolean permission: type: string
- id: create-share name: 创建分享 description: 生成知识库分享链接 category: service type: ATOMIC inputSchema: type: object properties: kbId: type: string ownerId: type: string expireDays: type: integer password: type: string maxAccessCount: type: integer outputSchema: type: object properties: shareCode: type: string shareLink: type: string expiresAt: type: string - id: collaboration name: 协作功能 description: 多人协同编辑和版本控制 category: service type: ATOMIC inputSchema: type: object properties: kbId: type: string action: type: string enum: [start, stop, status] outputSchema: type: object properties: status: type: string participants: type: array
capabilityBindings: - sceneCapabilityType: knowledge-share autoBind: true capabilities: - manage-permission - create-share - collaboration
endpoints: - path: /api/v1/knowledge-share/permission method: POST description: 权限管理接口 capability: manage-permission
- path: /api/v1/knowledge-share/permission/check method: GET description: 检查权限 capability: manage-permission - path: /api/v1/knowledge-share/share method: POST description: 创建分享 capability: create-share - path: /api/v1/knowledge-share/share/{shareCode} method: GET description: 验证分享 capability: create-share - path: /api/v1/knowledge-share/collaboration method: POST description: 协作管理 capability: collaboration
runtime: language: java javaVersion: "8" framework: spring-boot mainClass: net.ooder.skill.knowledge.share.KnowledgeShareApplication
llmConfig: required: false defaultProvider: "deepseek" defaultModel: "deepseek-chat" capabilities: - chat - streaming - function-calling modelSelection: allowUserOverride: true availableProviders: - deepseek - openai - qianwen - volcengine - ollama functionCalling: enabled: true tools: - name: query_skill_capability description: "查询当前技能的能力和使用方法" parameters: type: object properties: capability: type: string description: "能力名称" detail: type: string enum: [brief, detailed, examples] default: "brief" - name: execute_mvel_action description: "通过MVEL表达式执行后台操作" parameters: type: object properties: expression: type: string description: "MVEL表达式" context: type: object - name: generate_ui_form description: "生成UI表单供用户填写" parameters: type: object properties: formType: type: string fields: type: array items: type: object - name: execute_batch_operation description: "执行批量操作" parameters: type: object properties: operation: type: string items: type: array items: type: object - name: convert_to_javascript description: "转换为JavaScript代码供用户使用" parameters: type: object properties: action: type: string parameters: type: object toolChoice: auto rateLimits: requestsPerMinute: 60 tokensPerMinute: 100000
config: optional: - name: SHARE_DEFAULT_EXPIRE_DAYS type: integer default: 7 description: 默认分享有效期(天) - name: SHARE_MAX_ACCESS_COUNT type: integer default: 100 description: 默认最大访问次数
resources: cpu: "100m" memory: "256Mi" storage: "100Mi"
offline: enabled: true cacheStrategy: local syncOnReconnect: true
knowledge: documents: - id: overview name: 功能概述 path: README.md type: guide language: zh priority: high ragConfig: enabled: true indexName: "skill-knowledge-share-knowledge" embeddingModel: text-embedding-3-small chunkSize: 1000 chunkOverlap: 200 searchStrategy: hybrid topK: 5 threshold: 0.7