drift-protocol

drift-protocol is a skill for Claude Code, Codex from eugenepyvovarov/mcpbundler-agent-skills-marketplace. It costs 44 tokens per session (4,867 once invoked), scanned A, original, MIT.

A development guide for Drift Protocol, a decentralized exchange on Solana for perpetual futures, spot trading, lending, and trading vaults.

In plain words
What is it for?
Use it to build trading bots, integrate the Drift SDK, manage leveraged or spot positions, use multiple assets as collateral, work with vaults, and perform Jupiter swaps.
Why use it?
It gives developers the setup and integration patterns needed to connect applications and trading bots to Drift markets and accounts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to build trading bots, integrate the Drift SDK, manage leveraged or spot positions, use multiple assets as collateral, work with vaults, and perform Jupiter swaps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eugenepyvovarov/mcpbundler-agent-skills-marketplace/drift-protocol
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 eugenepyvovarov/mcpbundler-agent-skills-marketplace --skill drift-protocol
Clone the repo
git clone --depth 1 https://github.com/eugenepyvovarov/mcpbundler-agent-skills-marketplace

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin drift-protocol/plugin install drift-protocol after adding the marketplace above.

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 drift-protocol

README.md
[![agentmods](https://agentmods.dev/badge/skills/eugenepyvovarov/mcpbundler-agent-skills-marketplace/drift-protocol/github.svg)](https://agentmods.dev/skills/eugenepyvovarov/mcpbundler-agent-skills-marketplace/drift-protocol)
Your own site
<a href="https://agentmods.dev/skills/eugenepyvovarov/mcpbundler-agent-skills-marketplace/drift-protocol"><img src="https://agentmods.dev/badge/skills/eugenepyvovarov/mcpbundler-agent-skills-marketplace/drift-protocol/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 drift-protocol

Your own site · 80×15
<a href="https://agentmods.dev/skills/eugenepyvovarov/mcpbundler-agent-skills-marketplace/drift-protocol"><img src="https://agentmods.dev/badge/skills/eugenepyvovarov/mcpbundler-agent-skills-marketplace/drift-protocol.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,867 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00044 $0.04867
Opus 5 $0.00022 $0.02433
Sonnet 5 $0.00009 $0.00973
Haiku 4.5 $0.00004 $0.00487

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

Security

Grade A, and why

drift-protocol scanned grade A with 1 finding 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 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (templates/trading-bot-template.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.

Makes network callslowCapability

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

await axios.post('https://swift.drift.trade/orders', {
drift-protocol/SKILL.md · 728 lines

How it starts

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

Drift Protocol SDK Development Guide

A comprehensive guide for building Solana applications with the Drift Protocol SDK - the leading perpetual futures and spot trading protocol on Solana.

Overview

Drift Protocol is a decentralized exchange on Solana offering:

  • Perpetual Futures: Up to 20x leverage on crypto assets
  • Spot Trading: Borrow/lend and margin trading
  • Cross-Collateral: Use multiple assets as collateral
  • Vaults: Delegated trading pools
  • Jupiter Integration: Direct spot swaps

Quick Start

Installation

npm install @drift-labs/sdk @solana/web3.js @coral-xyz/anchor

For Python:

pip install driftpy

Basic Setup (TypeScript)

import { Connection, Keypair } from '@solana/web3.js';
import { Wallet } from '@coral-xyz/anchor';
import {
  DriftClient,
  initialize,
  DriftEnv,
  BulkAccountLoader
} from '@drift-labs/sdk';

// 1. Setup connection and wallet
const connection = new Connection('https://api.mainnet-beta.solana.com');
const keypair = Keypair.fromSecretKey(/* your secret key */);
const wallet = new Wallet(keypair);

// 2. Initialize SDK
const sdkConfig = initialize({ env: 'mainnet-beta' as DriftEnv });

// 3. Create DriftClient
const driftClient = new DriftClient({
  connection,
  wallet,
  env: 'mainnet-beta',
  accountSubscription: {
    type: 'polling',
    accountLoader: new BulkAccountLoader(connection, 'confirmed', 1000),
  },
});

// 4. Subscribe to updates
await driftClient.subscribe();

// 5. Check if user account exists
const user = driftClient.getUser();
const userExists = await user.exists();

if (!userExists) {
  // Initialize user account (costs ~0.035 SOL rent)
  await driftClient.initializeUserAccount();
}

Basic Setup (Python)

import asyncio
from solana.rpc.async_api import AsyncClient
from solders.keypair import Keypair
from driftpy.drift_client import DriftClient
from driftpy.account_subscription_config import AccountSubscriptionConfig
from anchorpy import Wallet

async def main():
    connection = AsyncClient("https://api.mainnet-beta.solana.com")
    keypair = Keypair.from_bytes(secret_key_bytes)
    wallet = Wallet(keypair)

    drift_client = DriftClient(
        connection,
        wallet,
        "mainnet",
        account_subscription=AccountSubscriptionConfig("polling"),
    )

    await drift_client.subscribe()

    user = drift_client.get_user()
    if not await user.exists():
        await drift_client.initialize_user_account()

asyncio.run(main())

Read the full file on GitHub · 728 lines

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. 12d ago First seen · 728 lines · 44 tokens per session scan A 77ba7e230804

Subscribe to this mod's changes

drift-protocol is a skill published in the GitHub repository eugenepyvovarov/mcpbundler-agent-skills-marketplace (12 stars, last pushed 6mo ago), licensed MIT. It adds 44 tokens to every session and 4,867 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

clawallex-skill

Pay for anything with USDC — virtual cards for any online checkout.

clawallex/clawallex-skill · 19 tokens

hyperliquid-reader

Read Hyperliquid (app.hyperliquid.xyz) perp + spot market data via opencli (read-only, public info API). Use whenever the user wants Hyperliquid perpetual or spot markets, mark/oracle/mid prices, 24h change, funding rates (hourly or annualized APR), open interest, volume, the L2 order book, OHLCV candles, historical…

himself65/finance-skills · 208 tokens

grayscale-crypto-sectors

Use when evaluating crypto through a Grayscale-style Crypto Sectors lens: sector taxonomy, FTSE/Grayscale index eligibility, fee/usage fundamentals, sector-share valuation, ETP/trust wrappers, and Zcash-style privacy-as-money theses.

questflowai/investorskills · 56 tokens

ansem-crypto

Use when evaluating crypto narratives, attention rotation, memecoin cycles, Solana-style ecosystem momentum, social distribution, and reflexive retail flows in an Ansem-style crypto market framework.

questflowai/investorskills · 41 tokens

a16z-crypto

Use when evaluating crypto networks and companies through an a16z crypto lens: web3 adoption, infrastructure vs apps, open networks, and long-duration crypto ecosystem investing.

questflowai/investorskills · 39 tokens

arthur-hayes-liquidity

Use when evaluating crypto markets through an Arthur Hayes-style liquidity lens: dollar liquidity, funding, risk appetite, cycle psychology, and macro-driven crypto positioning.

questflowai/investorskills · 38 tokens