Use when contributing fixes to Flux itself or deciding whether a reported Flux issue actually needs a PR. Reproduce first, exhaust setup/workaround causes, and only create a PR for verified product bugs. Triggers on literal `/flux:contribute` and requests like "report a Flux bug" or "contribute a fix to Flux".
From fluxnpx claudepluginhub nairon-ai/flux --plugin fluxThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
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.
---