← 返回 Skills 市场
igorhvr

dexter

作者 igorhvr · GitHub ↗ · v1.0.0
darwinlinux ⚠ suspicious
2790
总下载
0
收藏
13
当前安装
1
版本数
在 OpenClaw 中安装
/install dexter
功能描述
Autonomous financial research agent for stock analysis, financial statements, metrics, prices, SEC filings, and crypto data.
使用说明 (SKILL.md)

Dexter Skill (Clawdbot)

Dexter is an autonomous financial research agent that plans, executes, and synthesizes financial data analysis. Use it for any financial research question involving stocks, crypto, company fundamentals, or market data.

When to Use Dexter

Use Dexter for:

  • Stock prices (current and historical)
  • Financial statements (income, balance sheet, cash flow)
  • Financial metrics (P/E, P/B, margins, market cap, etc.)
  • SEC filings (10-K, 10-Q, 8-K)
  • Analyst estimates
  • Insider trades
  • Company news
  • Crypto prices
  • Comparative financial analysis
  • Revenue trends and growth rates

Note: Dexter's Financial Datasets API covers primarily US stocks. For international stocks (like European exchanges), it falls back to web search via Tavily.

Installation

If Dexter is not installed, follow these steps:

1. Clone and Install

DEXTER_DIR="/root/clawd-workspace/dexter"

# Clone if not exists
if [ ! -d "$DEXTER_DIR" ]; then
  git clone https://github.com/virattt/dexter.git "$DEXTER_DIR"
fi

cd "$DEXTER_DIR"

# Install dependencies
bun install

2. Configure API Keys

Create .env file with required API keys:

cat > "$DEXTER_DIR/.env" \x3C\x3C 'EOF'
# LLM API Keys (at least one required)
ANTHROPIC_API_KEY=your-anthropic-key

# Stock Market API Key - Get from https://financialdatasets.ai
FINANCIAL_DATASETS_API_KEY=your-financial-datasets-key

# Web Search API Key - Get from https://tavily.com (optional but recommended)
TAVILY_API_KEY=your-tavily-key
EOF

API Key Sources:

3. Patch for Anthropic-Only Usage

Dexter's tool executor defaults to OpenAI's gpt-5-mini. If using Anthropic only, patch it:

# Fix hardcoded OpenAI model in tool-executor.ts
sed -i "s/const SMALL_MODEL = 'gpt-5-mini';/const SMALL_MODEL = 'claude-3-5-haiku-latest';/" \
  "$DEXTER_DIR/src/agent/tool-executor.ts"

4. Configure Model Settings

Set Claude as the default model:

mkdir -p "$DEXTER_DIR/.dexter"
cat > "$DEXTER_DIR/.dexter/settings.json" \x3C\x3C 'EOF'
{
  "provider": "anthropic",
  "modelId": "claude-sonnet-4-5"
}
EOF

5. Create Non-Interactive Query Script

cat > "$DEXTER_DIR/query.ts" \x3C\x3C 'SCRIPT'
#!/usr/bin/env bun
/**
 * Non-interactive Dexter query runner
 * Usage: bun query.ts "What is Apple's revenue growth?"
 */
import { config } from 'dotenv';
import { Agent } from './src/agent/orchestrator.js';
import { getSetting } from './src/utils/config.js';

config({ quiet: true });

const query = process.argv[2];
if (!query) {
  console.error('Usage: bun query.ts "Your financial question here"');
  process.exit(1);
}

const model = getSetting('modelId', 'claude-sonnet-4-5') as string;

async function runQuery() {
  let answer = '';
  
  const agent = new Agent({
    model,
    callbacks: {
      onPhaseStart: (phase) => {
        if (process.env.DEXTER_VERBOSE) {
          console.error(`[Phase: ${phase}]`);
        }
      },
      onPlanCreated: (plan) => {
        if (process.env.DEXTER_VERBOSE) {
          console.error(`[Tasks: ${plan.tasks.map(t => t.description).join(', ')}]`);
        }
      },
      onAnswerStream: async (stream) => {
        for await (const chunk of stream) {
          answer += chunk;
          process.stdout.write(chunk);
        }
      },
    },
  });

  try {
    await agent.run(query);
    if (!answer.endsWith('\
')) {
      console.log();
    }
  } catch (error) {
    console.error('Error:', error);
    process.exit(1);
  }
}

runQuery();
SCRIPT

Full One-Shot Installation

Complete installation script (requires API keys as environment variables):

#!/bin/bash
set -e

DEXTER_DIR="/root/clawd-workspace/dexter"

# Clone
[ ! -d "$DEXTER_DIR" ] && git clone https://github.com/virattt/dexter.git "$DEXTER_DIR"
cd "$DEXTER_DIR"

# Install deps
bun install

