Skip to content

Commit f8183ad

Browse files
committed
Add docs on multi user skills and personalized tools
1 parent b3e3fe2 commit f8183ad

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

content/docs/extensions/skills.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ my-skill/
179179

180180
**Note:** The `SKILL.md` file cannot be deleted as it's required for every skill.
181181

182+
## Multi User Skills
183+
184+
In multi-user environments with Authentication enabled, users are only able to manage their own skill collection located at `~/.llms/user/<username>/skills` which are only accessible to them. They can also each enable or disable skills independently without affecting others.
185+
186+
They'll still have access to shared global and project-level skills in `.agent/skills/` and `.claude/skills/`, but won't be able to edit or delete them.
187+
188+
<Screenshot src="/img/skills/skills-authenticated-user.webp" />
189+
182190
## Skill Metadata (SKILL.md)
183191

184192
Every skill requires a `SKILL.md` file with YAML frontmatter:

content/docs/extensions/tools.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,20 @@ The tools selector allows curating the available tools for each chat session, be
138138

139139
<Screenshot src="/img/llms-tools-top.webp" />
140140

141+
## Personalized Tools in Multi-User Environments
142+
143+
A tool will be able to return user-specific data when used in authenticated multi-user environments by defining an optional `user` parameter, e.g this is used in the built-in `skill` tool to return skills specific to the authenticated user:
144+
145+
```python
146+
def skill(name: Annotated[str, "skill name"], file: Annotated[str | None, "skill file"] = None, user=None):
147+
"""Get the content of a skill or a specific file within a skill."""
148+
skills = resolve_all_skills(ctx, user=user)
149+
return skills.get(name)
150+
151+
ctx.register_tool(skill, group="core_tools")
152+
```
153+
154+
When a user is authenticated, the `user` parameter is automatically populated with their username allowing the tool to return user-specific data.
141155

142156
## Core Tools
143157

65.2 KB
Loading

0 commit comments

Comments
 (0)