Add a source
A source is a folder you own that holds skills, commands, context, docs or scripts, with a
tack.yaml at its top that says where each kind lives. Tack reads the folder where it is: it
never moves or copies your files. Register each folder once; every project then picks from it.
Run tack init once first, as Get started shows. It creates Tack's state,
enables the agents it finds and links the built-in skills. If you skip it, the first source add
that registers creates the state and enables the agents it finds, and says so in a note.
This guide registers two sources: ~/agent-setup, a folder of your own without a tack.yaml, and
~/code/acme-agent-skills, a team repository that already has one.
A folder without a tack.yaml
Say your folder looks like this:
Write its tack.yaml as JSON: the same keys and values. Each entry names a folder inside the
source by what it holds, and version and name are required. Here is the declaration:
Pass it as the value of --config, in single quotes so the shell keeps it as one argument. Tack
checks it as tack check would, previews the tack.yaml it would write and what each folder
holds, and changes nothing:
$ tack source add ~/agent-setup --config '{"version": 1, "name": "agent-setup", "skills": [{"path": "skills"}], "commands": [{"path": "commands"}], "docs": [{"name": "handbook", "path": "handbook"}]}'
tack source add · ✓ success
Would create ~/agent-setup/tack.yaml and register source agent-setup.
No files or state changed.
version: 1
name: agent-setup
skills:
- path: skills
commands:
- path: commands
docs:
- name: handbook
path: handbook
skills skills · 2 skills
debug-flaky-test, pr-review
commands commands · 1 command
ship
docs handbook · 1 docs
handbook
Delivery
Nothing to link: no enabled agent or registered project takes a resource of this
source.
Run the same command again with --apply to write tack.yaml and register the
source.Check that every skill, command and docs folder you expect is listed. A file that does not parse is
left out: the preview then reads ! partial and lists the file under Problems. A mistake in the
JSON, such as an unknown key or a missing name, fails the preview: Tack lists every problem at
once, each with its field and its line in the JSON. Then run the same command with --apply:
Tack reads the JSON again, writes the tack.yaml, registers the source and links it, as
Deliver it says. It never writes over a tack.yaml that exists.
$ tack source add ~/agent-setup --config '{"version": 1, "name": "agent-setup", "skills": [{"path": "skills"}], "commands": [{"path": "commands"}], "docs": [{"name": "handbook", "path": "handbook"}]}' --apply
tack source add · ✓ success
Created ~/agent-setup/tack.yaml. Registered source agent-setup (~/agent-setup).
id e71e644c-e9f8-42ac-b638-3b7504635ced
docs handbook
Delivery
Nothing was linked.
2 skills · 1 command · 0 context · 0 scripts · 1 docs
Next
tack project add NAME --repository-cwd PATHA long declaration reads better over several lines. Write --config - and pass the JSON on
standard input, with a heredoc for instance, then pipe the same JSON again with --apply:
The JSON takes every key a tack.yaml takes: scripts, include and exclude patterns,
depends-on, maintainers and the rest, except imports. tack guide tack-yaml lists them.
--config takes the JSON itself: YAML or a file path fails with config-not-json. Tack writes the
tack.yaml from what it read, so the file holds plain YAML whatever the layout of your JSON.
Run tack source add ~/agent-setup without --config and Tack refuses with
declaration-config-required. It reads the top of the folder and suggests a JSON declaration for
the folders it recognises by name, here skills and commands; add the handbook docs yourself.
Its Next is tack guide tack-yaml.
When the skill folders sit at the top of the folder, such as ~/skills/review/SKILL.md, declare the
folder itself with the path .: {"version": 1, "name": "skills", "skills": [{"path": "."}]}. Its
walk passes over dot and underscore folders, node_modules and the folders of other sources. A
tack.yaml with a . entry declares that one kind. When a folder of commands or docs sits beside
the skills, keep one tack.yaml and name each folder instead of ., a skill folder as an entry of
its own:
A folder that already has a tack.yaml
A folder with a tack.yaml previews like any other: tack source add ~/code/acme-agent-skills
shows the name the source takes, what it holds and what it links. Apply it to register the source;
registering writes nothing into the folder. This is how you add a team repository you cloned.
--config on such a folder fails with declaration-exists: edit its tack.yaml instead.
$ tack source add ~/code/acme-agent-skills --apply
tack source add · ✓ success
Registered source acme (~/code/acme-agent-skills).
id 46879f27-1f77-4d63-a6b3-8f028bd4cd9b
Delivery
Nothing was linked.
2 skills · 0 commands · 0 context · 0 scripts · 0 docs
Next
tack project add NAME --repository-cwd PATHIts tack.yaml declares its own folder as its skills folder, with a name and its maintainers:
The name is the label you and other sources type, as in acme:release-notes. Every tack.yaml
needs one: Tack never takes the label from the folder, which can be called differently on each
machine. Commit the tack.yaml of a repository you share, so every teammate gets the
same source.
Check it
tack check reads a source without registering it, and reports each problem by file and line. Run
it after every edit to a tack.yaml:
$ tack check ~/agent-setup
tack check · ✓ success
Checks 2 · errors 0 · warnings 0
source ~/agent-setup
skill: 2
command: 1
context: 0
script: 0
docs: 1
docs ~/agent-setup/handbook/release-process.md
Figures (0)
Icons (0)
Author components (0)Once the source is registered, edit its tack.yaml directly. Your agent's built-in
manage-tack-sources skill knows the format, and tack guide tack-yaml lists every key.
Deliver it
--apply links the source as well as registering it: each skill and command that is on by default
goes into every registered project, and a skill picked for you into your home folders, as
tack sync --all --source agent-setup plans them. The preview lists those links under Delivery,
and nothing of your other sources changes. Here no project is registered yet, so nothing is linked:
at user level a skill is opt-in until you pick it. With no agent enabled, nothing is linked either
and the result warns no-adapters-enabled: run tack init to enable the agents it finds.
A project you register after the source gets its links when you register it. From inside the
repository, tack project add app previews the registration and the links, and writes nothing;
--apply registers the project and makes them:
A skill can be opt-in for projects too: it then reaches a project only once you pick it or enable a profile that names it. See
Choose what each project gets. The handbook docs are not linked by a sync
alone: attach them first, as Link docs into a project shows.
Next
- Get a teammate's new skill when the team repository changes.
- Write a skill in your own source.
- Link docs into a project for the
handbookfolder.