Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

scout-apiscout API 搜索

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

329

周安装

14

GitHub Stars

1

下载量

115
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:scout-api(scout API 搜索)
来源仓库:https://github.com/buildrtech/dotagents
仓库路径:skills/scout-api
安装命令:
npx skills add https://github.com/buildrtech/dotagents --skill scout-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/buildrtech/dotagents --skill scout-api

简介

用于辅助 API 设计、接口文档和请求响应结构梳理。

  • 适合生成 OpenAPI 草稿、检查字段命名和整理错误码。
  • 使用时需确认真实业务语义、鉴权方式和分页规则。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 应避免凭空补字段,优先从现有代码或样例中提取事实。
  • scout-api 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Scout APM API

Query application performance monitoring data from Scout APM using the REST API.

When to Use

  • Investigating slow endpoints or response time regressions
  • Listing applications and their metrics (apdex, throughput, error rate, p95)
  • Fetching traces for a specific endpoint
  • Reviewing error groups and individual error stacktraces
  • Checking insights: N+1 queries, memory bloat, slow queries

Do not use for configuring Scout agents or instrumenting code — this is the read-only reporting API.

Setup

API Key

  1. Log into Scout APM
  2. Go to organization settings
  3. Create a named API token
  4. Export it in your shell profile:
export SCOUT_API_KEY="your-token-here"

Base URL

https://scoutapm.com/api/v0

Authentication

Every request must include the key via one of:

  • Header: X-SCOUT-API: $SCOUT_API_KEY
  • Query param: ?key=$SCOUT_API_KEY

All examples below use the header approach.

Quick Reference

# List apps
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" "https://scoutapm.com/api/v0/apps"

# App details
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" "https://scoutapm.com/api/v0/apps/{id}"

# Available metrics for an app
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" "https://scoutapm.com/api/v0/apps/{id}/metrics"

# Metric time-series (requires from/to)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/metrics/{metric_type}?from=2026-02-18T00:00:00Z&to=2026-02-19T00:00:00Z"

# List endpoints (requires from/to)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/endpoints?from=2026-02-18T00:00:00Z&to=2026-02-19T00:00:00Z"

# Endpoint metrics (endpoint is base64-url-encoded)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/endpoints/{endpoint_b64}/metrics/{metric_type}?from=...&to=..."

# List traces for endpoint (max 100, within 7 days)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/endpoints/{endpoint_b64}/traces?from=...&to=..."

# Trace detail (includes spans)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/traces/{trace_id}"

# Error groups (max 100, within 30 days)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/error_groups?from=...&to=..."

# Error group detail (includes latest_error with stacktrace)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/error_groups/{error_id}"

# Individual errors in a group (max 100)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/error_groups/{error_id}/errors"

# All insights (cached 5 min)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/insights"

# Insights by type: n_plus_one | memory_bloat | slow_query
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/insights/{type}?limit=20"

# Insights history (cursor-paginated)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/insights/history?from=...&to=...&limit=10"

# Insights history by type
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/insights/history/{type}?from=...&to=...&limit=10"

Endpoints Reference

Applications

MethodPathDescription
GET/appsList all apps
GET/apps/{id}Get app details

Metrics

MethodPathParamsDescription
GET/apps/{id}/metricsList available metric types
GET/apps/{id}/metrics/{metric_type}from, toTime-series data for a metric

Metric types: apdex, response_time, response_time_95th, errors, throughput, queue_time

Endpoints

MethodPathParamsDescription
GET/apps/{id}/endpointsfrom, toList endpoints with stats
GET/apps/{id}/endpoints/{endpoint}/metrics/{metric_type}from, toMetric data for one endpoint

Endpoint encoding: The {endpoint} path segment must be Base64 URL-encoded.

# Encode "UsersController#index" → base64
echo -n "UsersController#index" | base64
# VXNlcnNDb250cm9sbGVyI2luZGV4

Traces

MethodPathParamsDescription
GET/apps/{id}/endpoints/{endpoint}/tracesfrom, toList traces (max 100, 7-day window)
GET/apps/{id}/traces/{trace_id}Trace detail with spans

Trace detail includes: id, time, total_call_time, mem_delta, metric_name, uri, context, git_sha, allocations_count, limited, spans[]. V2 traces also include transaction_id and hostname.

Errors

MethodPathParamsDescription
GET/apps/{id}/error_groupsfrom, to, endpoint (optional, base64)List error groups (max 100, 30-day window)
GET/apps/{id}/error_groups/{error_id}Error group detail + latest error
GET/apps/{id}/error_groups/{error_id}/errorsIndividual errors (max 100)

