flux
Skill0 starsChanged 6 months agoMITView on GitHub
Autonomous skill evolution engine for Claude Code. Discovers, refines, and validates domain-specific skills through iterative failure analysis. Use when user says "/flux evolve", "/flux domains", "/flux inspect", or wants to automatically generate and improve skills for a domain. Do NOT use for general skill authoring — this is specifically for evolutionary skill discovery.
- Deletes or force-pushes
3 other projects use a version of this.
Adopted by
Most recently taken up by
- vibecook-dev/fluxtheir own version, first seen Nov 8, 2026
- AnthonyPoschen/agent-skillstheir own version, first seen Nov 1, 2026
- simota/agent-skillstheir own version, first seen Oct 23, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- simota/agent-skills★ 96same name
- AnthonyPoschen/agent-skills★ 2same name
- vibecook-dev/flux★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
37 rules. About 0 are common, 15 are distinctive, and 22 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
22
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use ultrathink for all decision-making steps (promotion vs rejection, score analysis, iteration planning).
- Distinctive: line 29
If no recognized sub-command, print:
- Distinctive: line 56
Do NOT naively kebab-case the entire description.
- Very specific: line 69
Read ~/.claude/flux/registry.json (create with {"domains": {}} if it doesn't exist).
- Distinctive: line 84
Search the registry for a match:
- Very specific: line 90
Add the current description string to the domain's descriptions array (if not already present)
- Very specific: line 91
If --resume: load state from last completed iteration, continue from next
- Distinctive: line 95
Ask user: "Found similar domain '{matched_id}'.
- Distinctive: line 96
If user picks existing: use that domain's canonical ID and add description alias
- Distinctive: line 97
If user picks new: proceed with derived ID as a new domain
- Very specific: line 106
If DOMAIN_DIR does not exist, create the full directory structure:
- Very specific: line 118
Update ~/.claude/flux/registry.json: add or update the domain entry with the canonical ID and description string.
- Distinctive: line 132
After the agent completes, verify both files exist by reading them.
- Very specific: line 136
Read challenges.json once.
- Very specific: line 150
Read frontier.json for used_training_ids.
- Distinctive: line 151
If all training challenges have been used, reset the used list (cycle).
- Distinctive: line 152
Prefer diversity: pick from different sub-domains and difficulty levels when possible.
- Very specific: line 153
Write selection to {DOMAIN_DIR}/iterations/{i}/training_batch.json.
- Very specific: line 184
Update used_training_ids in frontier.json
- Distinctive: line 185
Write iteration log and continue to next iteration
- Very specific: line 222
Write the validation challenges to {DOMAIN_DIR}/iterations/{i}/validation_batch.json.
- Very specific: line 243
Read validation evaluation.
- Very specific: line 244
Read frontier.json for current score.
- Very specific: line 249
Update frontier.json: set score, add skill to skills list, increment iteration, update used_training_ids
- Very specific: line 259
Write iteration log to {DOMAIN_DIR}/iterations/{i}/log.json with all metadata.
- Distinctive: line 263
After all iterations complete, print:
- Very specific: line 284
Read ~/.claude/flux/domains/.
- Very specific: line 286
Read profile.json for domain description
- Very specific: line 288
Read experience_bank.json for experience count
- Very specific: line 289
Read frontier.json for score and iteration count
- Very specific: line 300
If no domains exist: "No domains evolved yet.
- Very specific: line 308
Read all state files from ~/.claude/flux/domains/{domain}/:
- Very specific: line 316
If domain not found: "Domain '{name}' not found.
- Very specific: line 331
ALL file paths use absolute paths under ~/.claude/flux/ and ~/.claude/skills/
- Distinctive: line 332
NEVER modify these orchestrator instructions
- Distinctive: line 333
ALWAYS report progress after each iteration — the user should see evolution happening in real time
- Distinctive: line 334
When spawning agents, pass complete file paths — agents cannot infer paths
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flux — Autonomous Skill Evolution Engine
You are the Flux orchestrator. You manage an evolutionary loop that discovers and refines Claude Code skills for any domain through failure-driven iteration. Follow these instructions exactly.
Use ultrathink for all decision-making steps (promotion vs rejection, score analysis, iteration planning).
Constants
- FLUX_DIR:
~/.claude/flux - DOMAINS_DIR:
~/.claude/flux/domains - FAILURE_THRESHOLD:
0.7default (scores below this are failures; overridden by--threshold) - DEFAULT_ITERATIONS:
5 - BATCH_SIZE:
3-5challenges per iteration
Argument Parsing
Parse $ARGUMENTS to determine the sub-command:
evolve "domain description" [--iterations N] [--threshold X] [--resume]— Run evolution loopdomains— List all evolved domainsinspect <domain-name> [--challenges]— Show domain details
If no recognized sub-command, print:
Usage:
/flux evolve "domain description" [--iterations N] [--threshold X] [--resume]
/flux domains
/flux inspect <domain-name> [--challenges]
Options:
--iterations N Number of evolution iterations (default: 5)
--threshold X Failure score threshold (default: 0.7). Challenges scoring below this
trigger skill proposals. Raise for strong-baseline domains (e.g. 0.85)
to capture near-miss patterns that would otherwise be ignored.
--resume Continue from last completed iterationSub-command: evolve
Step 1: Initialize Domain
- Extract the domain description (the quoted string after
evolve) - Parse
--iterations N(default: 5) - Parse
--threshold X(default: 0.7, must be between 0.0 and 1.0). Store asFAILURE_THRESHOLD.
1a. Derive Canonical Domain Name
Do NOT naively kebab-case the entire description. Instead, derive a SHORT canonical identifier:
- Extract the core technology/topic + major version (if any) + primary focus area
- Drop filler words (development, engineering, programming, building, working with, etc.)
- Limit to 3-4 slug segments maximum
- Examples:
- "React 19 frontend development" →
react-19-frontend - "React 19 engineer" →
react-19-frontend(same canonical ID) - "Python data pipeline engineering" →
python-data-pipelines - "Building REST APIs with FastAPI" →
fastapi-rest-apis - "TypeScript 5.7 backend development" →
typescript-57-backend
- "React 19 frontend development" →
1b. Check Domain Registry
Read ~/.claude/flux/registry.json (create with {"domains": {}} if it doesn't exist).
The registry maps canonical domain IDs to their metadata:
{
"domains": {
"react-19-frontend": {
"canonical_id": "react-19-frontend",
"descriptions": ["React 19 frontend development"],
"created": "2026-03-18"
}
}
}Search the registry for a match:
- Exact match: The derived canonical ID already exists in the registry.
- Fuzzy match: Another domain shares 2+ slug segments with the derived ID (e.g.,
react-19-frontendmatchesreact-19-fullstackonreact+19). Check each existing domain ID for overlapping segments. - No match: This is a new domain.
If exact match found:
- Add the current description string to the domain's
descriptionsarray (if not already present) - If
--resume: load state from last completed iteration, continue from next - Otherwise: ask user: "Found existing domain '{canonical_id}' (evolved {N} iterations, score {score}). Continue evolving, or start fresh?"
If fuzzy match found:
- Ask user: "Found similar domain '{matched_id}'. Use this existing domain, or create new domain '{derived_id}'?"
- If user picks existing: use that domain's canonical ID and add description alias
- If user picks new: proceed with derived ID as a new domain
If no match: Proceed with derived ID as a new domain. Register it.
1c. Create Domain
Set DOMAIN_DIR = ~/.claude/flux/domains/{canonical_id}/
Set SKILLS_DIR = ~/.claude/skills/{canonical_id}/
If DOMAIN_DIR does not exist, create the full directory structure:
mkdir -p "{DOMAIN_DIR}/iterations" "{DOMAIN_DIR}/staging" "{DOMAIN_DIR}/rejected"
mkdir -p "{SKILLS_DIR}"Initialize state files (only if they don't exist):
frontier.json:{"score": 0, "skills": [], "iteration": 0, "used_training_ids": []}history.json:{"proposals": []}experience_bank.json:{"experiences": []}
Update ~/.claude/flux/registry.json: add or update the domain entry with the canonical ID and description string.
Step 2: Domain Analysis
Skip if profile.json AND challenges.json already exist in DOMAIN_DIR (i.e., resuming).
Spawn the flux-domain-analyst agent:
Domain to analyze: {full domain description}
Output directory: {DOMAIN_DIR}
Generate profile.json and challenges.json for this domain. Write both files to the output directory.
After the agent completes, verify both files exist by reading them. If either is missing, report the error and stop.
Step 3: Evolution Loop
Read challenges.json once. Separate into training and validation sets based on the split field.
Initialize score progression: Read frontier.json. If the current score is > 0 (i.e., resuming a domain with prior evolution), initialize the score progression list with the inherited score as the baseline: [{frontier.score}]. This ensures the display carries over the previous session's score instead of showing 0.00. For new domains, start with an empty list.
Print: "Starting from frontier score: {frontier.score}" (or "Starting fresh (no prior evolution)" if score is 0).
For each iteration i from start to iterations:
Print: "--- Iteration {i}/{N} ---"
Create: mkdir -p "{DOMAIN_DIR}/iterations/{i}"
3a. Select Training Batch
Read frontier.json for used_training_ids. Select 3-5 training challenges NOT in that list.
- If all training challenges have been used, reset the used list (cycle).
- Prefer diversity: pick from different sub-domains and difficulty levels when possible.
- Write selection to
{DOMAIN_DIR}/iterations/{i}/training_batch.json.
3b. Execute Challenges
Collect the list of current skill paths from {SKILLS_DIR} (all SKILL.md files).
Spawn the flux-executor agent:
Challenges file: {DOMAIN_DIR}/iterations/{i}/training_batch.json Current skills directory: {SKILLS_DIR} Output file: {DOMAIN_DIR}/iterations/{i}/solutions.json
Attempt each challenge using any available skills. Write solutions to the output file.
3c. Evaluate Solutions
Spawn the flux-evaluator agent:
Solutions file: {DOMAIN_DIR}/iterations/{i}/solutions.json Challenges file: {DOMAIN_DIR}/iterations/{i}/training_batch.json Output file: {DOMAIN_DIR}/iterations/{i}/evaluation.json
Score each solution against its rubric. Write evaluations to the output file.
3d. Collect Failures
Read {DOMAIN_DIR}/iterations/{i}/evaluation.json.
Collect all evaluations where overall_score < FAILURE_THRESHOLD.
If NO failures (all passed):
- Print:
"Iteration {i}/{N}: all challenges passed (>= {FAILURE_THRESHOLD}) — skipping proposal" - Update
used_training_idsinfrontier.json - Write iteration log and continue to next iteration
If failures exist, proceed to proposal:
3e. Propose Skill
Build a condensed history summary: last 5 entries from history.json with their outcomes.
List current skills: name + description for each skill in {SKILLS_DIR}.
Spawn the flux-proposer agent:
Evaluation file: {DOMAIN_DIR}/iterations/{i}/evaluation.json Domain profile: {DOMAIN_DIR}/profile.json Experience bank: {DOMAIN_DIR}/experience_bank.json History summary: {condensed JSON of last 5 proposals + outcomes} Current skills: {list of name: description pairs} Output file: {DOMAIN_DIR}/iterations/{i}/proposal.json
Analyze failures and propose a skill or experience to address the capability gaps.
3f. Build Candidate
Clear the staging directory: rm -rf "{DOMAIN_DIR}/staging/"*
Spawn the flux-builder agent:
Proposal file: {DOMAIN_DIR}/iterations/{i}/proposal.json Domain profile: {DOMAIN_DIR}/profile.json Experience bank: {DOMAIN_DIR}/experience_bank.json Staging directory: {DOMAIN_DIR}/staging/ Skills directory: {SKILLS_DIR} (reference only — do NOT write here) Output: Write skill to staging directory, experience updates to {DOMAIN_DIR}/staging/experience_bank_updates.json
Materialize the proposal into a proper SKILL.md and experience updates.
3g. Validate Candidate
Write the validation challenges to {DOMAIN_DIR}/iterations/{i}/validation_batch.json.
Spawn flux-executor again:
Challenges file: {DOMAIN_DIR}/iterations/{i}/validation_batch.json Current skills directory: {SKILLS_DIR} Additional skills directory: {DOMAIN_DIR}/staging/ Output file: {DOMAIN_DIR}/iterations/{i}/validation_solutions.json
Attempt validation challenges using current skills PLUS staged skills.
Spawn flux-evaluator again:
Solutions file: {DOMAIN_DIR}/iterations/{i}/validation_solutions.json Challenges file: {DOMAIN_DIR}/iterations/{i}/validation_batch.json Output file: {DOMAIN_DIR}/iterations/{i}/validation_evaluation.json
Score validation solutions against rubrics.
3h. Promote or Reject
Read validation evaluation. Compute new_score = average of all overall_score values.
Read frontier.json for current score.
If new_score > frontier.score:
- PROMOTE: Copy skill folder from
{DOMAIN_DIR}/staging/{skill-name}/to{SKILLS_DIR}/{skill-name}/ - Merge experience updates into
{DOMAIN_DIR}/experience_bank.json - Update
frontier.json: setscore, add skill toskillslist, incrementiteration, updateused_training_ids - Print:
"Iteration {i}/{N}: score {new_score:.2f} (+{delta:.2f}) | new skill: {skill-name}"
If new_score <= frontier.score:
- REJECT: Move skill from staging to
{DOMAIN_DIR}/rejected/{skill-name}-iter{i}/ - Print:
"Iteration {i}/{N}: score {new_score:.2f} (no improvement over {frontier.score:.2f}) | rejected: {skill-name}"
3i. Update State
Append to history.json: the proposal, outcome (promoted/rejected), scores, iteration number.
Write iteration log to {DOMAIN_DIR}/iterations/{i}/log.json with all metadata.
Step 4: Final Summary
After all iterations complete, print:
══════════════════════════════════════
Flux Evolution Complete
══════════════════════════════════════
Domain: {domain name}
Iterations: {completed}/{total}
Score progression: {score per iteration, e.g. 0.45 → 0.62 → 0.71 → 0.78}
Discovered skills: {list of promoted skill names}
Rejected skills: {list of rejected skill names}
Experience bank: {count} entries
Remaining gaps: {common failure modes from last evaluation}
Skills installed: {SKILLS_DIR}
══════════════════════════════════════Sub-command: domains
Read ~/.claude/flux/domains/. For each subdirectory:
- Read
profile.jsonfor domain description - Count skill folders in
~/.claude/skills/{domain}/ - Read
experience_bank.jsonfor experience count - Read
frontier.jsonfor score and iteration count
Print a formatted table:
Domain Skills Experiences Iterations Score Status
─────────────────────────────────────────────────────────────────────────────────
react-19-frontend-development 3 12 5 0.82 active
python-data-pipelines 1 4 3 0.65 activeIf no domains exist: "No domains evolved yet. Run /flux evolve \"domain description\" to start."
Sub-command: inspect
Parse domain name from the argument after inspect.
Read all state files from ~/.claude/flux/domains/{domain}/:
- Profile: domain description, key concepts, sub-domains
- Skills: list each skill in
~/.claude/skills/{domain}/with its description - Experiences: count by tag, show top 5 most recent
- Evolution: iterations completed, score progression from
frontier.json+history.json - If
--challenges: show challenge titles, difficulties, train/validation split, and which have been used
If domain not found: "Domain '{name}' not found. Run /flux domains to see available domains."
Error Handling
- Agent spawn fails: Retry ONCE. If still fails, log the error to the iteration log, skip this iteration, and continue to the next. Print the error to the user.
- Executor can't solve a challenge: Score it as 0.0. This is valuable failure signal for the proposer. Do NOT skip.
- All challenges pass in an iteration: Skip proposal/build steps. Log as "converged batch" and continue.
- Session interrupted mid-iteration: On
--resume, detect incomplete iteration (missing log.json) and restart it from step 3a. - No improvement for 3+ consecutive iterations: Warn user: "Evolution may have plateaued. Consider running with more iterations or refining the domain description."
- File I/O errors: Print the error, do NOT silently continue. The user needs to know.
Critical Rules
- ALL file paths use absolute paths under
~/.claude/flux/and~/.claude/skills/ - NEVER modify these orchestrator instructions
- ALWAYS report progress after each iteration — the user should see evolution happening in real time
- When spawning agents, pass complete file paths — agents cannot infer paths
- State must be persisted AFTER each iteration completes (not batched at the end)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

