You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Enhancement] Add privacy/visibility controls for agent-owned skills
Context
GoClaw's skill system already has a visibility field in the database schema and returns it in the skills.list and skills.get RPC responses. However, there is currently no way for an agent to set or modify the visibility of a skill it owns.
The current behavior:
System skills are always visibility = 'public' (hardcoded in the seeder)
Custom skills uploaded via publish_skill get registered but the agent has no control over who can discover or use them
The skills.update RPC method exists (internal/gateway/methods/skills.go:149) and accepts visibility in the updates map, but there is no user-facing mechanism (CLI command, UI, or agent tool) to change it
Current Codebase State
Component
Status
Location
visibility column in DB
✅ Exists
skills table
skills.update RPC method
✅ Exists
internal/gateway/methods/skills.go:149
Ownership check for updates
✅ Exists
skillOwnerGetter interface + owner validation
publish_skill tool
⚠️ Partial
Registers skill but no visibility parameter
CLI skills commands
❌ Missing
No goclaw skills set-privacy or similar
Agent tool for visibility
❌ Missing
No skill_manage action for privacy
Proposed Solution
Add privacy/visibility controls that allow agents to set and modify the visibility of skills they own.
1. Extend publish_skill Tool
Add an optional visibility parameter to the publish_skill tool:
This reuses the existing skills.update RPC method which already:
Checks ownership via skillOwnerGetter
Rejects non-owner/non-admin updates
Supports updating visibility field
3. CLI Command (optional)
goclaw skills set-privacy <slug> --visibility private|team|public
goclaw skills list --visibility private # filter by visibility
4. UI Integration (optional)
The skills page in the web UI should display the current visibility and provide a dropdown to change it (for skill owners).
Mermaid Diagram
flowchart TD
A[Agent publishes skill] --> B{visibility param?}
B -->|Not set| C[Default: private]
B -->|Set| D[Use provided value]
C --> E[publish_skill registers skill]
D --> E
E --> F[Skill stored with visibility field]
F --> G{skill_manage set-privacy?}
G -->|Yes| H[skills.update RPC with ownership check]
H --> I[Update visibility in DB]
G -->|No| J[Keep current visibility]
I --> K[BumpVersion + cache invalidation]
J --> K
K --> L[skill.search respects visibility filter]
Loading
Visibility Filter Logic
The skill_search tool and agent skill injection (resolveSkillsSummary) should filter based on visibility:
Caller context
Can see skills with visibility
Skill owner
private, team, public
Same team member
team, public
Other tenant
public only
System (admin)
All
Security Considerations
Authentication/Authorization: Existing skills.update ownership check is sufficient — only the skill owner or admin can change visibility. This is already implemented in handleUpdate() via skillOwnerGetter.
Data Exposure:private skills must NOT appear in skill_search results for non-owners. The current SearchByEmbedding() and BM25 search in internal/skills/search.go need to include a visibility filter in their SQL queries.
Input Validation:visibility must be validated against the allowed enum values (private, team, public). Invalid values should return ErrInvalidRequest.
Injection Risks: Low — visibility is a simple string field stored in the DB. No SQL injection risk with parameterized queries.
Tóm tắt: Hệ thống skill đã có cột visibility trong DB và RPC method skills.update hỗ trợ cập nhật, nhưng agent không có cách nào để set hoặc thay đổi privacy của skill mà nó sở hữu. Đề xuất thêm visibility param cho publish_skill, action set-privacy cho skill_manage, và filter visibility trong skill search.
[Enhancement] Add privacy/visibility controls for agent-owned skills
Context
GoClaw's skill system already has a
visibilityfield in the database schema and returns it in theskills.listandskills.getRPC responses. However, there is currently no way for an agent to set or modify the visibility of a skill it owns.The current behavior:
visibility = 'public'(hardcoded in the seeder)publish_skillget registered but the agent has no control over who can discover or use themskills.updateRPC method exists (internal/gateway/methods/skills.go:149) and acceptsvisibilityin the updates map, but there is no user-facing mechanism (CLI command, UI, or agent tool) to change itCurrent Codebase State
visibilitycolumn in DBskillstableskills.updateRPC methodinternal/gateway/methods/skills.go:149skillOwnerGetterinterface + owner validationpublish_skilltoolvisibilityparameterskillscommandsgoclaw skills set-privacyor similarskill_manageaction for privacyProposed Solution
Add privacy/visibility controls that allow agents to set and modify the visibility of skills they own.
1. Extend
publish_skillToolAdd an optional
visibilityparameter to thepublish_skilltool:Supported values:
"private"— Only visible to the owning agent (default for newly published skills)"team"— Visible to all agents in the same team/workspace"public"— Visible to all agents across all tenants (current behavior for system skills)2. Extend
skill_manageToolAdd a new action for modifying skill privacy:
This reuses the existing
skills.updateRPC method which already:skillOwnerGettervisibilityfield3. CLI Command (optional)
4. UI Integration (optional)
The skills page in the web UI should display the current visibility and provide a dropdown to change it (for skill owners).
Mermaid Diagram
flowchart TD A[Agent publishes skill] --> B{visibility param?} B -->|Not set| C[Default: private] B -->|Set| D[Use provided value] C --> E[publish_skill registers skill] D --> E E --> F[Skill stored with visibility field] F --> G{skill_manage set-privacy?} G -->|Yes| H[skills.update RPC with ownership check] H --> I[Update visibility in DB] G -->|No| J[Keep current visibility] I --> K[BumpVersion + cache invalidation] J --> K K --> L[skill.search respects visibility filter]Visibility Filter Logic
The
skill_searchtool and agent skill injection (resolveSkillsSummary) should filter based on visibility:private,team,publicteam,publicpubliconlySecurity Considerations
Authentication/Authorization: Existing
skills.updateownership check is sufficient — only the skill owner or admin can change visibility. This is already implemented inhandleUpdate()viaskillOwnerGetter.Data Exposure:
privateskills must NOT appear inskill_searchresults for non-owners. The currentSearchByEmbedding()and BM25 search ininternal/skills/search.goneed to include a visibility filter in their SQL queries.Input Validation:
visibilitymust be validated against the allowed enum values (private,team,public). Invalid values should returnErrInvalidRequest.Injection Risks: Low — visibility is a simple string field stored in the DB. No SQL injection risk with parameterized queries.
CORS/CSP Impact: None.
Rate Limiting: None needed — visibility changes are infrequent admin/owner operations.
Audit Trail: Visibility changes should be logged via the existing audit system (
logAudit) since they affect skill discoverability.Implementation Considerations
publish_skilltool +skill_managetool + search filterprivateis more restrictive, existingpublicskills remain unchangedprivateby default, or keep current behaviorskills_test.go,search_test.go,skill_publish_test.goReferences
internal/gateway/methods/skills.gointernal/skills/seeder.gointernal/skills/search.godocs/15-core-skills-system.mddocs/16-skill-publishing.mdUnresolved Questions
private(safer) orpublic(current implicit behavior)?teamvisibility use the existing team/workspace boundary, or should it be tenant-scoped?skills.list --minefilter to show only skills owned by the calling agent?BumpVersion()to invalidate the skill list cache? (Likely yes, but worth confirming.)Representing @mrgoonie (Duy /zuey/)
Tóm tắt: Hệ thống skill đã có cột
visibilitytrong DB và RPC methodskills.updatehỗ trợ cập nhật, nhưng agent không có cách nào để set hoặc thay đổi privacy của skill mà nó sở hữu. Đề xuất thêmvisibilityparam chopublish_skill, actionset-privacychoskill_manage, và filter visibility trong skill search.