Sidecar is a terminal-based workspace for running AI coding agents alongside file trees, task issues, Git diffs, and Jira or GitHub resources in split panes. Developers use it to monitor agent sessions, inspect files and changes, manage workspaces, and handle tasks without leaving one shell. The catalogue entries extend or guide coding-agent workflows used with Sidecar.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add marcus/sidecar --skill worktree-switchinggit clone --depth 1 https://github.com/marcus/sidecarWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/marcus/sidecar/worktree-switching)<a href="https://agentmods.dev/skills/marcus/sidecar/worktree-switching"><img src="https://agentmods.dev/badge/skills/marcus/sidecar/worktree-switching/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/marcus/sidecar/worktree-switching"><img src="https://agentmods.dev/badge/skills/marcus/sidecar/worktree-switching.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Memory Poisoning · line 81 Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00074 | $0.01563 |
| Opus 5.5 | $0.00030 | $0.00625 |
| Sonnet 5.5 | $0.00015 | $0.00313 |
| Haiku 4.5 | $0.00007 | $0.00156 |
Grade A, and why
worktree-switching scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree Switching
Sidecar supports seamless switching between git worktrees. When switching:
- All plugins are stopped, reinitialized with the new WorkDir, and restarted
- Per-worktree state (active plugin, sidebar selections) is saved/restored
- Project-specific themes are applied
- If a worktree is deleted externally, sidecar gracefully falls back to main
Core Mechanism
Project Switching
Worktree switching uses Model.switchProject() in internal/app/model.go:
m.switchProject(worktreePath)
This triggers in order:
- Save active plugin for old WorkDir
- Update
m.ui.WorkDirto new path - Apply resolved theme for new path
- Call
registry.Reinit(newWorkDir)-- stops all plugins, updates context, reinits all - Send
WindowSizeMsgto all plugins for layout recalculation - Restore saved active plugin for new WorkDir
- Show toast notification
Registry Reinitialization
Registry.Reinit() in internal/plugin/registry.go:
func (r *Registry) Reinit(newWorkDir string) []tea.Cmd {
// Stop all plugins (reverse order)
for i := len(r.plugins) - 1; i >= 0; i-- {
r.safeStop(r.plugins[i])
}
// Update context
r.ctx.WorkDir = newWorkDir
// Reinit all plugins
for _, p := range r.plugins {
r.safeInit(p)
}
// Collect and return start commands
return startCmds
}
Plugin Responsibilities on Worktree Switch
Handle Reinitialization Cleanly
Your plugin will be stopped and reinitialized on worktree switch. Ensure:
Stop()releases all resources (watchers, goroutines, channels)Init(ctx)resets state and reads from newctx.WorkDirStart()kicks off fresh async work for the new context
func (p *Plugin) Stop() {
p.stopOnce.Do(func() {
if p.watcher != nil {
p.watcher.Close()
}
close(p.done)
})
}
func (p *Plugin) Init(ctx *plugin.Context) error {
p.ctx = ctx
p.items = nil // Reset state
p.stopOnce = sync.Once{} // Reset stop guard
p.done = make(chan struct{})
return nil
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 217 lines · 74 tokens per session scan A b9aba13b8e04
worktree-switching is a skill published in the GitHub repository marcus/sidecar (1,091 stars, last pushed 11d ago), licensed MIT. It adds 74 tokens to every session and 1,563 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
pre-merge
The quality gate. Takes a feature branch from "eng says done" to "checked, fixed and ready for /merge". Runs the project's preflight-resolved pipeline from devkit/policy.json components[]: sync → parallel correctness + security waves → coverage → regression tail → security/migration → PRD-consistency → verdict. A…
github-app-bot-auth
GitHub App bot authentication — setup, token rotation, and cron refresh for jessinra-megumi-dev[bot].
fix-pr-commit-titles
Bulk-rewrite commit titles on a PR branch to match [LKPR-N] format using filter-branch — avoids per-commit hook re-runs.
github-pr-workflow
GitHub PR lifecycle: branch, commit, open, CI, merge.
proposal-filing
File a new Lorekeeper proposal ticket — create markdown, create GitHub issue, commit, push. Use when requesting a new feature, filing a bug, or submitting a product idea.
commit-convention
Git commit convention for Lorekeeper — enforced by commit-msg hook. Covers author identity, ticket tags, and message format for both PM (Akane) and Dev roles.