Agent skill

Positions

by alsk1992 in alsk1992/CloddsBot

Position management with stop-loss, take-profit, and trailing stops

MITAuto-check passed

Install Positions

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

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

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

At a glance

Position management with stop-loss, take-profit, and trailing stops

  • Works in 5 steps: Always set stops — Don't leave positions… → Use trailing stops — Lock in gains as… → Partial exits — Scale out at multiple… → …
  • SKILL.md covers Chat Commands, TypeScript API Reference, Stop Types and Order Execution, plus 1 more section
  • Runs TypeScript scripts from its folder

What it does

Positions is an agent skill from alsk1992/CloddsBot. Position management with stop-loss, take-profit, and trailing stops

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

  • “/positions”

Requirements

  • Node.js

Workflow steps

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

  1. Always set stops — Don't leave positions unprotected
  2. Use trailing stops — Lock in gains as price moves
  3. Partial exits — Scale out at multiple levels
  4. Monitor approaching — Get alerts before triggers
  5. Review filled stops — Check execution quality

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

Positions loads about 1.5k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 150 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.5k

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). 150 words, ~1,526 tokens.

Download SKILL.mdSave it as .claude/skills/positions/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
positions
description
Position management with stop-loss, take-profit, and trailing stops
emoji
📍

Positions - Complete API Reference

Manage open positions with automated stop-loss, take-profit, and trailing stop orders.


Chat Commands

View Positions
/positions                          List all positions
/positions poly                     Polymarket positions only
/positions futures                  Futures positions only
/position <id>                      Position details
Stop-Loss
/sl <position-id> at 0.35           Set stop-loss price
/sl <position-id> -10%              Stop-loss 10% below entry
/sl poly "Trump" at 0.35            Set by market name
Take-Profit
/tp <position-id> at 0.65           Set take-profit price
/tp <position-id> +20%              Take-profit 20% above entry
/tp poly "Trump" at 0.65            Set by market name
Trailing Stop
/trailing <position-id> 5%          Trail 5% from high
/trailing <position-id> $0.05       Trail $0.05 from high
Partial Exits
/tp <position-id> at 0.55 size 50%  Take profit on half
/sl <position-id> at 0.40 size 25%  Stop-loss on quarter

TypeScript API Reference

Create Position Manager
typescript
import { createPositionManager } from 'clodds/positions';

const positions = createPositionManager({
  // Monitoring
  checkIntervalMs: 5000,

  // Execution
  orderType: 'market',  // 'market' | 'limit'
  limitBuffer: 0.01,    // Buffer for limit orders

  // Storage
  storage: 'sqlite',
  dbPath: './positions.db',
});

// Start monitoring
await positions.start();
List Positions
typescript
const all = await positions.list();

for (const pos of all) {
  console.log(`${pos.id}: ${pos.platform} ${pos.market}`);
  console.log(`  Side: ${pos.side}`);
  console.log(`  Size: ${pos.size}`);
  console.log(`  Entry: ${pos.entryPrice}`);
  console.log(`  Current: ${pos.currentPrice}`);
  console.log(`  P&L: ${pos.pnl} (${pos.pnlPercent}%)`);
  console.log(`  Stop-loss: ${pos.stopLoss || 'none'}`);
  console.log(`  Take-profit: ${pos.takeProfit || 'none'}`);
}
Set Stop-Loss
typescript
// Absolute price
await positions.setStopLoss({
  positionId: 'pos-123',
  price: 0.35,
});

// Percentage from entry
await positions.setStopLoss({
  positionId: 'pos-123',
  percentFromEntry: 10,  // 10% below entry
});

// Percentage from current
await positions.setStopLoss({
  positionId: 'pos-123',
  percentFromCurrent: 5,  // 5% below current
});

// Partial stop-loss
await positions.setStopLoss({
  positionId: 'pos-123',
  price: 0.35,
  sizePercent: 50,  // Exit 50% of position
});
Set Take-Profit
typescript
// Absolute price
await positions.setTakeProfit({
  positionId: 'pos-123',
  price: 0.65,
});

// Percentage from entry
await positions.setTakeProfit({
  positionId: 'pos-123',
  percentFromEntry: 20,  // 20% above entry
});

// Multiple take-profit levels
await positions.setTakeProfit({
  positionId: 'pos-123',
  levels: [
    { price: 0.55, sizePercent: 25 },  // 25% at 0.55
    { price: 0.60, sizePercent: 25 },  // 25% at 0.60
    { price: 0.70, sizePercent: 50 },  // 50% at 0.70
  ],
});
Set Trailing Stop
typescript
// Percentage trail
await positions.setTrailingStop({
  positionId: 'pos-123',
  trailPercent: 5,  // Trail 5% below high
});

// Absolute trail
await positions.setTrailingStop({
  positionId: 'pos-123',
  trailAmount: 0.05,  // Trail $0.05 below high
});

// Activate after target
await positions.setTrailingStop({
  positionId: 'pos-123',
  trailPercent: 5,
  activateAt: 0.55,  // Only start trailing after 0.55
});
Remove Stops
typescript
// Remove stop-loss
await positions.removeStopLoss('pos-123');

// Remove take-profit
await positions.removeTakeProfit('pos-123');

// Remove trailing stop
await positions.removeTrailingStop('pos-123');

// Remove all
await positions.removeAllStops('pos-123');
Event Handlers
typescript
// Stop-loss triggered
positions.on('stopLossTriggered', (position, result) => {
  console.log(`🛑 Stop-loss hit: ${position.market}`);
  console.log(`  Entry: ${position.entryPrice}`);
  console.log(`  Exit: ${result.exitPrice}`);
  console.log(`  P&L: ${result.pnl}`);
});