# Create .env (set these variables before running)
cat > .env \x3C\x3C EOF
ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-your-key-here}
FINANCIAL_DATASETS_API_KEY=${FINANCIAL_DATASETS_API_KEY:-your-key-here}
TAVILY_API_KEY=${TAVILY_API_KEY:-your-key-here}
EOF

# Patch for Anthropic
sed -i "s/const SMALL_MODEL = 'gpt-5-mini';/const SMALL_MODEL = 'claude-3-5-haiku-latest';/" \
  src/agent/tool-executor.ts

# Set model config
mkdir -p .dexter
echo '{"provider":"anthropic","modelId":"claude-sonnet-4-5"}' > .dexter/settings.json

echo "Dexter installed successfully!"

Location

/root/clawd-workspace/dexter

Quick Query (Non-Interactive)

For quick financial questions, use the query script:

cd /root/clawd-workspace/dexter && bun query.ts "Your financial question here"

Examples:

bun query.ts "What is Apple's current P/E ratio?"
bun query.ts "Compare Microsoft and Google revenue growth over the last 4 quarters"
bun query.ts "What was Tesla's free cash flow in 2025?"
bun query.ts "Show me insider trades for NVDA in the last 30 days"
bun query.ts "What is Bitcoin's price trend over the last week?"

For verbose output (shows planning steps):

DEXTER_VERBOSE=1 bun query.ts "Your question"

Interactive Mode (Complex Research)

For multi-turn research sessions or follow-up questions, use the interactive CLI via tmux:

SOCKET_DIR="${CLAWDBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/clawdbot-tmux-sockets}"
SOCKET="$SOCKET_DIR/clawdbot.sock"
SESSION=dexter

# Start Dexter (if not running)
tmux -S "$SOCKET" kill-session -t "$SESSION" 2>/dev/null || true
tmux -S "$SOCKET" new -d -s "$SESSION" -n shell -c /root/clawd-workspace/dexter
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'bun start' Enter
sleep 3

# Send a query
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -l -- 'Your question here'
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 Enter

# Check output
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200

Available Tools (Under the Hood)

Dexter automatically selects and uses these tools based on your query:

Financial Statements

  • get_income_statements - Revenue, expenses, net income
  • get_balance_sheets - Assets, liabilities, equity
  • get_cash_flow_statements - Operating, investing, financing cash flows
  • get_all_financial_statements - All three in one call

Prices

  • get_price_snapshot - Current stock price
  • get_prices - Historical price data

Crypto

  • get_crypto_price_snapshot - Current crypto price (e.g., BTC-USD)
  • get_crypto_prices - Historical crypto prices
  • get_available_crypto_tickers - List available crypto tickers

Metrics

  • get_financial_metrics_snapshot - Current metrics (P/E, market cap, etc.)
  • get_financial_metrics - Historical metrics

SEC Filings

  • get_10k_filing_items - Annual report sections
  • get_10q_filing_items - Quarterly report sections
  • get_8k_filing_items - Current report items
  • get_filings - List of all filings

Other Data

  • get_analyst_estimates - Earnings/revenue estimates
  • get_segmented_revenues - Revenue by segment
  • get_insider_trades - Insider buying/selling
  • get_news - Company news
  • search_web - Web search (via Tavily) for general info

Agent Architecture

Dexter uses a multi-phase approach:

  1. Understand: Extract intent, tickers, and time periods from query
  2. Plan: Create task list with dependencies
  3. Execute: Run tasks in parallel where possible
  4. Reflect: Evaluate if more data is needed (iterates up to 5x)
  5. Answer: Synthesize comprehensive response with sources

Example Queries

Stock Analysis:

  • "What is AAPL's revenue growth over the last 4 quarters?"
  • "Compare MSFT and GOOG operating margins for 2025"
  • "What was AMZN's debt-to-equity ratio last quarter?"

Financial Health:

  • "Is NVDA's cash flow positive? Show me the trend"
  • "What are Tesla's profit margins compared to Ford?"

SEC Filings:

  • "Summarize Apple's most recent 10-K risk factors"
  • "What did Meta disclose in their latest 8-K?"

Crypto:

  • "What is Ethereum's price today?"
  • "Show Bitcoin's price movement over the last month"

Market Research:

  • "What are analyst estimates for Amazon's next quarter earnings?"
  • "Show me recent insider trades for Microsoft"

Troubleshooting

"Missing credentials... OPENAI_API_KEY"

Run the Anthropic patch (step 3 in installation) - Dexter's tool executor defaults to OpenAI.

API errors for non-US stocks

Financial Datasets API primarily covers US stocks. Dexter will fall back to Tavily web search for international stocks if TAVILY_API_KEY is configured.

Slow responses

Complex queries may take 30-60 seconds. Dexter plans, executes multiple API calls, reflects on results, and synthesizes answers.

