| name | shared-agents-knowledge |
| description | Sync and use the shared-agents repo (team skills, rules + learnings). Use at session start, when loading team knowledge, searching learnings, or when the user mentions shared-agents, shared learnings, or team knowledge. |
Shared Agents Knowledge
Path: $SHARED_AGENTS_HOME (default: ~/.shared-agents)
Automatic sync (always โ no user action)
Every session, first step: run sync before anything else.
"${SHARED_AGENTS_HOME:-$HOME/.shared-agents}/scripts/sync.sh" pull
Pulls Core (~/.shared-agents) and Team (~/.shared-agents/team/) when configured.
- Do not ask the user to sync manually.
- Do not skip because "probably up to date".
- Offline/errors: continue with local files; note only if learnings may be stale.
IDE hooks also pull on session start (Cursor sessionStart, Claude SessionStart). Agent must still sync if hooks may not have run (subagents, headless).
Retrieve (before non-trivial tasks)
- Sync (pull) โ always first.
- Read
team/learnings/index.yaml for project, domain, tags, versions.
- Grep
team/learnings/approved/ for task keywords.
- Prefer learnings whose
versions match the project's stack (exact patch or same MAJOR.MINOR.PATCH line); treat experimental confidence as hints.
- Summarize briefly โ do not dump the whole repo.
Capture (after non-trivial tasks โ ask first)
Always ask after substantive tasks:
โSoll ich ein Team-Learning in shared-agents anlegen?"
| User says | Action |
|---|
| Yes / โja" / โlearning speichern" | Write to team pending/ (see below) |
| No | Do nothing |
Also capture when user explicitly asks anytime.
When writing:
- Activate skill
capture-learning.
- Resolve path:
sa pending path YYYY-MM-DD-short-slug (see docs/canonical-paths.md โ never workspace-relative; not in Core-Repo).
- Never write directly to
approved/.
- Remind user: teammate runs
sa review โ approved/ โ then all agents can use it.
For shell commands (install, review, pending push): skill sa-cli or run sa help.
Headless agents (OpenClaw)
Wrap commands with entrypoint (sync then exec):
"$SHARED_AGENTS_HOME/scripts/agent-entrypoint.sh" <your-agent-command>
Or first line of agent run: sync.sh pull.
Boundaries
No secrets, API keys, or customer PII in learnings.