sidetrack
Skill1 starsChanged 8 months agoMITView on GitHub
Evaluate a side issue discovered during development — analyze root cause, assess coupling with current work, compare fix alternatives, and decide whether to fix now or defer. Usage: /sidetrack [deep] <description>
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- commit-push-prSkill
- decideSkill
- discussSkill
- learnSkill
- mediocreSkill
- researchSkill
- tidy-permissionsSkill
- worktreeSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Quick mode: Run these in parallel:
- Distinctive: line 43
Read only the files that appear in the diffs and are relevant to the reported issue.
- Distinctive: line 47
Read the user's description.
- Distinctive: line 55
Check for similar patterns elsewhere in the codebase
- Distinctive: line 141
After presenting the analysis, wait for the user's decision.
- Distinctive: line 147
Create an isolated worktree (branches from the project's default branch)
- Distinctive: line 149
Commit with a clear message
- Distinctive: line 150
Create a PR targeting the project's default branch
- Distinctive: line 155
Exception: If coupling is High and the fix is in the same files the user is actively editing, ask the user whether to fix in the current …
- Distinctive: line 157
Keep changes minimal and focused — do not refactor surrounding code
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sidetrack — Development Detour Evaluator
You help the user evaluate side issues discovered during active development. When coding on a feature, the user often spots related but distinct problems. Instead of rushing into a fix (which may be suboptimal) or ignoring it (which loses context), this skill provides a structured "stop and think" moment.
How It Works
The user invokes /sidetrack <description> while working on something else. You analyze the side issue in context of their current work and help them decide: fix now, or defer?
Parse the arguments to determine the mode:
/sidetrack <description>— Quick mode (default): fast analysis, concise output/sidetrack deep <description>— Deep mode: thorough investigation with broader impact analysis
Process
Step 1 — Understand Current Context (automatic, silent)
Gather what the user is currently working on. Do this quickly and silently — no output to the user at this step.
Quick mode: Run these in parallel:
git diff --stat HEAD~2..HEAD
git diff --cached --stat
git diff --statDeep mode: Additionally:
git log --oneline -5
git diff HEAD~2..HEAD
git diff --cached
git diffRead only the files that appear in the diffs and are relevant to the reported issue.
Step 2 — Investigate the Side Issue
Read the user's description. Then:
Quick mode:
- Identify the most likely root cause by reading 1-3 relevant files
- Form a mental model of the problem
Deep mode:
- Trace the full code path to understand the root cause
- Check for similar patterns elsewhere in the codebase
- Identify all affected files and downstream impacts
Step 3 — Assess Coupling
Determine how tightly this side issue is connected to the current work:
- High coupling — The issue is in the same files/functions being modified, or the current changes will make it worse / are blocked by it
- Medium coupling — Related area, same feature surface, but technically independent
- Low coupling — Different subsystem, encountered by coincidence
Step 4 — Generate Alternatives
Produce 2-3 solution alternatives with trade-offs.
Quick mode: Brief, 1-2 lines per alternative Deep mode: Detailed implementation approach per alternative, with affected files and effort estimates
Step 5 — Make a Recommendation
Based on coupling assessment and alternatives analysis, recommend one of:
- Fix now — High coupling, small effort, or blocking current work
- Fix now (minimal) — Medium coupling, apply the simplest correct fix to unblock, skip perfection
- Defer — Low coupling, significant effort, or risky to mix with current changes
Output Format
Quick Mode
## Sidetrack: [one-line title]
**Root Cause:** [1-2 sentences explaining why this happens]
**Coupling: [High/Medium/Low]** — [one sentence explaining relationship to current work]
### Alternatives
1. **[Recommended]** [name] — [1-2 sentences, trade-off]
2. [name] — [1-2 sentences, trade-off]
3. [name] — [1-2 sentences, trade-off]
### Recommendation: [Fix now / Fix now (minimal) / Defer]
[1-2 sentences with reasoning]Deep Mode
## Sidetrack: [one-line title]
### Current Context
[Brief summary of what the user is working on, derived from git state]
### Root Cause Analysis
[Detailed explanation with file:line references]
### Coupling: [High/Medium/Low]
[Explanation of how this relates to current work, which files overlap, what risks exist]
### Alternative 1: [name] — Recommended
**Approach:** [step-by-step]
**Affected files:** [list]
**Effort:** [Low/Medium/High]
**Pros:** [list]
**Cons:** [list]
### Alternative 2: [name]
[same structure]
### Alternative 3: [name] (if applicable)
[same structure]
### Recommendation: [Fix now / Fix now (minimal) / Defer]
[Reasoning, including why the other options are less ideal]
### If Deferred
[What to track — suggested issue title and key details to capture]Post-Decision Actions
After presenting the analysis, wait for the user's decision. Then:
If "Fix now" or "Fix now (minimal)"
Default: work in a worktree — Side fixes must not pollute the user's current feature branch. Use Agent(isolation: "worktree") to:
- Create an isolated worktree (branches from the project's default branch)
- Implement the fix there
- Commit with a clear message
- Create a PR targeting the project's default branch
- Return the PR URL to the user
The user's current branch stays untouched.
Exception: If coupling is High and the fix is in the same files the user is actively editing, ask the user whether to fix in the current branch or in a worktree. Default suggestion is still worktree.
- Keep changes minimal and focused — do not refactor surrounding code
If "Defer"
Detect the repo from git remote and create a GitHub issue:
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
gh issue create --repo "$REPO" \
--title "Concise title describing the issue" \
--label "label1,label2" \
--body "$(cat <<'EOF'
## Description
[Clear explanation of the issue]
## Root Cause
[Technical analysis from the sidetrack evaluation]
- `src/path/to/file.ts:42` — [explanation]
## Discovered During
[What was being worked on when this was found, with branch name]
## Suggested Approach
[The recommended fix from the sidetrack evaluation]
## Affected Files
- `src/path/to/file.ts` — [what needs to change]
EOF
)"- Apply labels following the project's label system
- Report the issue number and URL, then return focus to the original work
Rules
- Speed matters — The user is in flow state. Quick mode must be fast. Do not over-investigate.
- No code changes during analysis — Only investigate and report. Code changes come after the user decides.
- Be opinionated — Always include a clear recommendation. The user wants a decision aid, not a neutral essay.
- Respect the current branch — All analysis is in context of what's being developed right now.
- All issue text in English — Titles, descriptions, code comments
- Use
ghCLI for GitHub operations — Not MCP tools - Minimal context gathering — In quick mode, don't read the entire codebase. Diffs + 1-3 targeted file reads are enough.
- Don't over-engineer the fix — When recommending "fix now", prefer the simplest correct solution. The user is already in the middle of something else.
- Read CLAUDE.md — Check for project-specific git workflow rules (branch targets, PR conventions) before creating PRs or issues.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

