ranger-finance

ranger-finance is a skill for Claude Code, Codex from sendaifun/skills. It costs 65 tokens per session (3,497 once invoked), scanned A, original, Apache-2.0.

A software development guide for Ranger Finance, which combines perpetual-futures markets across several Solana trading protocols behind one interface. Perpetual futures are leveraged contracts with no fixed expiry date.

In plain words
What is it for?
Use it to build Solana perpetual-futures applications, route orders across Drift, Flash Trade, Adrena, and Jupiter Perps, manage positions, or build AI trading agents.
Why use it?
It avoids requiring an application to integrate separately with each supported trading venue and provides one way to view and manage positions across them.

Skill for Claude CodeCodex

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

Good fit Use it to build Solana perpetual-futures applications, route orders across Drift, Flash Trade, Adrena, and Jupiter Perps, manage positions, or build AI trading agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sendaifun/skills/ranger-finance
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 sendaifun/skills --skill ranger-finance
Clone the repo
git clone --depth 1 https://github.com/sendaifun/skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin ranger-finance/plugin install ranger-finance 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 ranger-finance

README.md
[![agentmods](https://agentmods.dev/badge/skills/sendaifun/skills/ranger-finance/github.svg)](https://agentmods.dev/skills/sendaifun/skills/ranger-finance)
Your own site
<a href="https://agentmods.dev/skills/sendaifun/skills/ranger-finance"><img src="https://agentmods.dev/badge/skills/sendaifun/skills/ranger-finance/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 ranger-finance

Your own site · 80×15
<a href="https://agentmods.dev/skills/sendaifun/skills/ranger-finance"><img src="https://agentmods.dev/badge/skills/sendaifun/skills/ranger-finance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,497 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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: 2 findings, up to high

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 →

  • high Privilege Escalation · line 402
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 403
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
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.00065 $0.03497
Opus 5 $0.00032 $0.01749
Sonnet 5 $0.00013 $0.00699
Haiku 4.5 $0.00006 $0.00350

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

Security

Grade A, and why

ranger-finance scanned grade A with 0 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 13d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (examples/basic/example.ts, examples/positions/example.ts, examples/transactions/example.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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ranger-finance/SKILL.md · 578 lines

How it starts

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

Ranger Finance SDK Development Guide

A comprehensive guide for building Solana applications with Ranger Finance - the first perpetual futures aggregator on Solana.

Overview

Ranger Finance is a Smart Order Router (SOR) that aggregates perpetual futures trading across multiple Solana protocols:

  • Drift Protocol: Leading perps DEX on Solana
  • Flash Trade: High-performance perpetuals
  • Adrena: Leverage trading protocol
  • Jupiter Perps: Jupiter's perpetuals platform

Key Benefits

  • Best Execution: Automatically routes orders to venues with best pricing
  • Unified API: Single interface for all supported perp protocols
  • Position Aggregation: View and manage positions across all venues
  • AI Agent Support: Built-in MCP server for AI trading agents

Quick Start

Installation (TypeScript)

# Clone the SDK demo
git clone https://github.com/ranger-finance/sor-ts-demo.git
cd sor-ts-demo
npm install

Environment Setup

Create a .env file:

RANGER_API_KEY=your_api_key_here
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
WALLET_PRIVATE_KEY=your_base58_private_key  # Optional, for signing

Basic Setup

import { SorApi, TradeSide } from 'ranger-sor-sdk';
import dotenv from 'dotenv';

dotenv.config();

// Initialize the SOR API client
const sorApi = new SorApi({
  apiKey: process.env.RANGER_API_KEY!,
  solanaRpcUrl: process.env.SOLANA_RPC_URL,
});

// Your wallet public key
const walletAddress = 'YOUR_WALLET_PUBLIC_KEY';

Core Concepts

1. Trade Sides

type TradeSide = 'Long' | 'Short';

2. Adjustment Types

type AdjustmentType =
  | 'Quote'           // Get a quote only
  | 'Increase'        // Open or increase position
  | 'DecreaseFlash'   // Decrease via Flash
  | 'DecreaseJupiter' // Decrease via Jupiter
  | 'DecreaseDrift'   // Decrease via Drift
  | 'DecreaseAdrena'  // Decrease via Adrena
  | 'CloseFlash'      // Close via Flash
  | 'CloseJupiter'    // Close via Jupiter
  | 'CloseDrift'      // Close via Drift
  | 'CloseAdrena'     // Close via Adrena
  | 'CloseAll';       // Close entire position

Read the full file on GitHub · 578 lines

Files

What ships with it

8 files 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. 13d ago First seen · 578 lines · 65 tokens per session scan A eb7c918662b4

Subscribe to this mod's changes

ranger-finance is a skill published in the GitHub repository sendaifun/skills (128 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 65 tokens to every session and 3,497 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. 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

x402

Build internet-native payments with x402 - HTTP 402 for on-chain micropayments, no accounts or API keys. Use for paid APIs, paywalled content, agent payment flows, or per-call MCP tools. TypeScript, Python, and Go SDKs across EVM and Solana.

tenequm/skills · 63 tokens

helius-jupiter

Skill "helius-jupiter" from helius-labs/core-ai, covering helius x jupiter — build defi apps on solana, mcp router surface, prerequisites, 1. helius mcp server and 2. jupiter api key.

helius-labs/core-ai · 0 tokens

helius-okx

Skill "helius-okx" from helius-labs/core-ai, covering helius x okx — build trading & intelligence apps on solana, mcp router surface, prerequisites, 1. helius mcp server and 2. okx skill library (required).

helius-labs/core-ai · 0 tokens

yield-xyz-agentkit-builder

Build applications that integrate with the Yield.xyz APIs — staking, lending, vaults, and RWA across 80+ networks. Generates code covering REST API integration, transaction signing, wallet connection, and fee monetization. Use when user wants to build an app, integrate yield, generate code, or set up a project using…

stakekit/agentkit · 75 tokens

yield-xyz-agentkit-privy

The Privy connector for the Yield.xyz AgentKit — signs and broadcasts via Privy agentic wallets. Extends the yield-xyz-agentkit skill — that skill discovers yields and builds the unsigned transactions; this one adds Privy wallet creation, policy enforcement, signing, and broadcasting, in autonomous and semi-autonomous…

stakekit/agentkit · 124 tokens

yield-xyz-agentkit-moonpay

The MoonPay connector for the Yield.xyz AgentKit — signs and broadcasts via MoonPay. Extends the yield-xyz-agentkit skill — that skill discovers yields and builds the unsigned transactions; this one adds MoonPay wallet auth, signing, and broadcasting. Use when the user wants to enter, exit, or manage yield positions…

stakekit/agentkit · 101 tokens