Validate environment prerequisites including clean git state, issue existence, gh CLI authentication, and remote accessibility using fast bash checks with no LLM calls. Use when starting any workflow to fail fast before planning begins.
From flownpx claudepluginhub synaptiai/synapti-marketplace --plugin flowThis skill is limited to using the following tools:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Provides guidance on returns authorization, receipt inspection, condition grading, disposition routing, refund processing, fraud detection, and warranty claims in e-commerce operations.
Pure bash validation that runs before any LLM reasoning. Fail fast, save tokens.
NO LLM CALLS IN PRE-FLIGHT. Every check is a bash command with a pass/fail exit code. If pre-flight fails, the workflow stops before spending any tokens on planning.
Run all checks in a single Bash call:
ERRORS=0
WARNINGS=0
# 1. Git state is clean (no uncommitted changes that could conflict)
if [ -n "$(git status --porcelain)" ]; then
echo "PREFLIGHT FAIL: Uncommitted changes detected. Commit or stash before starting."
ERRORS=$((ERRORS+1))
fi
# 2. Not on detached HEAD
if ! git symbolic-ref HEAD >/dev/null 2>&1; then
echo "PREFLIGHT FAIL: Detached HEAD. Checkout a branch first."
ERRORS=$((ERRORS+1))
fi
# 3. gh CLI authenticated
if ! gh auth status >/dev/null 2>&1; then
echo "PREFLIGHT FAIL: gh CLI not authenticated. Run 'gh auth login'."
ERRORS=$((ERRORS+1))
fi
# 4. Issue exists and is open
ISSUE_STATE=$(gh issue view $ARGUMENTS --json state --jq '.state' 2>/dev/null)
if [ "$ISSUE_STATE" != "OPEN" ]; then
echo "PREFLIGHT FAIL: Issue #$ARGUMENTS not found or not open (state: ${ISSUE_STATE:-not found})."
ERRORS=$((ERRORS+1))
fi
# 5. Remote is accessible
if ! git ls-remote --exit-code origin >/dev/null 2>&1; then
echo "PREFLIGHT FAIL: Cannot reach remote 'origin'."
ERRORS=$((ERRORS+1))
fi
# 6. Already on a feature branch for this issue (warning only)
CURRENT_BRANCH=$(git branch --show-current)
if echo "$CURRENT_BRANCH" | grep -q "issue-$ARGUMENTS"; then
echo "PREFLIGHT WARN: Already on branch '$CURRENT_BRANCH' for issue #$ARGUMENTS."
WARNINGS=$((WARNINGS+1))
fi
echo ""
echo "PREFLIGHT RESULT: $ERRORS error(s), $WARNINGS warning(s)"
[ $ERRORS -gt 0 ] && echo "PREFLIGHT: BLOCKED — fix errors above before proceeding." && exit 1
echo "PREFLIGHT: PASSED"
Invoked as Phase 0 of /flow:start before the EXPLORE phase. Substitute $ARGUMENTS with the issue number from command arguments.