Mention Syntax Overview
Better Skills uses three types of mention tokens:- Draft mentions:
[[resource:new:path]]— used when authoring local skill files - Persisted mentions:
[[resource:uuid]]or[[skill:uuid]]— used after resources are created - Escaped mentions:
\[[resource:...]]— prevents resolution when documenting syntax
Draft Mentions
Use draft mentions when creating or editing skills locally.Syntax
Rules
- Path is relative to the skill root
- Use forward slashes regardless of OS
- No leading
./or absolute paths - CLI resolves these to UUID-based mentions on
createorupdate
Example
Persisted Mentions
After creating or updating a skill, draft mentions are resolved to UUID-based persisted mentions.Resource Mentions
Link to an existing resource by UUID:create or update.
Skill Mentions
Link to another skill in your vault:Creating Links Between Skills
Cross-skill links help agents discover related skills contextually.Find Related Skills
List all vault skills to identify potential links:Note the UUID of any related skill.
Add Inline Mentions
Add
[[skill:uuid]] mentions where contextually relevant — not in a generic “Related Skills” section.Good: inline in the section where the context is relevant
Escaping Mentions
Prefix mentions with a backslash to prevent resolution:Example
In documentation explaining mention syntax:Auto-Linking Behavior
Better Skills automatically manages graph links based on mentions.How It Works
-
When you create or update a skill, the CLI parses all mentions in:
- SKILL.md
- All resource markdown files (
.md,.mdx,.txt)
-
For each mention found:
- Validates the target exists and belongs to the same vault
- Creates an auto-generated link in the skill graph
- Tags the link with
metadata.origin = "markdown-auto"
-
On subsequent updates:
- Deletes old auto links for changed sources
- Recreates links based on current mention content
- Preserves manually created links
Same-Vault Constraint
Mentions can only reference targets in the same vault:Valid: skill and mentioned resource both in “my-vault”
Validation Rules
Before creating or updating a skill,better-skills validate checks mention integrity.
Validation Checks
- Mention syntax: All mentions use correct format
- Target existence: Every
[[resource:new:...]]path points to an existing file - Resource coverage: Every file in
references/,scripts/, orassets/has at least one inbound mention - No orphans: No mentions point to non-existent files
Example Errors
Bulk Rewrite
When importing skills from external sources, userewrite-links to convert local links to mentions.
Command
What It Does
- Scans SKILL.md and markdown resources
- Converts common link formats to
[[resource:new:...]]mentions:- Markdown links:
[text](references/foo.md) - Wiki links:
[[references/foo.md]] - Autolinks:
<references/foo.md> - Bare paths:
references/foo.md(context-dependent)
- Markdown links:
- Skips fenced code blocks, inline code, and escaped mentions
Example
rewrite-links catches most link patterns but may miss edge cases. Always run validate after rewriting and manually fix any remaining bare links.Examples from Workflows
Creating a New Skill
Importing from GitHub
After cloning a skill repository:Updating with New Resources
Next Steps
Creating Skills
Learn how to create new skills with proper mention structure
Skill Resources
Understand resource types and organization