.wrangler/memory/knowledge-base/reference-prompts/skills/startup-checklist/SKILL.md
Validates project wrangler version on session start, detects breaking changes, and recommends updates
npx skillsauth add bacchus-labs/wrangler wrangler:startup-checklistInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
MANDATORY: When using this skill, announce it at the start with:
🔧 Using Skill: wrangler:startup-checklist | [brief purpose based on context]
Example:
🔧 Using Skill: wrangler:startup-checklist | [Provide context-specific example of what you're doing]
This creates an audit trail showing which skills were applied during the session.
Run automatically on session start to ensure project is using current wrangler version. Detects breaking changes and provides clear upgrade path.
This skill runs automatically via session hooks. DO NOT manually invoke unless debugging version detection.
Auto-execution: Triggered by hooks/session-start.sh after workspace initialization.
Goal: Determine which version of wrangler the project is currently using.
Locate Constitution File
Check locations in priority order:
# Priority 1: New location (v1.1.0+)
if [ -f ".wrangler/governance/CONSTITUTION.md" ]; then
PROJECT_CONSTITUTION=".wrangler/governance/CONSTITUTION.md"
# Priority 2: Legacy location (v1.0.0)
elif [ -f "specifications/_CONSTITUTION.md" ]; then
PROJECT_CONSTITUTION="specifications/_CONSTITUTION.md"
# No constitution found
else
echo "⚠️ No constitution found. Initialize governance first."
echo " Run: /wrangler:initialize-governance"
exit with WARN status
fi
Extract Version from Frontmatter
Read YAML frontmatter and extract wranglerVersion field:
---
wranglerVersion: "1.1.0"
lastUpdated: "2025-11-18"
---
Fallback behavior:
wranglerVersion field missing → Assume v1.0.0 (pre-versioning era)v1.0.0Validate Version Format
Ensure version follows semantic versioning (e.g., "1.1.0", "2.0.0"):
MAJOR.MINOR.PATCHIf invalid:
⚠️ Invalid version format in constitution: {version}
Expected: X.Y.Z (e.g., 1.1.0)
Fix constitution frontmatter and restart session
Goal: Determine latest available wrangler version.
Locate Plugin Directory
Find wrangler plugin installation:
.claude-plugin/plugin.json to get plugin pathskills/.wrangler-releases/CURRENT_VERSIONRead CURRENT_VERSION File
# Expected location (relative to plugin root)
CURRENT_VERSION_FILE="skills/.wrangler-releases/CURRENT_VERSION"
if [ ! -f "$CURRENT_VERSION_FILE" ]; then
echo "⚠️ Cannot detect wrangler version. Plugin may be corrupted."
echo " Expected: $CURRENT_VERSION_FILE"
echo " Action: Reinstall wrangler plugin"
exit with WARN status
fi
CURRENT_VERSION=$(cat "$CURRENT_VERSION_FILE" | tr -d '[:space:]')
Validate Current Version
Same validation as project version (semantic versioning check).
Goal: Determine if project is up to date, behind, or ahead.
compare_versions() {
local project_ver="$1"
local current_ver="$2"
# Parse versions (split on '.')
IFS='.' read -r -a project <<< "$project_ver"
IFS='.' read -r -a current <<< "$current_ver"
# Compare major version
if [ "${project[0]}" -lt "${current[0]}" ]; then
return 1 # project < current
elif [ "${project[0]}" -gt "${current[0]}" ]; then
return 2 # project > current
fi
# Compare minor version
if [ "${project[1]}" -lt "${current[1]}" ]; then
return 1 # project < current
elif [ "${project[1]}" -gt "${current[1]}" ]; then
return 2 # project > current
fi
# Compare patch version
if [ "${project[2]}" -lt "${current[2]}" ]; then
return 1 # project < current
elif [ "${project[2]}" -gt "${current[2]}" ]; then
return 2 # project > current
fi
return 0 # project == current
}
compare_versions "$PROJECT_VERSION" "$CURRENT_VERSION"
result=$?
case $result in
0)
# Versions match - SUCCESS
→ Skip to Phase 5 (report SUCCESS)
;;
1)
# Project behind current - check breaking changes
→ Continue to Phase 4
;;
2)
# Project ahead of current - unusual case
→ Skip to Phase 5 (report WARN - unusual state)
;;
esac
Goal: Determine if version gap includes breaking changes requiring migration.
List Version Gap
Generate list of all versions between project and current:
# Example: If project=1.0.0, current=1.3.0
# Gap versions: [1.1.0, 1.2.0, 1.3.0]
get_version_gap() {
local start="$1"
local end="$2"
# Parse versions
IFS='.' read -r -a start_parts <<< "$start"
IFS='.' read -r -a end_parts <<< "$end"
# Simple approach: List all release notes between versions
# (Assumes sequential versioning - minor version increments)
versions=()
# For each potential version, check if release note exists
for minor in $(seq $((start_parts[1] + 1)) ${end_parts[1]}); do
candidate="${start_parts[0]}.${minor}.0"
if [ -f "skills/.wrangler-releases/${candidate}.md" ]; then
versions+=("$candidate")
fi
done
echo "${versions[@]}"
}
GAP_VERSIONS=$(get_version_gap "$PROJECT_VERSION" "$CURRENT_VERSION")
Parse Release Notes
For each version in gap, read frontmatter and check breakingChanges field:
check_breaking_changes() {
local versions=("$@")
local breaking_versions=()
for version in "${versions[@]}"; do
release_note="skills/.wrangler-releases/${version}.md"
if [ ! -f "$release_note" ]; then
echo "⚠️ Missing release note: $release_note"
continue
fi
# Extract frontmatter 'breakingChanges' field
breaking=$(grep "^breakingChanges:" "$release_note" | awk '{print $2}')
if [ "$breaking" = "true" ]; then
breaking_versions+=("$version")
fi
done
echo "${breaking_versions[@]}"
}
BREAKING_VERSIONS=$(check_breaking_changes $GAP_VERSIONS)
Categorize Status
if [ -z "$BREAKING_VERSIONS" ]; then
# No breaking changes - optional updates
STATUS="WARN"
MESSAGE="Non-breaking updates available"
else
# Breaking changes exist - migration required
STATUS="OUTDATED"
MESSAGE="Breaking changes detected - migration required"
fi
Goal: Provide clear, actionable output to user.
✅ Wrangler version up to date (v1.1.0)
All systems ready.
When: Project version == Current version
Exit code: 0
⚠️ New wrangler version available
Project: v1.1.0
Latest: v1.2.0
Releases behind: 1
Updates include:
- New skills: [list from release notes]
- Enhancements: [summary from release notes]
No breaking changes detected.
Update is optional but recommended.
To update: Run /update-yourself
When: Project version < Current version AND no breaking changes in gap
Exit code: 0
Details to include:
❌ Wrangler version outdated - breaking changes detected
Project: v1.0.0
Latest: v1.1.0
Releases behind: 1
Breaking changes in:
- v1.1.0: Directory structure refactored to .wrangler/
MIGRATION REQUIRED
Summary of breaking changes:
• All governance files moved from root to .wrangler/
• Constitution now requires wranglerVersion frontmatter
• MCP server paths updated
To migrate: Run /update-yourself
To skip version check: Set WRANGLER_SKIP_VERSION_CHECK=true
WARNING: Skipping migration may cause governance features to fail.
When: Project version < Current version AND breaking changes exist in gap
Exit code: 0 (still allow session to start)
Details to include:
⚠️ Unusual version state detected
Project: v2.0.0
Plugin: v1.1.0
Your project reports a newer wrangler version than the plugin.
Possible causes:
- Plugin needs updating (check for new plugin version)
- Constitution frontmatter manually edited incorrectly
- Project uses unreleased wrangler features
Recommended actions:
1. Check if wrangler plugin has updates available
2. Verify constitution frontmatter is correct
3. Report issue if problem persists
When: Project version > Current version
Exit code: 0
⚠️ No constitution found. Initialize governance first.
Expected locations:
- .wrangler/governance/CONSTITUTION.md (v1.1.0+)
- specifications/_CONSTITUTION.md (v1.0.0)
To initialize: Run /wrangler:initialize-governance
Skipping version check until governance initialized.
When: No constitution found in either location
Exit code: 0 (allow session to start)
⚠️ Cannot detect wrangler version. Plugin may be corrupted.
Expected: skills/.wrangler-releases/CURRENT_VERSION
Found: [none]
Recommended actions:
1. Reinstall wrangler plugin
2. Check plugin installation directory
3. Report issue if reinstall doesn't fix
Skipping version check until plugin repaired.
When: CURRENT_VERSION file missing from plugin
Exit code: 0
Return one of three statuses:
All statuses exit with code 0 to allow session to start normally.
Scenario: Neither .wrangler/governance/CONSTITUTION.md nor specifications/_CONSTITUTION.md exists
Output: ERROR message (see Phase 5)
Signal: WARN
Action: Recommend /wrangler:initialize-governance
Allow session: Yes (exit 0)
Scenario: Plugin installation missing skills/.wrangler-releases/CURRENT_VERSION
Output: ERROR message (see Phase 5)
Signal: WARN
Action: Recommend reinstalling plugin
Allow session: Yes (exit 0)
Scenario: Constitution has wranglerVersion: "invalid" or wranglerVersion: "v1.0.0" (leading 'v')
Output:
⚠️ Invalid version format in constitution: {version}
Expected: X.Y.Z (e.g., 1.1.0)
Found: {actual_value}
Fix constitution frontmatter:
---
wranglerVersion: "1.1.0" # Correct format
---
Assuming v1.0.0 for now.
Signal: WARN
Fallback: Assume v1.0.0
Allow session: Yes (exit 0)
Scenario: Gap version (e.g., 1.2.0) detected but skills/.wrangler-releases/1.2.0.md missing
Output:
⚠️ Missing release note: skills/.wrangler-releases/1.2.0.md
Version gap contains undocumented release
Cannot determine if v1.2.0 has breaking changes.
Assuming breaking changes exist for safety.
Plugin may be corrupted. Consider reinstalling.
Signal: OUTDATED (assume breaking changes for safety)
Allow session: Yes (exit 0)
Type: Boolean (true/false)
Purpose: Completely skip version detection
Usage:
export WRANGLER_SKIP_VERSION_CHECK=true
Effect:
Type: Boolean (true/false)
Purpose: Enable verbose version detection output
Usage:
export WRANGLER_DEBUG_VERSION=true
Debug output includes:
Example:
[DEBUG] Constitution found: .wrangler/governance/CONSTITUTION.md
[DEBUG] Extracted version: "1.1.0"
[DEBUG] Current version: "1.2.0"
[DEBUG] Comparison: 1.1.0 < 1.2.0
[DEBUG] Checking release note: skills/.wrangler-releases/1.2.0.md
[DEBUG] Breaking changes: false
[DEBUG] Status: WARN (non-breaking updates)
This skill is invoked automatically in hooks/session-start.sh:
#!/bin/bash
# Session start hook for wrangler projects
# ... workspace initialization ...
# Run version check (unless skipped)
if [ "$WRANGLER_SKIP_VERSION_CHECK" != "true" ]; then
# Invoke startup-checklist skill
# (Implementation note: skills are invoked via Claude Code's Skill tool)
# This would be done by Claude Code automatically based on skill metadata
# For now, this is a placeholder showing the integration point
echo "Running startup checklist..."
fi
Note: The actual invocation mechanism depends on how Claude Code plugins can trigger skills from bash hooks. This may require:
wrangler-cli run-skill startup-checklist)autoRun: true metadata1. Project at v1.1.0, current v1.1.0 → SUCCESS
Setup:
wranglerVersion: "1.1.0"1.1.0Expected output:
✅ Wrangler version up to date (v1.1.0)
All systems ready.
Status: SUCCESS
2. Project at v1.0.0, current v1.1.0 (breaking) → OUTDATED
Setup:
wranglerVersion: "1.0.0"1.1.0breakingChanges: trueExpected output:
❌ Wrangler version outdated - breaking changes detected
Project: v1.0.0
Latest: v1.1.0
...
Status: OUTDATED
3. Project at v1.1.0, current v1.2.0 (non-breaking) → WARN
Setup:
wranglerVersion: "1.1.0"1.2.0breakingChanges: falseExpected output:
⚠️ New wrangler version available
Project: v1.1.0
Latest: v1.2.0
...
Status: WARN
4. Project at v1.0.0, current v1.3.0 (multiple releases) → OUTDATED
Setup:
wranglerVersion: "1.0.0"1.3.0breakingChanges: truebreakingChanges: falsebreakingChanges: trueExpected output:
❌ Wrangler version outdated - breaking changes detected
Project: v1.0.0
Latest: v1.3.0
Releases behind: 3
Breaking changes in:
- v1.1.0: [description]
- v1.3.0: [description]
...
Status: OUTDATED
5. Constitution missing → WARN
Setup:
Expected output:
⚠️ No constitution found. Initialize governance first.
...
Status: WARN
6. wranglerVersion field missing → Assume v1.0.0
Setup:
wranglerVersion field1.1.0Expected behavior:
wranglerVersion: "1.0.0"Status: OUTDATED (if breaking changes in 1.1.0)
7. CURRENT_VERSION file missing → WARN
Setup:
skills/.wrangler-releases/CURRENT_VERSION missingExpected output:
⚠️ Cannot detect wrangler version. Plugin may be corrupted.
...
Status: WARN
1. User opens Claude Code in project directory
↓
2. Session hook runs (hooks/session-start.sh)
↓
3. Workspace initialization completes
↓
4. Startup skill invoked (automatically)
↓
5. Read project version:
- Check .wrangler/governance/CONSTITUTION.md → Not found
- Check specifications/_CONSTITUTION.md → Found
- Extract frontmatter → No wranglerVersion field
- Assume: v1.0.0
↓
6. Read current version:
- Read skills/.wrangler-releases/CURRENT_VERSION
- Parse: "1.1.0"
↓
7. Compare versions:
- 1.0.0 < 1.1.0
- Project is behind
↓
8. Check for breaking changes:
- Gap versions: [1.1.0]
- Read skills/.wrangler-releases/1.1.0.md
- breakingChanges: true
↓
9. Report status:
- Status: OUTDATED
- Output: ❌ message with migration instructions
↓
10. User sees output and runs /update-yourself
↓
11. Migration instructions displayed
Use semantic versioning comparison:
Edge cases:
Target: Complete version check in <1 second
Optimizations:
Path Traversal: Ensure release note paths are sanitized
skills/.wrangler-releases/1.1.0.mdskills/.wrangler-releases/../../etc/passwdValidation: Check file paths before reading
Backwards Compatibility:
specifications/_CONSTITUTION.mdForward Compatibility:
If startup skill causes issues:
Disable temporarily:
export WRANGLER_SKIP_VERSION_CHECK=true
Report issue: Include debug output (WRANGLER_DEBUG_VERSION=true)
Workaround: Manually update constitution frontmatter to match CURRENT_VERSION
Planned:
Not Planned:
tools
Use when creating technical specifications for features, systems, or architectural designs. Creates comprehensive specification documents using the Wrangler MCP issue management system with proper structure and completeness checks.
testing
Creates and refines agent skills using TDD methodology with pressure testing and rationalization detection. Use when creating new skills, editing existing skills, testing skills with pressure scenarios, or verifying skills work before deployment.
tools
Use when design is complete and you need detailed implementation tasks - creates tracked MCP issues with exact file paths, complete code examples, and verification steps. Optional reference plan file for architecture overview.
development
Validates governance file completeness, format compliance, and metric accuracy. Use when auditing governance health, after bulk changes, or ensuring documentation integrity.