Linking Commands
Linking commands create symlinks between skills and AI agent workspaces, making skills discoverable by agents.tank link
Link a skill to all detected AI agent workspaces.skills.json).
Linking Flow
- Read
skills.jsonto get skill name - Detect installed AI agents on the system
- Create wrapper directory with frontmatter (if SKILL.md exists)
- Create symlinks in each agent’s skills directory
- Record links in
~/.tank/links.json
Example Output
Detected Agents
Tank automatically detects these agents:- OpenCode -
~/.config/opencode/skills/ - Cursor -
~/.cursor/skills/ - Windsurf -
~/.windsurf/skills/ - Cline -
~/.cline/skills/ - Continue -
~/.continue/skills/
apps/cli/src/lib/agents.ts:10
No Agents Detected
If no agents are installed:tank link again.
Already Linked
If skill is already linked to an agent:Frontmatter Generation
If your skill has aSKILL.md file without frontmatter, Tank generates a wrapper:
Before (SKILL.md)
After (agent-skills/my-skill/SKILL.md)
~/.tank/agent-skills/ and symlinked to agent directories.
Custom Frontmatter
IfSKILL.md already has frontmatter, Tank uses it as-is:
Symlink Structure
Development Linking
Global Installation Linking
For globally installed skills:tank unlink
Remove skill symlinks from all agent workspaces.skills.json).
Example Output
No Links Found
If skill is not linked:Cleanup
Unlinking:- Removes symlinks from agent directories
- Deletes wrapper directory from
~/.tank/agent-skills/ - Updates
~/.tank/links.json
Link Registry
Tank tracks links in~/.tank/links.json:
Link Sources
- dev - Development link from local directory (
tank link) - global - Global installation link (
tank install --global) - local - Project installation link (
tank install)
Automatic Linking
Tank automatically links skills during installation:tank link manually after install.
Automatic Unlinking
Tank automatically unlinks during removal:Link Conflicts
Same Skill, Different Sources
If you link a dev version while a global version is installed:- Unlink the existing link:
tank unlink(from global install) - Link your dev version:
tank link
Scoped Packages
Scoped packages (@org/skill) are symlinked with flattened names:
@ and / in symlink names.
Testing Skills Locally
Usetank link to test skills during development:
Agent Compatibility
All agents must support the Tank skill format:- SKILL.md with frontmatter
namefield in frontmatter- Optional
description,author,versionfields
Troubleshooting
Permission Denied
~/.config/opencode/skills/.
Symlink Already Exists
tank unlink first, then tank link again.
No skills.json
tank link from a directory with skills.json, or run tank init first.
Agent Not Detected
If Tank doesn’t detect your agent:-
Check agent config directory exists:
-
Manually verify agent detection:
-
Check Tank’s agent detection logic:
See
apps/cli/src/lib/agents.ts:10