Endpoint
This endpoint requires authentication and validates write permissions for the target vault.
Input Schema
URL-safe identifier for the skill. Must be unique within the target vault.
Display name of the skill (minimum 1 character)
Brief description of the skill (minimum 1 character)
Markdown content with optional mention syntax
YAML frontmatter as a key-value object
Additional metadata key-value pairs
Original source URL if importing from external source
Original source identifier (e.g., GitHub path, package name)
Array of bundled resource files to create with the skill
UUID of the target vault. If omitted, defaults to the user’s personal vault.
Output Schema
Returns the complete created skill object (same format asskills.getById). See the Get Skill documentation for the full response schema.
Behavior
Vault Resolution
- If
vaultIdis provided → validates user has write permission to that vault - If
vaultIdis omitted → defaults to user’s personal vault - Throws
FORBIDDENif user lacks write permission
Mention Validation
Before creating the skill, all mention syntax is validated:- Mentions must reference existing skills or resources
- Mentioned targets must be in vaults accessible to the target vault (same-vault or cross-vault with read permission)
- Invalid mentions throw
BAD_REQUESTwith details
- Skill mention:
@[skill-name](skill-id) - Resource mention:
@[resource-path](resource-id)
Auto-Link Synchronization
After creating the skill and resources:- Parses all mention syntax in
skillMarkdownand resourcecontent - Creates
skillLinkrecords in the database for each mention - Links track source → target relationships for graph traversal
- If link sync fails, the entire skill creation is rolled back
Slug Uniqueness
Slugs must be unique within the target vault. Duplicate slug throws a database constraint error.TypeScript Example
Create in Specific Vault
With External Source Tracking
Error Handling
BAD_REQUEST
- Invalid mention syntax
- Mention references non-existent skill/resource
- Mention references inaccessible vault
- Invalid input schema (missing required fields, invalid types)
FORBIDDEN
- User lacks write permission to target vault
- Vault is read-only (system_default or enterprise without admin role)
INTERNAL_SERVER_ERROR
- Personal vault not found (should never happen)
- Database constraint violation (e.g., duplicate slug)
- Failed to create skill or resources
UNAUTHORIZED
No valid session
Notes
- All mention syntax is validated before creating the skill
- Resource creation is atomic with skill creation
- Link synchronization happens automatically after successful creation
- If any step fails, the entire transaction is rolled back
- The returned skill includes rendered markdown with mentions processed
- Personal vaults are always writable by the owner
- System default vaults are always read-only (cannot create skills)