返回 Skill 列表
extension
分类: 内容与媒体无需 API Key

anthropic-daemon

通过FGP守护进程实现快速的Anthropic Claude API操作 - 比每次请求都生成API客户端快15-30倍。当用户需要Claude聊天完成、流式响应、令牌计数或批量请求时使用。触发词包括“claude chat”、“anthropic api”、“claude completion”、“claude stream”。

person作者: jakexiaohubgithub

FGP Anthropic Daemon

Fast Anthropic Claude API operations with persistent connection pooling.

Why FGP?

| Operation | FGP Daemon | Direct API Client | Speedup | |-----------|------------|-------------------|---------| | Chat completion | 15ms overhead | 200-400ms cold | 15-25x | | Streaming | 5ms setup | 150ms setup | 30x | | Embeddings | 10ms | 180ms cold | 18x |

Installation

# Via Homebrew
brew install fast-gateway-protocol/fgp/fgp-anthropic

# Via npx
npx add-skill fast-gateway-protocol/fgp-skills --skill fgp-anthropic

Setup

# Set your API key
export ANTHROPIC_API_KEY="sk-ant-..."

# Start the daemon
fgp start anthropic

Usage

# Chat completion
fgp call anthropic.chat --model claude-sonnet-4-20250514 --message "Hello!"

# Streaming chat
fgp call anthropic.stream --model claude-sonnet-4-20250514 --message "Write a poem"

# List models
fgp call anthropic.models

Available Commands

| Command | Description | |---------|-------------| | anthropic.chat | Send chat completion request | | anthropic.stream | Streaming chat completion | | anthropic.models | List available models | | anthropic.count_tokens | Count tokens in text | | anthropic.batch | Batch multiple requests |

Example Workflows

Code Review

fgp call anthropic.chat \
  --model claude-sonnet-4-20250514 \
  --system "You are a code reviewer" \
  --message "Review this code: $(cat main.py)"

Document Analysis

fgp call anthropic.chat \
  --model claude-sonnet-4-20250514 \
  --message "Summarize this document" \
  --file report.pdf

Architecture

  • Persistent HTTPS connection pool
  • Response caching for identical requests
  • Automatic retry with exponential backoff
  • Token counting without API calls