/worktree-status
Check background cargo check status for a git worktree
$ npx -y skills add rtk-ai/rtk --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/worktree-status
Context preview
What this command does when you run it.
Check background cargo check status for a git worktree
Command definition
worktree-status.mdmodel: haiku
description: Check background cargo check status for a git worktree
argument-hint: "<branch-name>"
Worktree Status Check
Check the status of the background `cargo check` started by `/worktree`.
Usage
/worktree-status feature/new-filter
/worktree-status fix/bug-name
Implementation
Execute this script with branch name from `$ARGUMENTS`:
#!/bin/bash
set -euo pipefail
BRANCH_NAME="$ARGUMENTS"
LOG_FILE="/tmp/worktree-cargocheck-${BRANCH_NAME//\//-}.log"
if [ ! -f "$LOG_FILE" ]; then
echo "No cargo check found for branch: $BRANCH_NAME"
echo ""
echo "Possible reasons:"
echo "1. Worktree created with --fast (check skipped)"
echo "2. Branch name mismatch (use exact branch name)"
echo "3. Check hasn't started yet (wait a few seconds)"
echo ""
echo "Available logs:"
ls -1 /tmp/worktree-cargocheck-*.log 2>/dev/null || echo " (none)"
exit 1
fi
LOG_CONTENT=$(head -n 500 "$LOG_FILE")
if echo "$LOG_CONTENT" | grep -q "^PASSED"; then
TIMESTAMP=$(echo "$LOG_CONTENT" | grep "^PASSED" | sed 's/PASSED at //')
echo "cargo check passed"
echo " Completed at: $TIMESTAMP"
echo ""
echo "Worktree is ready for development!"
elif echo "$LOG_CONTENT" | grep -q "^FAILED"; then
TIMESTAMP=$(echo "$LOG_CONTENT" | grep "^FAILED" | sed 's/FAILED at //')
echo "cargo check failed"
echo " Completed at: $TIMESTAMP"
echo ""
echo "Errors:"
echo "-------------------------------------"
grep -v "^PASSED\|^FAILED\|^cargo check started" "$LOG_FILE" | head -30
echo "-------------------------------------"
echo ""
echo "Full log: cat $LOG_FILE"
echo ""
echo "You can still work on the worktree - fix errors as you go."
elif echo "$LOG_CONTENT" | grep -q "^cargo check started"; then
START_TIME=$(echo "$LOG_CONTENT" | grep "^cargo check started" | sed 's/cargo check started at //')
CURRENT_TIME=$(date +%H:%M:%S)
echo "cargo check still running..."
echo " Started at: $START_TIME"
echo " Current time: $CURRENT_TIME"
echo ""
echo "Usually takes 5-30s depending on crate size."
echo ""
echo "Live progress: tail -f $LOG_FILE"
else
echo "Unknown state"
echo ""
echo "Log content:"
cat "$LOG_FILE"
fiOutput Examples
Passed
cargo check passed
Completed at: 14:23:45
Worktree is ready for development!
Failed
cargo check failed
Completed at: 14:24:12
Errors:
-------------------------------------
error[E0308]: mismatched types
--> src/git.rs:45:12
|
45 | let x: i32 = "hello";
-------------------------------------
Full log: cat /tmp/worktree-cargocheck-feature-new-filter.log
You can still work on the worktree - fix errors as you go.
Still Running
cargo check still running...
Started at: 14:22:30
Current time: 14:22:45
Usually takes 5-30s depending on crate size.
Live progress: tail -f /tmp/worktree-cargocheck-feature-new-filter.log
Integration
`/worktree` tells you the exact command to check status:
cargo check running in background...
Check status: /worktree-status feature/new-filter
Read more
model: haiku description: Check background cargo check status for a git worktree argument-hint: "<branch-name>"
Worktree Status Check
Check the status of the background `cargo check` started by `/worktree`.
Usage
/worktree-status feature/new-filter /worktree-status fix/bug-name
Implementation
Execute this script with branch name from `$ARGUMENTS`:
#!/bin/bash
set -euo pipefail
BRANCH_NAME="$ARGUMENTS"
LOG_FILE="/tmp/worktree-cargocheck-${BRANCH_NAME//\//-}.log"
if [ ! -f "$LOG_FILE" ]; then
echo "No cargo check found for branch: $BRANCH_NAME"
echo ""
echo "Possible reasons:"
echo "1. Worktree created with --fast (check skipped)"
echo "2. Branch name mismatch (use exact branch name)"
echo "3. Check hasn't started yet (wait a few seconds)"
echo ""
echo "Available logs:"
ls -1 /tmp/worktree-cargocheck-*.log 2>/dev/null || echo " (none)"
exit 1
fi
LOG_CONTENT=$(head -n 500 "$LOG_FILE")
if echo "$LOG_CONTENT" | grep -q "^PASSED"; then
TIMESTAMP=$(echo "$LOG_CONTENT" | grep "^PASSED" | sed 's/PASSED at //')
echo "cargo check passed"
echo " Completed at: $TIMESTAMP"
echo ""
echo "Worktree is ready for development!"
elif echo "$LOG_CONTENT" | grep -q "^FAILED"; then
TIMESTAMP=$(echo "$LOG_CONTENT" | grep "^FAILED" | sed 's/FAILED at //')
echo "cargo check failed"
echo " Completed at: $TIMESTAMP"
echo ""
echo "Errors:"
echo "-------------------------------------"
grep -v "^PASSED\|^FAILED\|^cargo check started" "$LOG_FILE" | head -30
echo "-------------------------------------"
echo ""
echo "Full log: cat $LOG_FILE"
echo ""
echo "You can still work on the worktree - fix errors as you go."
elif echo "$LOG_CONTENT" | grep -q "^cargo check started"; then
START_TIME=$(echo "$LOG_CONTENT" | grep "^cargo check started" | sed 's/cargo check started at //')
CURRENT_TIME=$(date +%H:%M:%S)
echo "cargo check still running..."
echo " Started at: $START_TIME"
echo " Current time: $CURRENT_TIME"
echo ""
echo "Usually takes 5-30s depending on crate size."
echo ""
echo "Live progress: tail -f $LOG_FILE"
else
echo "Unknown state"
echo ""
echo "Log content:"
cat "$LOG_FILE"
fiOutput Examples
Passed
cargo check passed Completed at: 14:23:45 Worktree is ready for development!
Failed
cargo check failed Completed at: 14:24:12 Errors: ------------------------------------- error[E0308]: mismatched types --> src/git.rs:45:12 | 45 | let x: i32 = "hello"; ------------------------------------- Full log: cat /tmp/worktree-cargocheck-feature-new-filter.log You can still work on the worktree - fix errors as you go.
Still Running
cargo check still running... Started at: 14:22:30 Current time: 14:22:45 Usually takes 5-30s depending on crate size. Live progress: tail -f /tmp/worktree-cargocheck-feature-new-filter.log
Integration
`/worktree` tells you the exact command to check status:
cargo check running in background... Check status: /worktree-status feature/new-filter
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Repo: rtk-ai/rtk
Other commands on rtk.
- /clean-worktree
Interactive cleanup of stale worktrees (merged branches, orphaned refs)
Open command - /clean-worktrees
Clean all merged worktrees automatically (no interaction)
Open command - /diagnose
RTK environment diagnostics - Checks installation, hooks, version, command routing
Open command - /audit-codebase
RTK Codebase Health Audit β 7 catΓ©gories scorΓ©es 0-10
Open command - /codereview
RTK Code Review β Review locale pre-PR avec auto-fix
Open command - /remove-worktree
Remove a specific worktree (directory + git reference + branch)
Open command

