From flux
Rigorous bug analysis and PR creation for Flux. Reproduces issues, exhausts setup/workaround causes, and only creates a PR for verified product bugs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/flux:flux-contributeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Rigorous bug analysis and PR creation for Flux. **PRs are a last resort, not a first action.**
Rigorous bug analysis and PR creation for Flux. PRs are a last resort, not a first action.
Role: debugger first, PR creator second Goal: solve the user's problem — only create PR if Flux itself is broken
On entry, set the session phase:
PLUGIN_ROOT="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}}"
[ ! -d "$PLUGIN_ROOT/scripts" ] && PLUGIN_ROOT=$(ls -td ~/.claude/plugins/cache/nairon-flux/flux/*/ 2>/dev/null | head -1)
FLUXCTL="${PLUGIN_ROOT}/scripts/fluxctl"
$FLUXCTL session-phase set contribute
On completion, reset:
$FLUXCTL session-phase set idle
Issue description: $ARGUMENTS
gh CLI installed and authenticated (gh auth status)Do NOT skip this phase. Do NOT create a PR yet.
Questions to answer:
.flux/ directory?Try these first before considering a PR:
User error? → Guide them to correct usage
/flux:setup firstConfiguration issue? → Help them fix their config
.flux/config.json misconfiguredKnown limitation? → Explain the limitation
Can be worked around? → Provide workaround
If any of the above solve the problem, STOP HERE. No PR needed.
Only proceed if ALL of these are true:
Ask the user to confirm before proceeding:
mcp_question({
questions: [{
header: "Create PR?",
question: "I've identified this as a genuine Flux bug that requires a code change. Should I create a PR to fix it?",
options: [
{ label: "Yes, create PR", description: "I'll clone Flux, make the fix, and submit a PR" },
{ label: "No, let me try something else", description: "I want to investigate more first" },
{ label: "Just show me the fix", description: "Show what would need to change, I'll handle it" }
]
}]
})
If user says no or wants to see the fix first, provide guidance without creating PR.
Flux structure:
flux/
├── commands/flux/ # Command entry points (invoke skills)
├── skills/ # Skill implementations (the logic)
│ └── flux-*/SKILL.md # Main skill file
│ └── flux-*/workflow.md # Step-by-step instructions
├── agents/ # Scout agents for /flux:prime
├── scripts/ # Python/bash utilities
├── docs/ # Documentation
└── README.md # Main docs
Before writing any code:
Clone Flux repo:
FLUX_REPO="/tmp/flux-fix-$(date +%s)"
gh repo clone Nairon-AI/flux "$FLUX_REPO"
cd "$FLUX_REPO"
Create branch:
BRANCH="fix/$(echo "$ISSUE_SLUG" | tr ' ' '-' | tr '[:upper:]' '[:lower:]' | head -c 40)"
git checkout -b "$BRANCH"
Make the fix, then TEST IT:
# Run the flux test suite
bun test
# Or at minimum, verify the specific fix works
# by checking the changed file makes sense
Do NOT proceed if tests fail or fix doesn't work.
Commit:
git add -A
git commit -m "fix: $ISSUE_SUMMARY
- Root cause: $ROOT_CAUSE
- Fix: $WHAT_WAS_CHANGED
- Tested: $HOW_IT_WAS_VERIFIED"
Push and create PR:
git push -u origin "$BRANCH"
gh pr create \
--repo Nairon-AI/flux \
--title "fix: $ISSUE_SUMMARY" \
--body "## Problem
$ISSUE_DESCRIPTION
## Root Cause
$ROOT_CAUSE_ANALYSIS
## Solution
$FIX_DESCRIPTION
## Testing
- [ ] Reproduced the issue before fix
- [ ] Verified fix resolves the issue
- [ ] Checked for regressions
## How to Verify
1. Upgrade Flux from the same source you installed it from
2. Test: $VERIFICATION_STEPS
---
*Created via /flux:contribute*"
Show:
Once merged, upgrade with:
/flux:upgrade
ALWAYS run at the very end of command execution:
PLUGIN_ROOT="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}}"
[ ! -d "$PLUGIN_ROOT/scripts" ] && PLUGIN_ROOT=$(ls -td ~/.claude/plugins/cache/nairon-flux/flux/*/ 2>/dev/null | head -1)
UPDATE_JSON=$("$PLUGIN_ROOT/scripts/version-check.sh" 2>/dev/null || echo '{"update_available":false}')
UPDATE_AVAILABLE=$(echo "$UPDATE_JSON" | jq -r '.update_available')
LOCAL_VER=$(echo "$UPDATE_JSON" | jq -r '.local_version')
REMOTE_VER=$(echo "$UPDATE_JSON" | jq -r '.remote_version')
If update available, append to output:
---
Flux update available: v${LOCAL_VER} → v${REMOTE_VER}
Update Flux from the same source you installed it from, then restart your agent session.
---
npx claudepluginhub nairon-ai/flux --plugin fluxGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.