cargo agents sync
Scans workspace dependencies, installs applicable skills into agent directories, and cleans up stale skills.
Flow
-
Find workspace root — run
cargo metadatato locate the workspace manifest directory. -
Load plugin sources — read the user config’s
[[plugin-source]]entries and load their plugin manifests. For git sources, fetch/update as needed. -
Scan dependencies — read the full dependency graph from the workspace.
-
Match skills to dependencies — for each plugin, parse
SKILL.mdYAML frontmatter, reject malformed or non-string metadata, warn about skipped invalid skills, then evaluate skill group crate predicates and individual skillcratesfrontmatter against the workspace dependencies. -
Install skills per agent — for each configured agent:
- Copy applicable
SKILL.mdfiles into the agent’s expected skill directory. - Drop a
.symposiummarker file into each installed skill directory so future syncs (and other tools) can recognize it as symposium-managed. - For every skill directory symposium creates along the way (the skill directory itself or its
skills/parent), write a.gitignorecontaining a single*so symposium-managed files stay out of version control.
- Copy applicable
-
Propagate user-authored skills (agents-syncing) — if
agents-syncingis enabled in the user config, mirror skills the user placed in<workspace>/.agents/skills/into each configured agent’s own skill directory. A skill is “user-authored” when its directory containsSKILL.mdbut lacks the.symposiummarker (symposium never writes markers into source skills). Propagated destinations receive the same marker and*.gitignoreas plugin-installed skills, so they participate in the normal stale-skill reap: removing the source — or disablingagents-syncing— causes the destinations to be cleaned up on the next sync. A destination directory without a marker is user-managed and is never overwritten. -
Reap stale skills — across every known agent’s skills parent directory, remove any subdirectory that contains the
.symposiummarker but wasn’t installed this sync. Directories without the marker (user-managed) are left untouched. -
Register hooks — ensure symposium’s global hook handler and MCP servers are registered for all configured agents. Unregister hooks for agents no longer in the config. Only symposium’s own handler is registered (e.g.,
cargo-agents hook claude pre-tool-use) — individual plugin hooks are never written into agent configs. See Hooks for the dispatch model.
Marker file
Each skill directory symposium installs contains an empty .symposium file. Cleanup walks every agent’s skills parent directory (.claude/skills/, .agents/skills/, .kiro/skills/, .gemini/skills/) and reaps any subdirectory whose marker is present but which wasn’t installed this sync. This lets symposium reclaim stale skills (including those left behind by agents removed from the config) without touching user-managed skills, which are identified by the absence of the marker.
Gitignore
Each skill directory symposium creates (and its skills/ parent if new) receives a .gitignore containing just *. Pre-existing directories are left alone. The wildcard also hides the marker file and the gitignore itself, so git status stays clean.
Auto-sync
When auto-sync = true is set in the user config, the hook handler runs sync automatically during agent sessions. This keeps skills in sync as dependencies change.