Each error includes: message, created_at, request_params, request_uri, location, request_session, trace (stacktrace lines), context.

Insights

MethodPathParamsDescription
GET/apps/{id}/insightslimitAll insight types (cached 5 min)
GET/apps/{id}/insights/{type}limitSingle insight type
GET/apps/{id}/insights/historyfrom, to, limit, pagination_cursor, pagination_direction, pagination_pageHistorical insights
GET/apps/{id}/insights/history/{type}(same as above)Historical insights by type

Insight types: n_plus_one, memory_bloat, slow_query

Pagination: Cursor-based. Response includes pagination.has_more, pagination.pagination_cursor, and pagination.next_pagination_page. Pass pagination_direction=forward (default) or backward.

Time Steps

Duration determines the resolution of returned time-series data:

DurationStep
≤ 60 min1 minute
≤ 3 hrs2 minutes
≤ 12 hrs5 minutes
≤ 1 day10 minutes
≤ 3 days30 minutes
≤ 7 days1 hour
≤ 14 days2 hours

Response Format

All responses follow a standard envelope:

{
  "header": {
    "status": { "code": 200, "message": "OK" },
    "apiVersion": "0.1"
  },
  "results": { ... }
}

Error responses use the same envelope with codes 403 (bad key), 404 (not found), or 422 (bad params).

Workflow: Investigate a Slow Endpoint

# 1. Find the app
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" "https://scoutapm.com/api/v0/apps" | jq '.results.apps[] | {id, name}'

# 2. List endpoints sorted by response time (last 24h)
FROM=$(date -u -v-1d +%Y-%m-%dT%H:%M:%SZ)  # macOS
TO=$(date -u +%Y-%m-%dT%H:%M:%SZ)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/endpoints?from=$FROM&to=$TO" \
  | jq '.results | sort_by(-.response_time) | .[:10] | .[] | {name, response_time, throughput, error_rate}'

# 3. Get p95 response time series for the slowest endpoint
ENDPOINT_B64=$(echo -n "Controller#action" | base64)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/endpoints/$ENDPOINT_B64/metrics/response_time_95th?from=$FROM&to=$TO"

# 4. Pull traces to find the slow requests
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/endpoints/$ENDPOINT_B64/traces?from=$FROM&to=$TO" \
  | jq '.results.traces | sort_by(-.total_call_time) | .[:5]'

# 5. Inspect the slowest trace's spans
TRACE_ID=12345
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/traces/$TRACE_ID" \
  | jq '.results.trace.spans'

Workflow: Review Errors

# 1. List error groups (last 7 days)
FROM=$(date -u -v-7d +%Y-%m-%dT%H:%M:%SZ)
TO=$(date -u +%Y-%m-%dT%H:%M:%SZ)
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/error_groups?from=$FROM&to=$TO" \
  | jq '.results.error_groups | sort_by(-.errors_count) | .[:10] | .[] | {id, name, message, errors_count, last_error_at}'

# 2. Get detail + latest stacktrace
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/error_groups/{error_id}" \
  | jq '.results.error_group | {name, message, status, errors_count, latest_error}'

Workflow: Check Insights

# Quick overview — are there N+1s, memory bloat, or slow queries?
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/insights" \
  | jq '.results.insights | to_entries[] | {type: .key, count: .value.count, new: .value.new_count}'

# Drill into N+1 queries
curl -sS -H "X-SCOUT-API: $SCOUT_API_KEY" \
  "https://scoutapm.com/api/v0/apps/{id}/insights/n_plus_one?limit=10"

Common Pitfalls

  • Missing from/to params — most endpoints require ISO 8601 timestamps; omitting them returns 422
  • Endpoint encoding — the {endpoint} path segment must be base64-encoded; raw strings like Users#index will 404
  • Trace time window — traces endpoint is limited to a 7-day window
  • Error group time window — error_groups endpoint is limited to 30 days
  • Insights cache — current insights are cached for 5 minutes; don't poll more frequently
  • Max results — traces and error lists cap at 100 items; no built-in pagination for those endpoints
  • Time step granularity — you don't control it; it's determined by the duration of your from/to window (see Time Steps table)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.93%
按下载量换算41

Claude

28.86%
按下载量换算33

Cursor

19.04%
按下载量换算22

Gemini CLI

8.26%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills