Kelly revshare simulator
Revenue-Share Contract Simulator App-in-Skill — a control-panel/workspace for a deal analyst to model revenue-based-financing (RBF) deals for SME businesses (retail/F&B chain stores). Use when the user invokes $kelly-revshare-simulator or /kelly-revshare-simulator, wants to model a revenue-share or merchant-cash-advance deal, project cash flow and repayment, compute a Cash-Flow Payout Multiple, effective annualized merchant cost, or compare/underwrite multiple financing scenarios. Pure deterministic math, no external calls, no real trading/payment side effects.From its SKILL.md
npx -y skills add mr-kelly/skills --skill kelly-revshare-simulatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
7.4 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it
Revenue-Share Contract Simulator
Overview
Use this skill as a local control-panel/workspace App-in-Skill for modeling revenue-based-financing (RBF) deals: a funder advances a principal to an SME business (e.g. a bubble tea, gym, or hotpot restaurant chain) in exchange for a share of monthly revenue until a repayment cap multiple is reached or the term ends. The app lets a deal analyst tune inputs, see the projected cash flow and cumulative repayment, and record an underwriting decision per named scenario — then save several scenarios for side-by-side comparison.
This is generic, brand-free tooling: business names in seed data are placeholder archetypes (bubble tea chain, gym chain, hotpot restaurant), not real companies.
Default interaction mode: App UI. Unless the user explicitly asks for
chat-only handling, start/reuse the local app with app/start.sh and give the
actual local URL. Use chat-only mode only when the user says "纯聊天", "chat
only", "不要打开 UI", or similar.
App UI Screenshots
<table> <tr> <td width="50%"><img src="assets/screenshots/overview.webp" alt="Revenue-Share Simulator overview"></td> <td width="50%"><img src="assets/screenshots/scenario-detail.webp" alt="Revenue-Share Simulator scenario detail"></td> </tr> <tr> <td><strong>Overview</strong><br>Portfolio-level summary across saved scenarios: average effective cost, flagged deals, and deals still needing an underwriting decision.</td> <td><strong>Scenario detail</strong><br>Cash-flow/cumulative-repayment chart, Cash-Flow Payout Multiple, effective annualized merchant cost, risk flags, and the decision panel.</td> </tr> <tr> <td colspan="2" width="100%"><img src="assets/screenshots/comparison.webp" alt="Revenue-Share Simulator comparison"></td> </tr> <tr> <td colspan="2"><strong>Comparison</strong><br>Side-by-side table of selected scenarios' inputs, projected repayment, payout multiple, effective cost, and decisions.</td> </tr> </table>Boundary
- Pure deterministic math over analyst-supplied inputs. The app never fetches live revenue, banking, or payment data, and never disburses, transfers, or moves money.
- The app reads and writes local files only (
app/.data/scenarios.json). - Risk flags are neutral, rule-based observations — never automated approve/reject decisions. A human always makes the underwriting call.
First Run And Onboarding
On invocation, check app/.data/onboarding.json. If absent/incomplete, ask
the user to confirm the base currency and underwriting policy thresholds
(max effective annual cost, cap-multiple range, max term), then write
app/.data/onboarding.json:
{
"completed": true,
"completed_at": "ISO timestamp",
"config_version": "1"
}
Private config priority:
KELLY_REVSHARE_SIMULATOR_CONFIG=/absolute/path/to/config.jsonskills/kelly-revshare-simulator/config.local.json~/.config/kelly-revshare-simulator/config.jsonskills/kelly-revshare-simulator/config.example.jsonas template only
No secrets are required — this skill has no external accounts to connect.
Local App
Start the app with:
skills/kelly-revshare-simulator/app/start.sh
Seed 3-4 example scenarios (bubble tea chain, gym chain, hotpot restaurant, one deliberately risky example that trips the risk flags) with:
node skills/kelly-revshare-simulator/scripts/generate_batch.ts
The app uses local HTTP on 127.0.0.1, preferring port 3000 through 4000,
or KELLY_REVSHARE_SIMULATOR_UI_PORT when set. First run installs hono and
@hono/node-server; the frontend is zero-build vanilla.
Demo Mode
?demo=1opens a deterministic, fully offline mock batch of four scenarios for documentation and screenshots.?demo=scenariosand?demo=comparisonselect named mock scenes;?demo=detailopens the first mock scenario's detail pane.lang=enorlang=zhforces UI chrome language for screenshots.- Demo API responses never read or write local scenario files.
UI language: support English and Chinese chrome with Auto default.
Domain Model
Inputs per scenario (lib/simulate.ts ScenarioInput):
business_type,avg_monthly_revenue,revenue_volatility_pctprincipal(proposed advance)initial_share_rate_pct(revenue share until breakeven)step_down_share_rate_pct(reduced share rate after principal is recovered)repayment_cap_multiple(e.g. 1.5x principal — the total obligation cap)term_months
Computed (ScenarioResult):
monthly[]: month-by-month revenue, share rate, payment, cumulative repayment, and breakeven/cap flags.cash_flow_payout_multiple: a P/E-like ratio — principal ("price") divided by the annualized repayment cash flow ("earnings"). Lower is faster payback for the funder.effective_annual_cost_pct: the annualized cost implied by paying backtotal_repaymentover the months elapsed, expressed like an APR.risk_flags[]:cap_not_reached,merchant_cost_too_high,high_revenue_volatility,thin_term_buffer— deterministic, rule-based, never automated decisions.
Read references/ui-schema.md before editing the app, scripts, or
lib/simulate.ts.
Data Provider
- Provider selector env:
KELLY_REVSHARE_SIMULATOR_DATA_PROVIDER=local(default). Reservepostgres,aitable,notion,busabasefor future shared/multi-analyst backends. - Primary local files:
app/.data/scenarios.json: the scenario batch (canonical).app/.data/onboarding.json: onboarding completion marker.app/.data/agent.lock: temporary lock while the app writes.config.local.json: private configuration, ignored by git.
Use scripts/validate_ui_schema.ts app/.data/scenarios.json before relying on
a batch in the UI.
Views
#/overview: portfolio-level metrics and the list of scenarios still needing a decision.#/scenarios: filterable scenario list (All,Undecided,Approved,Needs Revision,Rejected).#/scenarios/new: new scenario input form.#/scenarios/<id>: cash-flow chart, computed metrics, risk flags, editable inputs, and the underwriting decision panel.#/comparison: pick multiple saved scenarios for a side-by-side table.#/settings: sanitized config summary and underwriting policy thresholds.
Safety
- Never invent live revenue/banking data; all inputs are analyst estimates entered in the UI.
- Keep
app/.data/(real deal data) out of git; onlyconfig.example.jsonand seed-script output are meant to be shared/demo data. - Risk flags and computed metrics are informational only — this skill never auto-approves or auto-rejects a deal.
Execution reports
Re-read the active provider's decisions immediately before any approved execution. Record each concrete operation, target, status, timestamp, and error in the provider-backed execution report; keep app actions local-only.
What ships with it: 41 files
122.4 KB alongside SKILL.md, 20 of them executable
agents/
- openai.yaml268 B
app/
- app.jsruns28.1 KB
- i18n/messages.jsruns4.7 KB
- index.html4.4 KB
- server/demo.tsruns4.3 KB
- server/hono.tsruns5.8 KB
- server/index.tsruns824 B
- server/launcher.tsruns3.0 KB
- server/paths.tsruns369 B
- server/setup.tsruns6.3 KB
- server/store.tsruns2.4 KB
- server/types.tsruns1.5 KB
- setup-gate.css4.5 KB
- setup-gate.jsruns8.8 KB
- start.shruns478 B
- styles.css15.8 KB
assets/
- screenshots/comparison.webp130 B
- screenshots/comparison-zh-CN.webp130 B
- screenshots/overview.webp130 B
- screenshots/overview-zh-CN.webp130 B
- screenshots/scenario-detail.webp130 B
- screenshots/scenario-detail-zh-CN.webp130 B
- screenshots/thumbs/comparison.webp129 B
- screenshots/thumbs/comparison-zh-CN.webp129 B
- screenshots/thumbs/overview.webp129 B
- screenshots/thumbs/overview-zh-CN.webp129 B
- screenshots/thumbs/scenario-detail.webp129 B
- screenshots/thumbs/scenario-detail-zh-CN.webp129 B
lib/
- common.tsruns3.2 KB
- data-provider/index.tsruns1.0 KB
- data-provider/local-file-provider.tsruns1.4 KB
- data-provider/provider-interface.tsruns1.3 KB
- paths.tsruns954 B
- simulate.tsruns6.5 KB
references/
- ui-schema.md3.0 KB
scripts/
- generate_batch.tsruns3.8 KB
- config.example.json272 B
- .gitignore113 B
- package.json617 B
- README.md3.6 KB
1 more file not listed here. See all 41 in the repository.
Gives 0 of the 12 instructions most finance skills give in ~1.7k tokens
Counted across 469 of the 469 authors here whose files we hold, read 2026-08-07
- Extract date vendor amount and descriptionin 15 of 469, across 3 files
- Scan folder for invoice filesin 14 of 469, across 2 files
- Rename files to standard formatin 14 of 469, across 2 files
- Show organization plan before movingin 14 of 469, across 2 files
- Generate summary CSVin 14 of 469, across 2 files
- Organize files by categoryin 13 of 469, across 1 file
- Preserve original filesin 13 of 469, across 1 file
- Flag files missing critical infoin 13 of 469, across 1 file
- Produce the requested output filein 9 of 469, across 4 files
- Build best, base, and worst case scenariosin 9 of 469, across 5 files
- Implement backoff if rate limit errors occurin 8 of 469, across 3 files
- Determine the weighted average cost of capitalin 8 of 469, across 4 files
Said here and by no other author read
- start the local app on invocation
- provide the local app URL to the user
- use chat-only mode if explicitly requested
- ask for base currency and policy thresholds if onboarding is incomplete
- write the onboarding file upon completion
- seed example scenarios using the generation script
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.