// Take-profit triggered
positions.on('takeProfitTriggered', (position, result) => {
  console.log(`✅ Take-profit hit: ${position.market}`);
  console.log(`  P&L: ${result.pnl}`);
});

// Trailing stop triggered
positions.on('trailingStopTriggered', (position, result) => {
  console.log(`📉 Trailing stop hit: ${position.market}`);
  console.log(`  High: ${position.highWaterMark}`);
  console.log(`  Exit: ${result.exitPrice}`);
});

// Price approaching stop
positions.on('approaching', (position, type, distance) => {
  console.log(`⚠️ ${position.market} ${distance}% from ${type}`);
});
Position Summary
typescript
const summary = await positions.getSummary();

console.log(`Total positions: ${summary.count}`);
console.log(`Total value: $${summary.totalValue}`);
console.log(`Unrealized P&L: $${summary.unrealizedPnl}`);
console.log(`With stop-loss: ${summary.withStopLoss}`);
console.log(`With take-profit: ${summary.withTakeProfit}`);

Stop Types

TypeDescription
Stop-LossExit when price drops to limit losses
Take-ProfitExit when price rises to lock in gains
Trailing StopDynamic stop that follows price up
Break-EvenMove stop to entry after profit target

Order Execution

OptionDescription
marketImmediate execution at current price
limitExecute at specified price or better
bufferAdd buffer to limit price for fills

Best Practices

  1. Always set stops — Don't leave positions unprotected
  2. Use trailing stops — Lock in gains as price moves
  3. Partial exits — Scale out at multiple levels
  4. Monitor approaching — Get alerts before triggers
  5. Review filled stops — Check execution quality

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

  • SKILL.md
  • index.ts

Open the folder on GitHubat commit c930628

Compare with similar skills

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

Positions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Positions this skillalsk1992/CloddsBot3k—~1.5kAutomated safety check: PassMIT
Kraken Stop Take Profitkrakenfx/kraken-cli751—~819Automated safety check: PassMIT
Recipe Trailing Stop Runnerkrakenfx/kraken-cli751—~362Automated safety check: PassMIT
Positioning Ideasphuryn/pm-skills27k—~751Automated safety check: PassMIT
Gtm Positioning Strategygithub/awesome-copilot40k1 repos~3.5kAutomated safety check: PassMIT
Ib Stop Lossstaskh/trading_skills376—~1.7kAutomated safety check: NotesMIT

Similar skills

  • Kraken Stop Take Profit

    krakenfx/kraken-cli

    Manage stop-loss and take-profit orders for risk-bounded positions.

    751 GitHub stars~819 tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Recipe Trailing Stop Runner

    krakenfx/kraken-cli

    Ride a trend with a trailing stop that locks in profits on reversal.

    751 GitHub stars~362 tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Positioning Ideas

    phuryn/pm-skills

    Brainstorm product positioning ideas differentiated from competitors.

    27k GitHub stars~751 tokensUpdated today
    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
  • Ib Stop Loss

    staskh/trading_skills

    Downside stop-loss management for PMCC, naked LEAPS, and stock positions in IB.

    376 GitHub stars~1.7k tokensUpdated 11 days ago
    Business, Finance & HRAuto-check: notes
  • Guard Trailing Stop

    Nunchi-trade/agent-cli

    Guard — two-phase ROE-based trailing stop system for Hyperliquid perps.

    521 GitHub stars~1.9k tokensUpdated 3 mo ago
    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.

    3k GitHub starsUsed in 3 repos~1.2k tokens
    Auto-check passed
  • AI Strategy

    alsk1992/CloddsBot

    AI Strategy - natural language to trades. An agent skill from alsk1992/CloddsBot.

    3k GitHub stars~670 tokensUpdated 7 days ago
    Auto-check passed
  • Alerts

    alsk1992/CloddsBot

    Create and manage price alerts for prediction markets. An agent skill from alsk1992/CloddsBot.

    3k GitHub stars~460 tokensUpdated 7 days ago
    Auto-check passed
  • Analytics

    alsk1992/CloddsBot

    Performance attribution, trade analytics, and strategy optimization

    3k GitHub stars~1.6k tokensUpdated 7 days ago
    Auto-check passed
  • Arbitrage

    alsk1992/CloddsBot

    Automated cross-platform arbitrage detection and monitoring. An agent skill from alsk1992/CloddsBot.

    3k GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed
  • Auto Reply

    alsk1992/CloddsBot

    Automatic response rules, patterns, and scheduled messages. An agent skill from alsk1992/CloddsBot.

    3k GitHub stars~1.5k tokensUpdated 7 days ago
    Auto-check passed

Questions about Positions

What does Positions do?

Position management with stop-loss, take-profit, and trailing stops. Positions is an agent skill from alsk1992/CloddsBot.

How do I install Positions in Claude Code?

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

How do I install Positions in Codex?

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

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

What does Positions need to run?

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

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

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

About 1.5k tokens (SKILL.md is roughly 6.1k 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 Positions?

Skills that share tags, products or a category with Positions: Kraken Stop Take Profit (krakenfx/kraken-cli, 751 stars), Recipe Trailing Stop Runner (krakenfx/kraken-cli, 751 stars), Positioning Ideas (phuryn/pm-skills, 27k stars) and Gtm Positioning Strategy (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Positions?

alsk1992 (a GitHub user) maintains it in alsk1992/CloddsBot, which has 2,951 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.