portfolio-sync

portfolio-sync is a skill for Claude Code, Codex from alsk1992/CloddsBot. It costs 17 tokens per session (3,691 once invoked), scanned B, original, MIT.

A tool that reads and synchronizes trading positions from Polymarket, Kalshi, and Manifold, which are platforms for betting on future event outcomes.

In plain words
What is it for?
Use it to fetch balances and positions from supported markets, including on-chain Polymarket holdings.
Why use it?
It gathers positions held across separate prediction markets so they can be checked in one place.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to fetch balances and positions from supported markets, including on-chain Polymarket holdings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alsk1992/cloddsbot/portfolio-sync
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alsk1992/CloddsBot --skill portfolio-sync
Clone the repo
git clone --depth 1 https://github.com/alsk1992/CloddsBot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for portfolio-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/alsk1992/cloddsbot/portfolio-sync/github.svg)](https://agentmods.dev/skills/alsk1992/cloddsbot/portfolio-sync)
Your own site
<a href="https://agentmods.dev/skills/alsk1992/cloddsbot/portfolio-sync"><img src="https://agentmods.dev/badge/skills/alsk1992/cloddsbot/portfolio-sync/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for portfolio-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/alsk1992/cloddsbot/portfolio-sync"><img src="https://agentmods.dev/badge/skills/alsk1992/cloddsbot/portfolio-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,691 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 40
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 112
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 40
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 112
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 145
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 211
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.03691
Opus 5 $0.00009 $0.01845
Sonnet 5 $0.00003 $0.00738
Haiku 4.5 $0.00002 $0.00369

Measured 6d ago against content hash 46d776658ac3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

portfolio-sync scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (index.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

r = requests.post("https://polygon-rpc.com/", json={

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

r = requests.post("https://polygon-rpc.com/", json={
src/skills/bundled/portfolio-sync/SKILL.md · 467 lines

How it starts

The opening of the file, as written. The whole thing — 467 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Portfolio Sync Skill

Real methods to fetch and sync positions from each prediction market platform.

Polymarket Position Sync

Polymarket positions are held as ERC-1155 tokens on Polygon. Query on-chain balances.

import os
import requests

WALLET = os.getenv("POLY_FUNDER_ADDRESS")
CTF_CONTRACT = "0x4D97DCd97eC945f40cF65F87097ACe5EA0476045"  # Conditional Token Framework

def get_polymarket_positions(token_ids: list[str]) -> dict:
    """
    Get balances for specific token IDs

    Args:
        token_ids: List of token IDs to check (from market data)

    Returns:
        Dict of token_id -> balance in shares
    """
    positions = {}

    for token_id in token_ids:
        token_int = int(token_id)

        # ERC-1155 balanceOf call
        data = f"0x00fdd58e000000000000000000000000{WALLET[2:].lower()}{token_int:064x}"

        r = requests.post("https://polygon-rpc.com/", json={
            "jsonrpc": "2.0",
            "method": "eth_call",
            "params": [{"to": CTF_CONTRACT, "data": data}, "latest"],
            "id": 1
        })

        result = r.json().get("result", "0x0")
        balance = int(result, 16) / 1e6  # Raw to shares

        if balance > 0:
            positions[token_id] = balance

    return positions

# Example: Check positions for BTC 15-min market
btc_tokens = [
    "21742633143463906290569050155826241533067272736897614950488156847949938836455",  # YES
    "48331043336612883890938759509493159234755048973500640148014422747788308965745"   # NO
]

positions = get_polymarket_positions(btc_tokens)
for token_id, balance in positions.items():
    print(f"Token {token_id[:20]}...: {balance} shares")

Get All Polymarket Positions (via Gamma API)

def get_all_polymarket_positions(wallet: str):
    """Get all positions for a wallet via Gamma API"""
    url = f"https://gamma-api.polymarket.com/positions?user={wallet.lower()}"
    r = requests.get(url)

    if r.status_code != 200:
        return []

    positions = r.json()

    result = []
    for p in positions:
        result.append({
            "market_id": p.get("conditionId"),
            "market_question": p.get("title", "Unknown"),
            "token_id": p.get("tokenId"),
            "outcome": p.get("outcome"),
            "size": float(p.get("size", 0)),
            "avg_price": float(p.get("avgPrice", 0)),
            "current_price": float(p.get("currentPrice", 0)),
            "pnl": float(p.get("pnl", 0)),
            "value": float(p.get("value", 0))
        })

    return result

positions = get_all_polymarket_positions(WALLET)
for p in positions:
    print(f"{p['market_question'][:40]}")
    print(f"  {p['outcome']}: {p['size']} shares @ {p['avg_price']:.2f} -> {p['current_price']:.2f}")
    print(f"  PnL: ${p['pnl']:.2f}")

Read the full file on GitHub · 467 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 467 lines · 17 tokens per session scan B 46d776658ac3

Subscribe to this mod's changes

portfolio-sync is a skill published in the GitHub repository alsk1992/CloddsBot (1,190 stars, last pushed 7d ago), licensed MIT. It adds 17 tokens to every session and 3,691 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

perp-cli

Multi-DEX perpetual futures trading via the perp-cli command-line tool. Use when user asks to: trade perps, check funding rates, scan/execute arbitrage (perp-perp or spot-perp), run delta-neutral strategies, bridge USDC across chains, manage positions/orders/leverage, deposit/withdraw, hedge spot+perp, trade HIP-3…

hypurrquant/perp-cli · 152 tokens

hive-market-research

Use this skill for any live crypto market question — prices, 24h moves, liquidity, exchange/venue data, OHLC candles, order books, tickers, funding rates, derivatives, trading context — even casual asks like "what's BTC at" or "is ETH pumping". Use it whenever the answer needs current market numbers instead of memory.…

hive-intel/hive-sdk · 109 tokens

hive-query

Default entry point for any live crypto question when Hive MCP is connected — prices, wallets, tokens, DeFi, NFTs, Solana, security, markets, DEX, networks, RWA perps. Use it whenever the answer depends on live or on-chain data instead of answering from memory, even if the user never mentions Hive. Routes intent to a…

hive-intel/hive-sdk · 121 tokens

hive-token-diligence

Use this skill whenever the user asks whether a specific token is real, legit, liquid, well-held, enriched, investable, or worth researching — "is this token a scam", "run diligence on 0x…", "who holds this", "does it have real liquidity" — even if they never say "diligence". Investigates metadata, market context…

hive-intel/hive-sdk · 147 tokens

hive-wallet-investigation

Use this skill whenever the user wants to look inside a wallet or address — portfolio, holdings, balances, transfers, PnL, NFT exposure, DeFi positions, whale moves, "what does this address hold", "trace this wallet's activity" — even if they just paste an address. Requires wallet address and chain before executing…

hive-intel/hive-sdk · 101 tokens

hive-tool-discovery

Use this skill when the exact Hive MCP tool, task toolset, provider, endpoint name, schema, operation type, or argument shape is unknown and hive-query routing was not enough — including "what can Hive do", "which provider covers X", "is Hive healthy", or any failed tool-name guess. Discover first with compact Hive…

hive-intel/hive-sdk · 100 tokens