Correct
cursor/plugins
Find the mistakes agents keep repeating in this repo and make each one impossible.
This skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax.
$ npx skills add dosco/aithy --skill ax-flow -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install dosco/aithy ax-flow --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/dosco/aithy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ax-flow .claude/skills/ax-flow && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "ax-flow" agent skill from https://github.com/dosco/aithy/tree/main/.claude/skills/ax-flow into .claude/skills/ax-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ax-flow", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/dosco/aithy/tree/main/.claude/skills/ax-flowType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add dosco/aithy --skill ax-flow -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install dosco/aithy ax-flow --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dosco/aithy.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/ax-flow .agents/skills/ax-flow && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ax-flow" agent skill from https://github.com/dosco/aithy/tree/main/.claude/skills/ax-flow into .agents/skills/ax-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ax-flow", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dosco/aithy --skill ax-flow -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install dosco/aithy ax-flow --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dosco/aithy.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/ax-flow .cursor/skills/ax-flow && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ax-flow" agent skill from https://github.com/dosco/aithy/tree/main/.claude/skills/ax-flow into .cursor/skills/ax-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ax-flow", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/dosco/aithy.git --path .claude/skills/ax-flow--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add dosco/aithy --skill ax-flow -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install dosco/aithy ax-flow --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dosco/aithy.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/ax-flow .gemini/skills/ax-flow && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ax-flow" agent skill from https://github.com/dosco/aithy/tree/main/.claude/skills/ax-flow into .gemini/skills/ax-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ax-flow", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install dosco/aithy ax-flowInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add dosco/aithy --skill ax-flow -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/dosco/aithy.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/ax-flow .github/skills/ax-flow && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ax-flow" agent skill from https://github.com/dosco/aithy/tree/main/.claude/skills/ax-flow into .github/skills/ax-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ax-flow", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dosco/aithy --skill ax-flow -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install dosco/aithy ax-flow --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dosco/aithy.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/ax-flow .opencode/skills/ax-flow && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ax-flow" agent skill from https://github.com/dosco/aithy/tree/main/.claude/skills/ax-flow into .opencode/skills/ax-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ax-flow", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ax-flowThis skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax.
Ax Flow is an agent skill from dosco/aithy. This skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax. Use when the user asks about flow(), AxFlow, workflow orchestration, parallel execution, DAG workflows, conditional routing, map/reduce patterns, or multi-node AI pipelines.
Its SKILL.md is about 6.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: A personal AI agent that can work safely on your machine, remember useful context, and keep its data under your control. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 0c9855f. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
raw.githubusercontent.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Ax Flow loads about 6.8k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 1,426 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from dosco/aithy at commit 0c9855f, republished under its Apache-2.0 licence (© dosco). 1,426 words, ~6,769 tokens.
.claude/skills/ax-flow/SKILL.md (or your agent's skills folder).Use this skill to generate AxFlow workflow code. Prefer short, modern, copyable patterns. Do not write tutorial prose unless the user explicitly asks for explanation.
flow() factory, not new AxFlow().import { ai, flow, f } from '@ax-llm/ax';autoParallel: true is the default; independent executes and derives run in parallel when their metadata reads/writes are known and non-conflicting.${nodeName}Result in state..node() before .execute() for that node..returns() (or .r()) as the last step to lock the output type.documentSummarizer, not proc1.userInput, responseText, not text, result.flow() factory syntax for new code.state.${nodeName}Result.${fieldName}..execute() maps current state to node inputs; .map() transforms state without AI calls..returns() maps final state to the flow output type..map().flow<InputType, OutputType>() for typed flows..n() = .node(), .nx() = .nodeExtended(), .m() = .map(), .r() = .returns().import { ai, flow } from '@ax-llm/ax';
const llm = ai({ name: 'openai', apiKey: process.env.OPENAI_APIKEY! });
const wf = flow<{ userInput: string }, { responseText: string }>()
.node('testNode', 'userInput:string -> responseText:string')
.execute('testNode', (state) => ({ userInput: state.userInput }))
.returns((state) => ({ responseText: state.testNodeResult.responseText }));
const result = await wf.forward(llm, { userInput: 'Hello world' });
console.log(result.responseText);// Basic
const wf = flow();
// With options
const wf = flow({ autoParallel: false });
// Typed
const wf = flow<InputType, OutputType>();
// Typed with options
const wf = flow<InputType, OutputType>({ autoParallel: true, batchSize: 5 });State grows with each executed node. Results are stored as ${nodeName}Result:
// Initial state: { userInput: 'Hello' }
flow.execute('processor', (state) => ({ input: state.userInput }));
// State: { userInput: 'Hello', processorResult: { output: '...' } }
flow.execute('analyzer', (state) => ({ text: state.processorResult.output }));
// State: { ..., analyzerResult: { sentiment: '...', confidence: 0.8 } }// String signature (creates AxGen automatically)
flow.node('processor', 'input:string -> output:string');
// Multiple outputs
flow.node('analyzer', 'text:string -> sentiment:string, confidence:number');
// Array outputs
flow.node('extractor', 'documentText:string -> entities:string[]');
// Short alias
flow.n('processor', 'input:string -> output:string');Node signatures accept the full extended string grammar — constraint bags, class decisions, optional fields, and nested objects (full modifier table in the ax-signature skill):
flow
.node('triage', 'ticketText:string -> ticketClass:class "bug, billing, question", severityScore:number(min 1, max 5)')
.node('draft', 'ticketText:string, ticketClass:string, severityScore:number -> replyText:string(max 400)')
.node('audit', 'replyText:string -> approved:boolean, flaggedSpans:object{ spanText:string, reasonNote:string }[]');class is output-only: a downstream node consuming the decision declares it :string.note?:string), never after the type.toString() serializes these contracts losslessly into %%ax directives, so rich contracts survive the diagram round-trip.Add fields to a base signature without rewriting it:
import { f, flow } from '@ax-llm/ax';
// Chain-of-thought reasoning
flow.nx('reasoner', 'question:string -> answer:string', {
prependOutputs: [
{ name: 'reasoning', type: f.internal(f.string('Step-by-step reasoning')) },
],
});
// Add confidence scoring
flow.nx('analyzer', 'input:string -> result:string', {
appendOutputs: [{ name: 'confidence', type: f.number('Confidence 0-1') }],
});
// Add optional context input
flow.nx('processor', 'query:string -> response:string', {
appendInputs: [{ name: 'context', type: f.optional(f.string('Extra context')) }],
});Extension options: prependInputs, appendInputs, prependOutputs, appendOutputs.
flow.execute('summarizer', (state) => ({ documentText: state.document }));
// With AI override (use a different model for this node)
flow.execute('processor', (state) => ({ input: state.data }), { ai: alternativeAI });Use map() for data shaping without AI calls:
// Sync
flow.map((state) => ({ ...state, upperText: state.rawText.toUpperCase() }));
// Async
flow.map(async (state) => {
const data = await fetchFromAPI(state.query);
return { ...state, enrichedData: data };
});
// Parallel async transforms
flow.map([
async (state) => ({ ...state, result1: await api1(state.data) }),
async (state) => ({ ...state, result2: await api2(state.data) }),
], { parallel: true });const wf = flow<{ input: string }>()
.map((state) => ({ ...state, upper: state.input.toUpperCase(), len: state.input.length }))
.returns((state) => ({ upper: state.upper, isLong: state.len > 20 }));
// Result is typed as { upper: string; isLong: boolean }
const result = await wf.forward(llm, { input: 'test' });const wf = flow<{ input: string }, { finalResult: string }>()
.node('step1', 'input:string -> intermediate:string')
.node('step2', 'intermediate:string -> output:string')
.execute('step1', (state) => ({ input: state.input }))
.execute('step2', (state) => ({ intermediate: state.step1Result.intermediate }))
.returns((state) => ({ finalResult: state.step2Result.output }));Independent execute steps run in parallel automatically (autoParallel: true by default) when their metadata reads/writes are known and non-conflicting:
const wf = flow<{ text: string }, { combined: string }>()
.node('sentimentAnalyzer', 'text:string -> sentiment:string')
.node('topicExtractor', 'text:string -> topics:string[]')
.node('entityRecognizer', 'text:string -> entities:string[]')
// These three run in parallel (all depend only on state.text)
.execute('sentimentAnalyzer', (state) => ({ text: state.text }))
.execute('topicExtractor', (state) => ({ text: state.text }))
.execute('entityRecognizer', (state) => ({ text: state.text }))
// This waits for all three
.returns((state) => ({
combined: JSON.stringify({
sentiment: state.sentimentAnalyzerResult.sentiment,
topics: state.topicExtractorResult.topics,
entities: state.entityRecognizerResult.entities,
}),
}));
// Inspect execution plan
const plan = wf.getExecutionPlan();
console.log(plan.parallelGroups, plan.maxParallelism);Planner rules:
.execute() and .derive() steps may parallelize..map(), .returns(), .branch(), .while(), .feedback(), and explicit .parallel() are barriers.autoParallel: false when you need strict sequential execution.Disable auto-parallel:
const wf = flow({ autoParallel: false });
// or per execution:
await wf.forward(llm, input, { autoParallel: false });const wf = flow<{ query: string; expertMode: boolean }, { response: string }>()
.node('simple', 'query:string -> response:string')
.node('expert', 'query:string -> response:string')
.branch((state) => state.expertMode)
.when(true)
.execute('expert', (state) => ({ query: state.query }))
.when(false)
.execute('simple', (state) => ({ query: state.query }))
.merge()
.returns((state) => ({
response: state.expertResult?.response ?? state.simpleResult?.response,
}));After .merge(), only the taken branch's result exists; use optional chaining (?.) on untaken branch results.
const wf = flow<{ content: string }, { finalContent: string }>()
.node('processor', 'content:string -> processedContent:string')
.node('qualityChecker', 'content:string -> qualityScore:number')
.map((state) => ({ currentContent: state.content, iteration: 0, qualityScore: 0 }))
.while((state) => state.iteration < 3 && state.qualityScore < 0.8)
.map((state) => ({ ...state, iteration: state.iteration + 1 }))
.execute('processor', (state) => ({ content: state.currentContent }))
.execute('qualityChecker', (state) => ({
content: state.processorResult.processedContent,
}))
.map((state) => ({
...state,
currentContent: state.processorResult.processedContent,
qualityScore: state.qualityCheckerResult.qualityScore,
}))
.endWhile()
.returns((state) => ({ finalContent: state.currentContent }));Rules:
.while() needs a matching .endWhile().const wf = flow<{ prompt: string }, { result: string }>()
.node('gen', 'prompt:string -> result:string, quality:number')
.map((state) => ({ ...state, tries: 0 }))
.label('retry')
.map((state) => ({ ...state, tries: state.tries + 1 }))
.execute('gen', (state) => ({ prompt: state.prompt }))
.feedback((state) => state.genResult.quality < 0.9 && state.tries < 3, 'retry')
.returns((state) => ({ result: state.genResult.result }));Rules:
.feedback().flow
.parallel([
(sub) => sub.execute('analyzer1', (state) => ({ text: state.input })),
(sub) => sub.execute('analyzer2', (state) => ({ text: state.input })),
(sub) => sub.execute('analyzer3', (state) => ({ text: state.input })),
])
.merge('combinedResults', (r1, r2, r3) => ({
a1: r1.analyzer1Result.analysis,
a2: r2.analyzer2Result.analysis,
a3: r3.analyzer3Result.analysis,
}));const wf = flow<{ items: string[] }, { processed: string[] }>({ batchSize: 3 })
.derive('processed', 'items', (item, index) => `processed-${item}-${index}`, {
batchSize: 2,
});Route nodes to different AI providers:
const fast = ai({ name: 'openai', apiKey: '...', config: { model: 'gpt-5.4-mini' } });
const smart = ai({ name: 'anthropic', apiKey: '...' });
const wf = flow<{ text: string }, { out: string }>()
.node('draft', 'text:string -> out:string')
.node('refine', 'text:string -> out:string')
.execute('draft', (state) => ({ text: state.text }), { ai: fast })
.execute('refine', (state) => ({ text: state.draftResult.out }), { ai: smart })
.returns((state) => ({ out: state.refineResult.out }));const wf = flow<{ userQuestion: string }, { responseText: string }>()
.node('qa', 'userQuestion:string -> responseText:string')
.execute('qa', (state) => ({ userQuestion: state.userQuestion }))
.returns((state) => ({ responseText: state.qaResult.responseText }))
.description('Question Answerer', 'Answers user questions concisely.');
const fn = wf.toFunction();
// fn.name, fn.parameters (JSON Schema), fn.funcimport { ai, flow } from '@ax-llm/ax';
import { context, trace } from '@opentelemetry/api';
const tracer = trace.getTracer('axflow');
const llm = ai({ name: 'openai', apiKey: '...' });
const wf = flow<{ userQuestion: string }>()
.node('summarizer', 'documentText:string -> summaryText:string')
.execute('summarizer', (s) => ({ documentText: s.userQuestion }))
.returns((s) => ({ answer: s.summarizerResult.summaryText }));
const result = await wf.forward(llm, { userQuestion: 'hi' }, {
tracer,
traceContext: context.active(),
});Flow tracing also respects live app-wide defaults:
import { axGlobals } from '@ax-llm/ax';
import { metrics } from '@opentelemetry/api';
axGlobals.tracer = tracer;
axGlobals.meter = metrics.getMeter('axflow');
axGlobals.rateLimiter = async (next, info) => next();
const result = await wf.forward(llm, { userQuestion: 'hi' });Rules:
wf.forward(..., { rateLimiter, tracer, meter }) overrides flow defaults and axGlobals.axGlobals.AxFlow carries the resolved hooks to every explicit, generated, extended, and Mermaid node, including branches, loops, feedback bodies, parallel groups, and nested flows or agents. It does not modify child programs, and it restores the run scope on success, failure, cancellation, and stream termination.getMetrics() state.axGlobals.abortSignal is merged with flow-level abort signals.const wf = flow<{ input: string }>()
.node('summarizer', 'text:string -> summary:string')
.node('classifier', 'text:string -> category:string');
// Discover program IDs
console.log(wf.namedPrograms());
// [{ id: 'root.summarizer', ... }, { id: 'root.classifier', ... }]
// Set demos (TypeScript catches typos)
wf.setDemos([{ programId: 'root.summarizer', traces: [] }]);
// Apply optimization
wf.applyOptimization(optimizedProgram);For tuning a flow, use top-level optimize(wf, train, metric, options) from the
ax-gepa skill. There is no separate flow.optimize(...) helper.
AxFlow.getChatLog() returns a flat readonly AxChatLogEntry[] after forward(). Each child-node entry is tagged with entry.name so callers can filter by node:
const log = wf.getChatLog();
for (const entry of log) {
console.log(entry.name, entry.model);
}try {
const result = await wf.forward(llm, input);
} catch (error) {
console.error('Flow execution failed:', error);
}Common errors:
"Node 'x' not found" -- define .node() before .execute()."endWhile() without matching while()" -- every .while() needs .endWhile()."when() without matching branch()" -- .when() must be inside .branch()/.merge()."merge() without matching branch()" -- every .branch() needs .merge()."Label 'x' not found" -- define .label() before .feedback() references it.Use ax-mcp for MCP client construction, transport/authentication policy,
subscriptions, tasks, event routing, and replay. This section covers how Flow
inherits and coordinates the resulting live execution context.
Set mcp/ucp on the flow or a node. Sequential nodes reuse sessions; parallel nodes multiplex through each client's concurrency policy. Branch cancellation and flow aborts propagate to outstanding requests and newly created remote tasks. Structured protocol values stay structured in flow state.
const wf = flow({ mcp: [inventory], ucp: [merchant] })
.node('lookup', lookupProgram)
.node('checkout', checkoutProgram, { mcpInheritance: ['merchant'] });A whole flow can be written as (or exported to) a mermaid flowchart. Pass the
diagram string straight to flow() — a string argument compiles the AxFlow
mermaid dialect into a runnable flow (an options object still constructs an
empty builder). String(wf) / wf.toString() renders any flow back, so
flow(String(wf)) round-trips.
import { flow } from '@ax-llm/ax';
const wf = flow<{ documentText: string }, { finalReport: string }>(`
flowchart TD
%%ax summarize: documentText:string -> summaryText:string(max 500)
%%ax check: summaryText:string -> verdict:class "pass, fail", note?:string
%%ax format: summaryText:string, note?:string -> finalReport:string
summarize[Summarize document] --> check{verdict}
check -->|pass| format
check -->|fail, max 3| summarize
`);
const { finalReport } = await wf.forward(llm, { documentText });
console.log(String(wf)); // render back to the same dialectDialect:
%%ax nodeId: <signature> comment directives carry node contracts (mermaid renderers ignore them); the full string-signature grammar applies (? optional on the name, constraint bags, object{ ... }).nodeId{field} names a class decision; its labeled out-edges (-->|pass|) become branches. A back-edge is a loop: -->|label, max N| is feedback, -->|while cond, max N| is a while loop.Render options and bindings:
wf.toString({ direction: 'LR' }) when you need render options; bare String(wf) uses defaults (flowchart TD).bindings supplies closures the dialect can't inline: { nodes: { normalize: (s) => ({...}) }, conditions: { keepGoing: (s) => ... } } for map steps and while conditions.Every diagram below compiles with flow(text) as written (the while loop additionally needs its conditions binding).
Linear pipeline — three nodes auto-wired by field name:
flowchart TD
%%ax extract: contractText:string -> parties:string[], effectiveDate?:string(format date)
%%ax summarize: contractText:string, parties:string[] -> summaryText:string(max 300)
%%ax redline: summaryText:string -> riskNotes:string(item "one risk")[]
extract --> summarize --> redlineDecision branch — a class diamond routes to per-branch responders, then re-joins:
flowchart TD
%%ax classify: requestText:string -> routeClass:class "support, sales"
%%ax supportReply: requestText:string -> replyText:string(max 300)
%%ax salesReply: requestText:string -> replyText:string(max 300)
%%ax send: replyText:string -> deliveredReply:string
classify{routeClass}
classify -->|support| supportReply
classify -->|sales| salesReply
supportReply --> send
salesReply --> sendRetry loop — a reviewer sends drafts back with a capped revise edge:
flowchart TD
%%ax draft: briefText:string -> articleText:string(max 800)
%%ax review: articleText:string -> verdict:class "publish, revise", editorNote?:string
%%ax publish: articleText:string, editorNote?:string -> finalPost:string
draft --> review{verdict}
review -->|publish| publish
review -->|revise, max 2| draftFan-out / fan-in — two perspectives run in parallel, then a judge joins them:
flowchart TD
%%ax outline: topicText:string -> questionText:string
%%ax proponent: questionText:string -> proArgument:string
%%ax skeptic: questionText:string -> conArgument:string
%%ax judge: proArgument:string, conArgument:string -> verdictSummary:string
outline --> proponent & skeptic
proponent & skeptic --> judgeWhile loop — repeat until a host-owned condition says stop (flow(text, { conditions: { keepPolishing } })):
flowchart TD
%%ax polish: draftText:string -> polishedText:string
%%ax grade: polishedText:string -> qualityScore:number(min 0, max 1)
polish --> grade
grade -->|while keepPolishing, max 5| polishThree-way branch and re-join — triage routes to one of three handlers before delivery:
flowchart TD
%%ax triage: ticketText:string -> ticketClass:class "bug, billing, question"
%%ax bugHandler: ticketText:string -> replyText:string(max 300)
%%ax billingHandler: ticketText:string -> replyText:string(max 300)
%%ax questionHandler: ticketText:string -> replyText:string(max 300)
%%ax send: replyText:string -> deliveredReply:string
triage{ticketClass}
triage -->|bug| bugHandler
triage -->|billing| billingHandler
triage -->|question| questionHandler
bugHandler --> send
billingHandler --> send
questionHandler --> sendJudge panel — three independent drafts fan out, then converge on one verdict:
flowchart TD
%%ax outline: topicText:string -> outlineText:string
%%ax draftA: outlineText:string -> draftAText:string
%%ax draftB: outlineText:string -> draftBText:string
%%ax draftC: outlineText:string -> draftCText:string
%%ax judge: draftAText:string, draftBText:string, draftCText:string -> verdictText:string
outline --> draftA & draftB & draftC
draftA & draftB & draftC --> judgeEscalation ladder — a quality gate either sends the first answer or falls back to level two:
flowchart TD
%%ax l1Answer: ticketText:string -> answerText:string
%%ax qualityGate: answerText:string -> verdict:class "pass, escalate"
%%ax l2Answer: ticketText:string -> answerText:string
%%ax send: answerText:string -> deliveredAnswer:string
l1Answer --> qualityGate{verdict}
qualityGate -->|pass| send
qualityGate -->|escalate| l2Answer --> sendItinerary planner — rich contracts stay attached to a simple linear graph:
flowchart TD
%%ax parse: requestText:string -> destinationName:string, stayWindow:dateRange, travelerCount:number(min 1, max 12), budgetUsd?:number(min 0)
%%ax plan: destinationName:string, stayWindow:dateRange, travelerCount:number, budgetUsd?:number -> itineraryItems:object{ dayNumber:number(min 1), activityText:string }[]
%%ax price: itineraryItems:object{ dayNumber:number, activityText:string }[], travelerCount:number -> estimatedTotalUsd:number(min 0), bookingNotes?:string(max 300)
parse --> plan --> priceFan-out with capped revision — two sections join, then review can send the assembly back twice:
flowchart TD
%%ax outline: briefText:string -> outlineText:string
%%ax sectionA: outlineText:string -> sectionAText:string
%%ax sectionB: outlineText:string -> sectionBText:string
%%ax assemble: sectionAText:string, sectionBText:string -> articleText:string
%%ax review: articleText:string -> verdict:class "approve, revise", reviewNote?:string
%%ax publish: articleText:string, reviewNote?:string -> publishedArticle:string
outline --> sectionA & sectionB
sectionA & sectionB --> assemble --> review{verdict}
review -->|approve| publish
review -->|revise, max 2| assembleFetch these for full working code:
An AxFlow is an AxProgrammable event target. The runtime maps an event into
the Flow's typed initial state and propagates eventContext, cancellation, and
idempotency metadata to every node. Abandoned branches still use normal Flow
cancellation semantics.
Task-backed MCP tools called by a Flow node register a continuation on the
shared event context. axMCPEventRoutes observes progress and resumes the Flow
on input-required or terminal task notifications.
For resource-driven wake, discover the endpoint with inspectCatalog() and
give AxMCPEventSource an explicit resourceSubscriptions policy. Managed
subscriptions reconcile list changes and reconnect separately from the Flow;
subscription alone never starts or resumes a Flow.
UCP lifecycle webhooks use the same continuation boundary through
AxUCPWebhookEventSource. Correlate on ucp.checkout or ucp.order only after
the signed request has been verified and mapped to application identity.
Use eventTarget('id').program(flow).wakeInput(...).resumeInput(...) when wake
and resume events have different shapes. Segment-safe eventPath mappings are
validated against the Flow signature before any node executes; a declarative
.waitFor(kind, path) creates the owned continuation consumed by the resume
route.
Reusable eventInput() plans are the preferred callback-free boundary.
Callback mapInput is normalized against the Flow signature before any node
runs. In generated hosts, immediate publications dispatch inline; the host uses
nextDueAt() and runDue() for delayed retries, debounce, and continuation
expiry.
new AxFlow(...) for new code..node()..mapOutput() or .mo()..returns() for the final output contract.text, result, data, input, output..map()..merge().© dosco, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/ax-flow of dosco/aithy.
Open the folder on GitHubat commit 0c9855f
Ax Flow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ax Flow this skilldosco/aithy | 107 | — | ~6.8k | Automated safety check: Pass | Apache-2.0 | |
| Correctcursor/plugins | 10k | 3 repos | ~612 | Automated safety check: Pass | None | |
| CorrectionNxcoreAI/EverRoom | 3k | — | ~290 | Automated safety check: Pass | Custom licence | |
| Correction Root-Cause Pipelinegarrytan/gbrain | 31k | — | ~3.4k | Automated safety check: Pass | MIT | |
| Audit Correctness Proofben-manes/caffeine | 18k | — | ~275 | Automated safety check: Pass | Apache-2.0 | |
| Review Hog Perspective Logic CorrectnessPostHog/posthog | 40k | — | ~988 | Automated safety check: Pass | Custom licence |
cursor/plugins
Find the mistakes agents keep repeating in this repo and make each one impossible.
NxcoreAI/EverRoom
Compute Room overview corrections—citation corrections as per-claim edits and general corrections as a single proposal.
garrytan/gbrain
Traces a factual error the user points out back to its source (a brain page, a memory file, SOUL.md or USER.md, or a hallucination) and fixes that source instead of just noting the correction.
ben-manes/caffeine
Attempt formal correctness proofs for all public cache methods
PostHog/posthog
The Logic & Correctness review perspective for PostHog Review.
udecode/plate
Always-on code-review persona. An agent skill from udecode/plate.
dosco/aithy
This skill helps an LLM generate correct AxAgent observability code using @ax-llm/ax.
dosco/aithy
This skill helps an LLM generate correct AxAgent tuning and evaluation code using @ax-llm/ax.
dosco/aithy
This skill helps an LLM generate correct audio code with @ax-llm/ax.
dosco/aithy
This skill helps an LLM generate correct AxGEPA optimization code using @ax-llm/ax.
dosco/aithy
This skill helps with using the @ax-llm/ax TypeScript library for building LLM applications.
dosco/aithy
This skill helps an LLM build correct native Model Context Protocol integrations with @ax-llm/ax.
This skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax. Ax Flow is an agent skill from dosco/aithy. This skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax.
Ax Flow fits situations like: the user asks about flow(); workflow orchestration; parallel execution; conditional routing.
Run `npx skills add dosco/aithy --skill ax-flow -a claude-code`. Or copy the skill folder (.claude/skills/ax-flow in dosco/aithy) into .claude/skills/ax-flow in your project. Claude Code loads it when a task matches its description.
Run `npx skills add dosco/aithy --skill ax-flow -a codex`. Or copy the skill folder (.claude/skills/ax-flow in dosco/aithy) into .agents/skills/ax-flow in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dosco/aithy --skill ax-flow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ax-flow, .gemini/skills/ax-flow, .github/skills/ax-flow and .opencode/skills/ax-flow in your project.
SKILL.md names no scripts, command-line tools or credentials: Ax Flow is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: raw.githubusercontent.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Ax Flow is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 6.8k tokens (SKILL.md is roughly 27k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Ax Flow: Correct (cursor/plugins, 10k stars), Correction (NxcoreAI/EverRoom, 3k stars), Correction Root-Cause Pipeline (garrytan/gbrain, 31k stars) and Audit Correctness Proof (ben-manes/caffeine, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
dosco (a GitHub user) maintains it in dosco/aithy, which has 107 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on August 31, 2026.
Source: dosco/aithy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.