Agent skill

Sizing

by alsk1992 in alsk1992/CloddsBot

Position sizing with Kelly criterion and bankroll management

MITAuto-check passed

Install Sizing

skills CLI
$ npx skills add alsk1992/CloddsBot --skill sizing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alsk1992/CloddsBot sizing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/bundled/sizing .claude/skills/sizing && rm -rf skills-src

Use ~/.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/

Facts

Skill name
sizing
GitHub stars
2.9k
Token cost
~1.4k tokens
SKILL.md length
154 words
Files
2
Skills in repo
118
Repo updated
First seen
Licence
MIT

At a glance

Position sizing with Kelly criterion and bankroll management

  • Works in 5 steps: Use fractional Kelly — Full Kelly has… → Be conservative on edge — Overconfidence… → Account for correlation — Don't… → …
  • SKILL.md covers Chat Commands, TypeScript API Reference, Kelly Fractions and Edge Requirements, plus 2 more sections
  • Runs TypeScript scripts from its folder

What it does

Sizing is an agent skill from alsk1992/CloddsBot. Position sizing with Kelly criterion and bankroll management

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `index.ts`).

The repository describes itself as: Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes… The licence is MIT.

Example prompts

  • “/sizing”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Use fractional Kelly — Full Kelly has too much variance
  2. Be conservative on edge — Overconfidence kills accounts
  3. Account for correlation — Don't over-expose to same theme
  4. Set max position — Never more than 25% in one market
  5. Reassess regularly — Edge changes as prices move

What it can do on your machine

Read from SKILL.md and the folder at commit c930628. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sizing loads about 1.4k tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 154 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~17
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from alsk1992/CloddsBot at commit c930628, republished under its MIT licence (© alsk1992). 154 words, ~1,389 tokens.

Download SKILL.mdSave it as .claude/skills/sizing/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
sizing
description
Position sizing with Kelly criterion and bankroll management
emoji
📐

Sizing - Complete API Reference

Calculate optimal position sizes using Kelly criterion, fractional Kelly, and portfolio-level allocation.


Chat Commands

Kelly Calculator
/kelly 0.45 0.55 10000              Market price, your prob, bankroll
/kelly "Trump 2028" 0.55 --bank 10k Calculate for specific market
/kelly --half 0.45 0.55 10000       Half Kelly (safer)
/kelly --quarter 0.45 0.55 10000    Quarter Kelly (conservative)
Position Sizing
/size 10000 --risk 2%               Size for 2% risk per trade
/size 10000 --max-position 25%      Max 25% in single position
/size portfolio --rebalance         Rebalance to target weights
Edge Calculation
/edge 0.45 0.55                     Calculate edge (prob - price)
/edge "Trump 2028" --estimate 0.55  Edge vs market price

TypeScript API Reference

Create Sizing Calculator
typescript
import { createSizingCalculator } from 'clodds/sizing';

const sizing = createSizingCalculator({
  // Bankroll
  bankroll: 10000,

  // Kelly fraction (1 = full, 0.5 = half)
  kellyFraction: 0.5,

  // Limits
  maxPositionPercent: 25,
  maxTotalExposure: 80,
});
Basic Kelly
typescript
// Binary outcome (YES/NO market)
const size = sizing.kelly({
  marketPrice: 0.45,        // Current price
  estimatedProb: 0.55,      // Your probability estimate
  bankroll: 10000,
});

console.log(`Optimal bet: $${size.optimalSize}`);
console.log(`Edge: ${size.edge}%`);
console.log(`Kelly %: ${size.kellyPercent}%`);
console.log(`Expected value: $${size.expectedValue}`);
Fractional Kelly
typescript
// Half Kelly (recommended for most traders)
const halfKelly = sizing.kelly({
  marketPrice: 0.45,
  estimatedProb: 0.55,
  bankroll: 10000,
  fraction: 0.5,  // Half Kelly
});

// Quarter Kelly (very conservative)
const quarterKelly = sizing.kelly({
  marketPrice: 0.45,
  estimatedProb: 0.55,
  bankroll: 10000,
  fraction: 0.25,
});

