Agent skill

Analytics

by alsk1992 in alsk1992/CloddsBot

Performance attribution, trade analytics, and strategy optimization

MITAuto-check passed

Install Analytics

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

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

GitHub CLI
$ gh skill install alsk1992/CloddsBot analytics --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/analytics .claude/skills/analytics && 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
analytics
GitHub stars
2.9k
Token cost
~1.6k tokens
SKILL.md length
165 words
Files
2
Skills in repo
116
Repo updated
First seen
Licence
MIT

At a glance

Performance attribution, trade analytics, and strategy optimization

  • Works in 5 steps: Review weekly — Catch problems early → Track attribution — Know where profits… → Optimize timing — Trade your best hours → …
  • SKILL.md covers Chat Commands, TypeScript API Reference, Attribution Categories and Key Metrics, plus 1 more section
  • Runs TypeScript scripts from its folder

What it does

Analytics is an agent skill from alsk1992/CloddsBot. Performance attribution, trade analytics, and strategy optimization

Its SKILL.md is about 1.6k 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

  • “/analytics”

Requirements

  • Node.js

Workflow steps

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

  1. Review weekly — Catch problems early
  2. Track attribution — Know where profits come from
  3. Optimize timing — Trade your best hours
  4. Monitor edge decay — Don't hold too long
  5. Check execution — Slippage kills edge

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

Analytics loads about 1.6k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 165 words of instructions outside code blocks.

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

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). 165 words, ~1,623 tokens.

Download SKILL.mdSave it as .claude/skills/analytics/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
analytics
description
Performance attribution, trade analytics, and strategy optimization
emoji
📊

Analytics - Complete API Reference

Analyze trading performance with attribution by edge source, time-of-day analysis, and optimization insights.


Chat Commands

Performance Overview
/analytics                          Performance summary
/analytics today                    Today's performance
/analytics week                     Weekly breakdown
/analytics month                    Monthly breakdown
Attribution
/analytics attribution              P&L by edge source
/analytics by-platform              P&L by platform
/analytics by-category              P&L by market category
/analytics by-strategy              P&L by strategy
Time Analysis
/analytics best-times               Best trading hours
/analytics by-hour                  Hourly performance
/analytics by-day                   Day of week analysis
Edge Analysis
/analytics edge-decay               How edge decays over time
/analytics edge-buckets             Performance by edge size
/analytics liquidity                Performance by liquidity

TypeScript API Reference

Create Analytics Service
typescript
import { createAnalyticsService } from 'clodds/analytics';

const analytics = createAnalyticsService({
  // Data source
  tradesDb: './trades.db',

  // Time zone
  timezone: 'America/New_York',
});
Performance Summary
typescript
const summary = await analytics.getSummary({
  period: 'month',
  // or: from: '2024-01-01', to: '2024-01-31'
});

console.log('=== Performance ===');
console.log(`Total P&L: $${summary.totalPnl}`);
console.log(`Win Rate: ${summary.winRate}%`);
console.log(`Profit Factor: ${summary.profitFactor}`);
console.log(`Sharpe Ratio: ${summary.sharpeRatio}`);
console.log(`Total Trades: ${summary.totalTrades}`);
console.log(`Avg Trade: $${summary.avgTrade}`);
console.log(`Best Trade: $${summary.bestTrade}`);
console.log(`Worst Trade: $${summary.worstTrade}`);
Attribution by Edge Source
typescript
const attribution = await analytics.getAttribution('edgeSource');

for (const source of attribution) {
  console.log(`${source.name}:`);
  console.log(`  P&L: $${source.pnl}`);
  console.log(`  Trades: ${source.trades}`);
  console.log(`  Win Rate: ${source.winRate}%`);
  console.log(`  Contribution: ${source.contribution}%`);
}

// Example sources:
// - price_lag (stale prices)
// - liquidity_gap (thin orderbooks)
// - information (news/events)
// - model_edge (external models)
// - combinatorial (arbitrage)
Time-of-Day Analysis
typescript
const hourly = await analytics.getHourlyPerformance();

console.log('Best Hours:');
for (const hour of hourly.slice(0, 3)) {
  console.log(`  ${hour.hour}:00 - Win: ${hour.winRate}%, Avg: $${hour.avgPnl}`);
}

console.log('Worst Hours:');
for (const hour of hourly.slice(-3)) {
  console.log(`  ${hour.hour}:00 - Win: ${hour.winRate}%, Avg: $${hour.avgPnl}`);
}
Day-of-Week Analysis
typescript
const daily = await analytics.getDayOfWeekPerformance();

for (const day of daily) {
  console.log(`${day.name}: $${day.pnl} (${day.trades} trades, ${day.winRate}% win)`);
}
Edge Decay Analysis
typescript
const decay = await analytics.getEdgeDecay();

console.log('Edge Decay (how fast edge disappears):');
for (const bucket of decay) {
  console.log(`  ${bucket.holdTime}: ${bucket.avgReturn}% return`);
}
// Shows optimal hold time before edge decays
Edge Size Buckets
typescript
const edgeBuckets = await analytics.getEdgeBuckets();

for (const bucket of edgeBuckets) {
  console.log(`Edge ${bucket.min}-${bucket.max}%:`);
  console.log(`  Trades: ${bucket.trades}`);
  console.log(`  Win Rate: ${bucket.winRate}%`);
  console.log(`  Avg P&L: $${bucket.avgPnl}`);
  console.log(`  Realized Edge: ${bucket.realizedEdge}%`);
}
Liquidity Analysis
typescript
const liquidity = await analytics.getLiquidityAnalysis();

