worktree-status
From rtk-ai
Check background cargo check status for a git worktree
Install
/worktree-statusFacts
- Repository
- rtk-ai/rtk
- Status
- Actively maintained
- Last commit
- Model
- haiku
- Source file
- .claude/commands/tech/worktree-status.md
Source preview
The instructions Claude Code reads when this command runs.
# Worktree Status Check
Check the status of the background `cargo check` started by `/worktree`.
## Usage
```bash
/worktree-status feature/new-filter
/worktree-status fix/bug-name
```
## Implementation
Execute this script with branch name from `$ARGUMENTS`:
```bash
#!/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 startedView full source on GitHub →Other slash commands
feature-development
★ 229,918Workflow command scaffold for feature-development in everything-claude-code.
affaan-mupdated 14d agoMITdatabase-migration
★ 229,918Workflow command scaffold for database-migration in everything-claude-code.
affaan-mupdated 14d agoMITadd-language-rules
★ 229,918Workflow command scaffold for add-language-rules in everything-claude-code.
affaan-mupdated 14d agoMITcommit-push-pr
★ 137,934Commit, push, and open a PR
anthropicsupdated 13d agodedupe
★ 137,934Find duplicate GitHub issues
anthropicsupdated 13d agotriage-issue
★ 137,934Triage GitHub issues by analyzing and applying labels
anthropicsupdated 13d ago