console.log(`Full Kelly: $${sizing.kelly({...}).optimalSize}`);
console.log(`Half Kelly: $${halfKelly.optimalSize}`);
console.log(`Quarter Kelly: $${quarterKelly.optimalSize}`);
Multi-Outcome Kelly
typescript
// For markets with 3+ outcomes
const multiKelly = sizing.kellyMultiOutcome({
  outcomes: [
    { name: 'Trump', price: 0.35, estimatedProb: 0.40 },
    { name: 'DeSantis', price: 0.25, estimatedProb: 0.20 },
    { name: 'Haley', price: 0.15, estimatedProb: 0.15 },
    { name: 'Other', price: 0.25, estimatedProb: 0.25 },
  ],
  bankroll: 10000,
  fraction: 0.5,
});

for (const alloc of multiKelly.allocations) {
  console.log(`${alloc.name}: $${alloc.size} (${alloc.percent}%)`);
}
Portfolio-Level Kelly
typescript
// Optimal allocation across multiple markets
const portfolio = sizing.kellyPortfolio({
  positions: [
    { market: 'Trump 2028', price: 0.45, prob: 0.55 },
    { market: 'Fed Rate Cut', price: 0.60, prob: 0.70 },
    { market: 'BTC > 100k', price: 0.30, prob: 0.40 },
  ],
  bankroll: 10000,
  correlations: correlationMatrix,  // Optional
  fraction: 0.5,
});

console.log('Optimal Portfolio:');
for (const pos of portfolio.positions) {
  console.log(`  ${pos.market}: $${pos.size}`);
}
console.log(`Total exposure: ${portfolio.totalExposure}%`);
Confidence-Adjusted Sizing
typescript
// Reduce size when less confident
const size = sizing.kellyWithConfidence({
  marketPrice: 0.45,
  estimatedProb: 0.55,
  confidence: 0.7,  // 70% confident in estimate
  bankroll: 10000,
});

// Size is reduced proportionally to confidence
console.log(`Confidence-adjusted size: $${size.optimalSize}`);
Edge Calculation
typescript
// Calculate edge
const edge = sizing.calculateEdge({
  marketPrice: 0.45,
  estimatedProb: 0.55,
});

console.log(`Edge: ${edge.edgePercent}%`);
console.log(`EV per dollar: $${edge.evPerDollar}`);
console.log(`Implied odds: ${edge.impliedOdds}`);
console.log(`True odds: ${edge.trueOdds}`);
Risk-Based Sizing
typescript
// Size based on risk per trade
const size = sizing.riskBased({
  bankroll: 10000,
  riskPercent: 2,     // Risk 2% per trade
  stopLossPercent: 10, // 10% stop loss
});

console.log(`Position size: $${size.positionSize}`);
console.log(`Max loss: $${size.maxLoss}`);

Kelly Fractions

FractionRisk LevelUse Case
Full (1.0)AggressiveMathematical optimum, high variance
Half (0.5)ModerateMost traders, good balance
Quarter (0.25)ConservativeNew traders, uncertain edges
Tenth (0.1)Very SafeLearning, small edges

Edge Requirements

EdgeRecommendation
< 2%Don't trade
2-5%Small size (quarter Kelly)
5-10%Normal size (half Kelly)
10%+Larger size, verify edge

Formulas

Kelly Formula
f* = (p * b - q) / b

Where:
f* = fraction of bankroll to bet
p = probability of winning
q = probability of losing (1 - p)
b = odds received (1/price - 1)
Edge Formula
Edge = Estimated Prob - Market Price
EV = Edge * Bet Size

Best Practices

  1. Use fractional Kelly — Full Kelly has too much variance
  2. Be conservative on edge — Overconfidence kills accounts
  3. Account for correlation — Don't over-expose to same theme
  4. Set max position — Never more than 25% in one market
  5. Reassess regularly — Edge changes as prices move

© alsk1992, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in src/skills/bundled/sizing of alsk1992/CloddsBot.

  • SKILL.md
  • index.ts

Open the folder on GitHubat commit c930628

Compare with similar skills

Sizing 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.

Sizing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sizing this skillalsk1992/CloddsBot2.9k—~1.4kAutomated safety check: PassMIT
Position Sizingagiprolabs/claude-trading-skills410—~2.4kAutomated safety check: PassMIT
Position Sizingagentii-ai/agentii-investment-intelligence206—~871Automated safety check: PassApache-2.0
Kelly Criterionagiprolabs/claude-trading-skills410—~2.7kAutomated safety check: PassMIT
Positioning Ideasphuryn/pm-skills27k—~751Automated safety check: PassMIT
Gtm Positioning Strategygithub/awesome-copilot40k1 repos~3.5kAutomated safety check: PassMIT