for (const bucket of liquidity) {
  console.log(`${bucket.name} liquidity:`);
  console.log(`  Trades: ${bucket.trades}`);
  console.log(`  Avg Slippage: ${bucket.avgSlippage}%`);
  console.log(`  Fill Rate: ${bucket.fillRate}%`);
  console.log(`  Avg P&L: $${bucket.avgPnl}`);
}
Execution Quality
typescript
const execution = await analytics.getExecutionQuality();

console.log('=== Execution Quality ===');
console.log(`Avg Slippage: ${execution.avgSlippage}%`);
console.log(`Fill Rate: ${execution.fillRate}%`);
console.log(`Avg Fill Time: ${execution.avgFillTimeMs}ms`);
console.log(`Partial Fills: ${execution.partialFillRate}%`);
console.log(`Rejected Orders: ${execution.rejectionRate}%`);
Platform Comparison
typescript
const platforms = await analytics.getPlatformComparison();

for (const platform of platforms) {
  console.log(`${platform.name}:`);
  console.log(`  P&L: $${platform.pnl}`);
  console.log(`  Win Rate: ${platform.winRate}%`);
  console.log(`  Avg Slippage: ${platform.avgSlippage}%`);
  console.log(`  Best For: ${platform.strengths.join(', ')}`);
}
Export Report
typescript
// Generate PDF report
await analytics.exportReport({
  format: 'pdf',
  period: 'month',
  include: ['summary', 'attribution', 'charts'],
  outputPath: './reports/january-2024.pdf',
});

// Export raw data
await analytics.exportData({
  format: 'csv',
  period: 'month',
  outputPath: './data/january-trades.csv',
});

Attribution Categories

CategoryDescription
Edge SourceWhere the edge came from
PlatformWhich platform traded on
CategoryMarket category (politics, crypto)
StrategyWhich strategy generated trade
TimeHour/day of trade
SizeTrade size bucket

Key Metrics

MetricGood ValueDescription
Win Rate> 50%Percent of winning trades
Profit Factor> 1.5Gross profit / gross loss
Sharpe Ratio> 1.0Risk-adjusted returns
Realized Edge> 0Actual vs expected edge
Fill Rate> 95%Orders fully filled

Best Practices

  1. Review weekly — Catch problems early
  2. Track attribution — Know where profits come from
  3. Optimize timing — Trade your best hours
  4. Monitor edge decay — Don't hold too long
  5. Check execution — Slippage kills edge

© 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/analytics of alsk1992/CloddsBot.

  • SKILL.md
  • index.ts

Open the folder on GitHubat commit c930628

Compare with similar skills

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

Analytics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Analytics this skillalsk1992/CloddsBot2.9k—~1.6kAutomated safety check: PassMIT
Agent Trading Predictorruvnet/ruflo74k3 repos~2.5kAutomated safety check: PassMIT
LLM Trading Agent Securityaffaan-m/ECC275k2 repos~1.2kAutomated safety check: PassMIT
Trade Journal AnalysisHKUDS/Vibe-Trading35k—~1.8kAutomated safety check: PassMIT
Trading Ledgersickn33/agentic-awesome-skills47k1 repos~2.2kAutomated safety check: PassMIT
Pair Trading SignalsHKUDS/Vibe-Trading35k—~651Automated safety check: PassMIT

Similar skills

  • Agent skill for trading-predictor - invoke with $agent-trading-predictor

    74k GitHub starsUsed in 3 repos~2.5k tokens
    Business, Finance & HRAuto-check passed
  • Security patterns for autonomous trading agents with wallet or transaction authority.

    275k GitHub starsUsed in 2 repos~1.2k tokens
    SecurityAuto-check passed
  • Trade Journal Analysis

    HKUDS/Vibe-Trading

    Reads a broker export of your trades (CSV or Excel), builds a trading profile and runs four behavior checks: disposition effect, overtrading, chasing and anchoring.

    35k GitHub stars~1.8k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Trading Ledger

    sickn33/agentic-awesome-skills

    A trading journal that captures the decision, not just the fill: thesis, plan, and emotion at the moment of entry, written to the user's own Notion database; reviews grade decisions, not P&L.

    47k GitHub starsUsed in 1 repo~2.2k tokens
    Business, Finance & HRAuto-check passed
  • Pair Trading Signals

    HKUDS/Vibe-Trading

    Trades mean reversion between two correlated instruments using the Z-score of their price ratio, going long one leg and short the other when the ratio stretches.

    35k GitHub stars~651 tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Finance research toolkit with backtesting, factor analysis, a library of prebuilt alphas, options pricing and a Shadow Account loop that tests rules extracted from your trade journal.

    35k GitHub stars~6.5k tokensUpdated today
    Business, Finance & HRAuto-check passed

More from alsk1992/CloddsBot

All 116 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 Analytics

What does Analytics do?

Performance attribution, trade analytics, and strategy optimization. Analytics is an agent skill from alsk1992/CloddsBot.

How do I install Analytics in Claude Code?

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

How do I install Analytics in Codex?

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

Can I use Analytics 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 analytics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/analytics, .gemini/skills/analytics, .github/skills/analytics and .opencode/skills/analytics in your project.

What does Analytics need to run?

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

Does Analytics 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 Analytics 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 Analytics use?

Analytics 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 Analytics use?

About 1.6k tokens (SKILL.md is roughly 6.5k 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 Analytics?

Skills that share tags, products or a category with Analytics: Agent Trading Predictor (ruvnet/ruflo, 74k stars), LLM Trading Agent Security (affaan-m/ECC, 275k stars), Trade Journal Analysis (HKUDS/Vibe-Trading, 35k stars) and Trading Ledger (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Analytics?

alsk1992 (a GitHub user) maintains it in alsk1992/CloddsBot, which has 2,903 GitHub stars. The repository holds 116 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.