Tips

  1. Be specific: Include ticker symbols and time periods when known
  2. US stocks work best: The Financial Datasets API has comprehensive US coverage
  3. International stocks: Dexter falls back to web search for non-US stocks
  4. Crypto format: Use BTC-USD, ETH-USD format for crypto tickers
  5. Timeout: Complex queries may take 30-60 seconds as Dexter plans and executes multiple tasks
安全使用建议
Before installing: (1) Inspect the GitHub repo (https://github.com/virattt/dexter) manually — review package.json, src code, network calls, and the sed change to tool-executor.ts — do not run bun install blindly. (2) Do not store high-privilege or reused API keys in the .env in plaintext on a host you care about; prefer scoped/test keys. (3) Run the install and the skill in an isolated, non-root environment (container or VM) and restrict network access if possible. (4) Confirm why the registry metadata omitted required env vars; ask the publisher for provenance and a checksumed release if you need to trust it. (5) If you cannot audit the code, do not grant production LLM or financial-data keys — use audited or vendor-hosted integrations instead.
功能分析
Type: OpenClaw Skill Name: dexter Version: 1.0.0 The skill is classified as suspicious due to its reliance on cloning and installing an external project from GitHub (`https://github.com/virattt/dexter.git`) via `git clone` and `bun install` commands in `SKILL.md`. This introduces a significant supply chain risk, as the integrity of the external repository and its dependencies cannot be guaranteed by the skill bundle itself. While the stated purpose is legitimate financial research, the broad shell execution, file system modification (e.g., `sed` command), and network access required for installation and operation represent risky capabilities without clear malicious intent within the provided files.
能力评估
Purpose & Capability
The skill's purpose (stock/crypto research) matches the need to talk to market data and LLM providers, but the registry metadata declares no required environment variables or credentials while SKILL.md requires multiple API keys (Anthropic, FinancialDatasets, Tavily). That mismatch is incoherent and unexplained. The instructions also hardcode cloning a repository from an unknown GitHub account (virattt) — plausible for implementation but increases trust requirements.
Instruction Scope
SKILL.md instructs the agent/operator to: git clone an external repo, run bun install (install packages), create a .env with multiple API keys, patch source files via sed, write config and helper scripts, and run tmux sessions. These actions download and modify code and require placing secrets on disk. The instructions operate outside a purely read-only querying scope and grant broad discretion to execute arbitrary code from the cloned repo.
Install Mechanism
There is no formal install spec; instead the SKILL.md tells you to clone https://github.com/virattt/dexter.git and run bun install. Downloading and executing dependencies from an unvetted GitHub repository and running its JS toolchain is a moderate-to-high risk install pattern (archive/external code will be written and executed). GitHub itself is a known host, but the author/account is not verified and the repo will run arbitrary dependencies.
Credentials
Registry lists no required env vars, but the instructions require at least three API keys (ANTHROPIC_API_KEY, FINANCIAL_DATASETS_API_KEY, optional TAVILY_API_KEY) and instruct creating a .env file that stores them. Requesting LLM and market-data API keys is sensible for the stated purpose, but the absence of these declarations in the registry metadata is an inconsistency. The instructions also suggest storing keys in plaintext under the skill workspace (risky if not isolated).
Persistence & Privilege
The skill does not request always:true and does not declare system-wide changes beyond its own workspace. However, it instructs creating files under /root/clawd-workspace/dexter and patching repository source files (sed). Running the code will allow autonomous network access to external APIs (normal for this use case) — consider this an ordinary but significant persistence and network privilege that should be confined to an isolated environment.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dexter
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dexter 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of Dexter: an autonomous agent for comprehensive financial research and analysis. - Supports querying stock prices, financial statements, key metrics, SEC filings, analyst estimates, insider trades, company news, crypto data, and more. - Integration with Financial Datasets API (primarily US stocks) and fallback to web search (Tavily) for broader coverage. - Includes non-interactive and interactive CLI modes, with detailed setup and API key configuration instructions. - Multi-phase agent architecture: understand, plan, execute, reflect, and synthesize answers using multiple financial data tools. - Customizable for different LLM providers (Anthropic or OpenAI) and easy configuration for model selection.
元数据
Slug dexter
版本 1.0.0
许可证
累计安装 13
当前安装数 13
历史版本数 1
常见问题

dexter 是什么?

Autonomous financial research agent for stock analysis, financial statements, metrics, prices, SEC filings, and crypto data. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2790 次。

如何安装 dexter?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dexter」即可一键安装,无需额外配置。

dexter 是免费的吗?

是的,dexter 完全免费(开源免费),可自由下载、安装和使用。

dexter 支持哪些平台?

dexter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux)。

谁开发了 dexter?

由 igorhvr(@igorhvr)开发并维护,当前版本 v1.0.0。

💬 留言讨论