Similar skills

  • Position Sizing

    agiprolabs/claude-trading-skills

    Trade sizing methods including fixed fractional, volatility-adjusted, Kelly criterion, and liquidity-constrained sizing

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Position Sizing

    agentii-ai/agentii-investment-intelligence

    position sizing, Kelly criterion, risk budgeting, volatility targeting, portfolio allocation, bet sizing, capital allocation, drawdown management, position management, risk parity sizing

    206 GitHub stars~871 tokensUpdated 8 days ago
    Business, Finance & HRAuto-check passed
  • Kelly Criterion

    agiprolabs/claude-trading-skills

    Kelly criterion optimal sizing with fractional variants, edge estimation, and practical application for crypto trading

    410 GitHub stars~2.7k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Positioning Ideas

    phuryn/pm-skills

    Brainstorm product positioning ideas differentiated from competitors.

    27k GitHub stars~751 tokensUpdated 22 days ago
    Marketing & SEOAuto-check passed
  • Gtm Positioning Strategy

    github/awesome-copilot

    Official

    Find and own a defensible market position. An agent skill from github/awesome-copilot.

    40k GitHub starsUsed in 1 repo~3.5k tokens
    Marketing & SEOAuto-check passed
  • Responsive Size

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing image assets, markup, and CDN or build transforms related to Serve images at the correct display size.

    74k GitHub stars~805 tokensUpdated yesterday
    Auto-check passed

More from alsk1992/CloddsBot

All 118 skills in this repo
  • Qmd

    alsk1992/CloddsBot

    Local hybrid search for markdown notes and docs. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 3 repos~1.2k tokens
    Auto-check passed
  • Drift SDK

    alsk1992/CloddsBot

    Drift Protocol perpetual futures trading on Solana (direct SDK)

    2.9k GitHub starsUsed in 1 repo~625 tokens
    Auto-check passed
  • Edge

    alsk1992/CloddsBot

    Find mispriced markets by comparing to external models and data sources

    2.9k GitHub starsUsed in 1 repo~472 tokens
    Auto-check passed
  • Embeddings

    alsk1992/CloddsBot

    Vector embeddings configuration and semantic search. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • News

    alsk1992/CloddsBot

    Monitor news and correlate with prediction market movements. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 1 repo~462 tokens
    Auto-check passed
  • Opportunity

    alsk1992/CloddsBot

    Find and execute cross-platform arbitrage opportunities across prediction markets

    2.9k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Sizing

What does Sizing do?

Position sizing with Kelly criterion and bankroll management. Sizing is an agent skill from alsk1992/CloddsBot.

How do I install Sizing in Claude Code?

Run `npx skills add alsk1992/CloddsBot --skill sizing -a claude-code`. Or copy the skill folder (src/skills/bundled/sizing in alsk1992/CloddsBot) into .claude/skills/sizing in your project. Claude Code loads it when a task matches its description.

How do I install Sizing in Codex?

Run `npx skills add alsk1992/CloddsBot --skill sizing -a codex`. Or copy the skill folder (src/skills/bundled/sizing in alsk1992/CloddsBot) into .agents/skills/sizing in your project. Codex loads it when a task matches its description.

Can I use Sizing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alsk1992/CloddsBot --skill sizing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sizing, .gemini/skills/sizing, .github/skills/sizing and .opencode/skills/sizing in your project.

What does Sizing need to run?

Going by SKILL.md and its folder, Sizing needs TypeScript for the scripts in its folder. Our summary lists: Node.js.

Does Sizing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sizing safe to install?

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.

What licence does Sizing use?

Sizing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sizing use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sizing?

Skills that share tags, products or a category with Sizing: Position Sizing (agiprolabs/claude-trading-skills, 410 stars), Position Sizing (agentii-ai/agentii-investment-intelligence, 206 stars), Kelly Criterion (agiprolabs/claude-trading-skills, 410 stars) and Positioning Ideas (phuryn/pm-skills, 27k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sizing?

alsk1992 (a GitHub user) maintains it in alsk1992/CloddsBot, which has 2,901 GitHub stars. The repository holds 118 skills in this directory. The repository was last updated on October 2, 2026.

Source: alsk1992/CloddsBot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.