flow
Compute current attention gaps from source facts, review them at /gaps, and explicitly apply one revision-bound action with a durable verification receipt.
by hyper-code-harness★ 22 GitHub stars
Install flow in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Gaps / flow
Canonical declarations are $gap_<name>.ts, plain async functions anywhere in mounted src/ or .hyper/ roots. Namespace flow is the generic runner, not a workflow engine. Open /gaps (global navigation: Gaps) to see all current needs, source rules, actions and isolated check errors. GET calls preview only. Full-page GET and POST use Hyper's shared {title, main} layout contract with its global navigation/styles; no standalone shell. POST submits one flow/id/revision, rediscovers before apply, verifies afterwards and displays a receipt. No gaps table, private scheduler, notifications, medication schedule, task waits or automatic actions exist here.
Use flow.list({}) for the aggregated list, flow.reconcile({flow,mode:'preview'}), or mode:'explain', target:{id,revision} for the current rationale. Apply requires an explicit target and current revision. A disappeared target or changed revision is stale without an action. Successful verification is closed only when the selected need disappeared; an effect such as a reminder can succeed while status remains remains. verified distinguishes actual verification from failures, converged means no remaining gaps following discovery. Apply errors and an initial pending attempt are stored in flow.receipts; a crash or failed receipt update leaves an indeterminate attempt, never a proven success.
Cached left-navigation count
The shared left quick-access rail links to /gaps with a circular count only when positive. Layout and /ui/gap-count read ctx.state.flow.countCache only: no discovery during shared rendering. flow.refreshCount({}) coalesces concurrent read-only flow.list previews with a five-minute attempt TTL; {force:true} bypasses TTL. Existing cron declaration flow-count refreshes every 5m (immediate on first registration); the boot hook initializes the in-memory cache after restart. No new worker or scheduler is introduced. Form submit and apply routes refresh after an attempt; the shared SSE flow.count event redraws only the badge, with a five-minute cache-only browser poll as fallback. Source changes outside these routes appear on the next cron preview.
Only aggregate count/timestamps/freshness are retained, never gap payloads. Any isolated rule failure makes the whole aggregate incomplete: preserve the last complete count and mark its tooltip stale rather than publish a partial lower bound as a total. First failure leaves the badge hidden/unknown, not zero. Successful zero hides it. Overdue checks also carry a stale tooltip. The cache is process-local, resets on restart, and is optional when Flow is unloaded; declaration rescans preserve it. Cron must be enabled for unattended refresh (CRON_WORKER=off disables it). Private declarations remain outside this plugin and must keep preview read-only.
Author a trusted declaration
Put private rules in .hyper/myRules/$gap_intake.ts (small project-local procedure) or a user plugin's src/myRules/$gap_intake.ts (substantial integration). Do not put personal health information into this official plugin. After adding/changing declarations, run procs.dev.genTypes({}) and plugins.reload({}); procs.repl.load({ name: 'flow.<fn>' }) reloads ordinary functions only, not custom declaration loaders. flow.list and apply also call flow.refresh to rescan declarations, including clearing removed last rules (the core boot skips loaders with zero entries). Import/invalid-export errors become isolated rule errors. The scanner loads src before .hyper, and later declarations override the same name. $flow_ object/step declarations are deliberately not supported.
Template only — replace the fact/action procedures with your own trusted integration; this is not installed or auto-running:
// .hyper/myRules/$gap_intake.ts
export default async function(ctx:Context, session:Session|null, opts:types.flow.FlowRequest):Promise<types.flow.FlowOutput> {
const fact = await ctx.fns.myFacts.readIntake({now:opts.now});
const gaps:types.flow.Gap[] = fact.complete ? [] : [{
id:`intake:${fact.id}`, revision:fact.revision,
summary:'Intake is incomplete', will:'Open intake request',
}];
if(opts.mode==='preview') return {gaps};
const gap=gaps.find(g=>g.id===opts.target.id && g.revision===opts.target.revision);
if(!gap) throw new Error('Target changed');
if(opts.mode==='explain') return {explanation:gap.summary};
// This action must atomically recheck facts and use a unique business key.
const effect=await ctx.fns.myFacts.openIntake({id:fact.id, revision:gap.revision, idempotencyKey:gap.id});
return {effects:[{reference:effect.id}]};
}
The runner does not accept arbitrary action input. id and revision are nonempty bounded strings, and preview IDs must be unique within a rule. IDs describe stable business needs; revisions change when relevant facts/action semantics change. Single-action will is optional: absent mean
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- count.test.ts
- flow.test.ts
- form.test.ts
- package.json
- src/flow/$app_gaps.json
- src/flow/$dock_gaps.ts
- src/flow/$loader_gap.ts
- src/flow/$migration_20290908010000_receipts.ts
- src/flow/$start.ts
- src/flow/CountSnapshot.ts
- src/flow/FlowOutput.ts
- src/flow/FlowRequest.ts
- src/flow/Gap.ts
- src/flow/GapForm.ts
- src/flow/ReconcileResult.ts
- src/flow/State.ts
- src/flow/card.ts
- src/flow/discover.ts
- src/flow/formField.ts
- src/flow/list.ts
- src/flow/localInstant.ts
- src/flow/page.ts
- src/flow/reconcile.ts
- src/flow/refresh.ts
- src/flow/refreshCount.ts
- src/flow/submit.ts
- src/gaps/$route__GET.ts
- src/gaps/$route_apply_POST.ts
- src/gaps/$route_submit_POST.ts
FAQ
What does the flow skill do?
Compute current attention gaps from source facts, review them at /gaps, and explicitly apply one revision-bound action with a durable verification receipt.
How do I install the flow skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the flow skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…