Skip to content

Write a skill once for every repo

Status: Shipped

You’ll add a skill to your team’s context once, and every Claude Code agent you launch in any repo the team works in gets it (its default context includes .claude/skills; another agent gets it when its context includes that folder). Then you’ll improve it from inside a worktree and have the agent send the change back.

The example adds a release-notes skill to Ledgerline’s billing team, which works in ledgerline/web and ledgerline/api.

You need: a team with at least one attached repo (Attach your repos), and a story you can launch an agent on (Launch your first agent).

1. Write the skill in your team context

In CodeSense’s file tree for the billing team (or in any editor), create .claude/skills/release-notes/SKILL.md in the team’s content folder:

---
name: release-notes
description: Draft customer-facing release notes from the done stories in an epic.
---
Read done stories, group by area, write one plain-language line each.
No internal ids in customer copy.

On disk that’s ~/.codesense/users/<id>/orgs/<org>/billing/content/.claude/skills/release-notes/SKILL.md.

Saving it changes only the context repo. Nothing is copied into a worktree yet.

2. Launch an agent and find it

Launch a Claude Code agent on a story. Its default context includes .claude/skills, so the launch copies the new skill into the story’s worktree with the rest of its context. Then, in that worktree’s terminal:

Terminal window
ls .claude/skills/release-notes
# SKILL.md
git status --short
# nothing: the skill is excluded from git

Launch an agent on a ledgerline/web story and the same file is there too. One file in the context repo, for every agent whose context includes it, in either repo.

3. Improve it from inside a worktree

Beta Needs an agent that calls reverse_sync_worktree

Say an agent working on LL-250 finds the skill should also mention breaking changes. It edits .claude/skills/release-notes/SKILL.md in its worktree. To send that edit back to the team context, ask the agent to preview it with preview_reverse_sync_worktree and then publish it with reverse_sync_worktree. Nothing is published until an agent makes that call.

The change lands in billing/content/.claude/skills/release-notes/SKILL.md. Other worktrees get it the next time an agent launches or hydrates there. If the team’s copy changed in the meantime too, the publish reports a conflict instead of overwriting it.

4. Share it with your team

Your context repo now has the new skill, on your Mac. To get it to teammates, commit and push it from the context repo folder, or ask your agent to. See Sharing through git.

Things to know

  • The nearest copy of each file wins. Skills resolve one file at a time across the team chain: a parent team’s release-notes reaches your agents unless your team has its own copy. Editing an inherited skill from your team edits the parent’s; Copy into ‹team› gives your team its own copy. See Teams and inheritance.
  • Any agent’s files work the same way. AGENTS.md, .codex/ files, or plain docs in content/ reach a worktree just like skills do, when they’re in the launching agent’s context.
  • Your own clone isn’t touched. CodeSense writes context into worktrees it creates and clones it manages, not into a clone you attached from your own folder.
How we know this is accurate 8 sources

Checked against the app at 1b3d5a69d73473db077dfb44f4390b42cded6bd4.

Feature inventory

  • A-27
  • A-28
  • A-30
  • A-31
  • QW-2

Code

  • src-tauri/src/agents/context.rs
  • src-tauri/src/agents/manifest_resolve/context.rs
  • src-tauri/src/mcp/context_operations/explicit.rs