Git Worktree StatusCAUTION
The most comprehensive Claude Code guide: agentic workflows, hooks, skills, MCP servers, quizzes, and production-ready templates. 430K+ lines.
Overview
The most comprehensive Claude Code guide: agentic workflows, hooks, skills, MCP servers, quizzes, and production-ready templates. 430K+ lines.
d90170da4369OBSERVED · 2026-10-07What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: git-worktree-status
description: Check status of background verification tasks running in a git worktree
effort: low
when_to_use: "Use to see all active worktrees and their current branch status."
disable-model-invocation: true
---
# Git worktree status
Check background verification tasks (type check, tests, build) launched by `/git-worktree`.
**Core principle:** Non-blocking feedback on worktree health without interrupting development flow.
**Part of:** [Worktree Lifecycle Suite](../../commands/git-worktree.md) | [`/git-worktree`](../../commands/git-worktree.md) | [`/git-worktree-remove`](../../commands/git-worktree-remove.md) | [`/git-worktree-clean`](../../commands/git-worktree-clean.md)
## Process
1. **Detect Current Worktree**: Verify we're inside a git worktree
2. **Check Log Files**: Read `.worktree-logs/` for background task results
3. **Parse Results**: Extract pass/fail counts, errors
4. **Report Status**: Color-coded summary with actionable next steps
## Worktree detection
```bash
# Check if inside a worktree (not main repo)
git rev-parse --git-common-dir 2>/dev/null | grep -q "\.git/worktrees" || {
echo "Not inside a worktree. Use from a worktree directory."
exit 1
}
# Get worktree info
WORKTREE_PATH=$(git rev-parse --show-toplevel)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
MAIN_REPO=$(git rev-parse --git-common-dir | sed 's|/\.git/worktrees/.*||')
```
## Background task checks
### Type check status
```bash
LOG=".worktree-logs/typecheck.log"
if [ -f "$LOG" ]; then
if grep -q "error TS" "$LOG"; then
ERROR_COUNT=$(grep -c "error TS" "$LOG")
echo "Type check: FAIL ($ERROR_COUNT errors)"
# Show first 5 errors
grep "error TS" "$LOG" | head -5
else
echo "Type check: PASS"
fi
elif pgrep -f "tsc --noEmit" > /dev/null; then
echo "Type check: RUNNING..."
else
echo "Type check: NOT RUN"
fi
```
### Test status
```bash
LOG=".worktree-logs/tests.log"
if [ -f "$LOG" ]; then
if grep -q '"numFailedTests":0' "$LOG"; then
TOTAL=$(grep -o '"numTotalTests":[0-9]*' "$LOG" | cut -d: -f2)
echo "Tests: PASS ($TOTAL tests)"
else
FAILED=$(grep -o '"numFailedTests":[0-9]*' "$LOG" | cut -d: -f2)
echo "Tests: FAIL ($FAILED failures)"
# Show failed test names
grep '"fullName"' "$LOG" | head -5
fi
elif pgrep -f "vitest run" > /dev/null; then
echo "Tests: RUNNING..."
else
echo "Tests: NOT RUN"
fi
```
### Build status
```bash
LOG=".worktree-logs/build.log"
if [ -f "$LOG" ]; then
if [ $? -eq 0 ]; then
echo "Build: PASS"
else
echo "Build: FAIL"
tail -10 "$LOG"
fi
elif pgrep -f "cargo build\|next build\|go build" > /dev/null; then
echo "Build: RUNNING..."
else
echo "Build: NOT RUN"
fi
```
## Report format
```
Worktree Status: .worktrees/feat/auth
Branch: feat/auth (from main, 3 commits ahead)
Checks:
Type check: PASS
Tests: PASS (142 tests)
Build: NOT RUN
Dependencies: symlinked from main
Disk usage: 2.3 MB (excl. node_modules)
Log files: .worktree-logs/
```
**If failures detected:**
```
Worktree Status: .worktrees/feat/auth
Branch: feat/auth (from main, 3 commits ahead)
Checks:
Type check: FAIL (3 errors)
src/auth.ts:42 - error TS2345: Argument of type 'string' is not assignable
src/auth.ts:67 - error TS2304: Cannot find name 'AuthConfig'
src/middleware.ts:12 - error TS7006: Parameter 'req' implicitly has an 'any' type
Tests: FAIL (2 failures)
auth.test.ts > should validate token
auth.test.ts > should reject expired token
Build: NOT RUN
Action: Fix type errors before proceeding. Run `npx tsc --noEmit` for full output.
```
## Log management
```bash
# Clean old logs (useful for re-running checks)
rm -rf .worktree-logs/*.log
# Re-run all checks
npx tsc --noEmit > .worktree-logs/typecheck.log 2>&1 &
npx vitest run --reporter=json > .worktree-logs/tests.log 2>&1 &
```
## Quick reference
| Situation | Output |
|-----------|--------|
| All checks pass | Green status, ready to work |
| Checks still running | "RUNNING..." with PID |
| Type errors found | Error count + first 5 errors |
| Test failures | Failure count + failed test names |
| No logs found | "NOT RUN" (use `--fast` or logs deleted) |
| Not in worktree | Error message with instructions |
## Usage
```
/git-worktree-status
```
No arguments needed. Run from inside any worktree directory.Trust audit
CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (2)
whitepapers/recap-cards/en/_extensions
whitepapers/recap-cards/fr/_extensions
Gates applied: no_behavioural_pass.
d90170da4369full audit observations/trust-audit/skill/florianbruniaux__git-worktree-status.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | d90170da4369 | CAUTION | B | 89 | first audit |
Questions
What does the Git Worktree Status skill do?
The most comprehensive Claude Code guide: agentic workflows, hooks, skills, MCP servers, quizzes, and production-ready templates. 430K+ lines.
Is Git Worktree Status safe to install?
With care. The audit graded it B (89/100) and found 2 things worth knowing before you trust this skill, listed below with the exact line each was found on.
What can Git Worktree Status access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (d90170da4369), read on 2026-10-07. The repository is watched, and a new audit runs when it changes — this is the first audit.