skill_add_asset
Store an asset file (UTF-8 text or base64) inside a skill directory. Optionally overwrite existing files while safely creating parent folders.
Instructions
function_purpose: Add (or optionally overwrite) a single asset file inside an existing skill directory.
Description:
Writes a new file under the skill folder (creating parent directories) while enforcing path safety.
Supports text (UTF-8) or base64 content for binary assets (e.g. PDFs, images).
Will not overwrite existing files unless overwrite=True.
IMPORTANT: After adding an asset, you should ALWAYS create a note (via skill_store_note) documenting:
What the asset contains and its purpose
When and why an agent should load/use it
Any context needed to understand it
Example usage patterns if applicable
This ensures the asset remains discoverable and properly documented for future use.
Args:
name: str Skill name (directory must already exist)
path: str Relative path inside the skill (e.g. "examples/foo.py")
content: str Text content or base64 string
encoding: str "text" (default) or "base64"
overwrite: bool Allow overwriting when True (default False)
Returns:
dict with:
written: bool
path: str Relative normalized path
size: int | None
message: str
binary: bool
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | Yes | ||
| content | Yes | ||
| encoding | No | text | |
| overwrite | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||