Agent skill

Bi Adaptive Threshold

by agentscope-ai in agentscope-ai/QwenPaw-Data

通过量化历史数据的自然波动幅度,自适应计算判定阈值。当需要从数据本身确定阈值(如波动阈值、影响度阈值等)、而非使用固定值时调用。仅适用于日/周粒度阈值确定。

Apache-2.0Auto-check passed

Install Bi Adaptive Threshold

skills CLI
$ npx skills add agentscope-ai/QwenPaw-Data --skill bi-adaptive-threshold -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install agentscope-ai/QwenPaw-Data bi-adaptive-threshold --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/agentscope-ai/QwenPaw-Data.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/qwenpaw-data-skills/skills/atomic/bi-adaptive-threshold .claude/skills/bi-adaptive-threshold && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bi-adaptive-threshold
GitHub stars
127
Token cost
~726 tokens
SKILL.md length
135 words
Files
2 (incl. scripts)
Skills in repo
29
Repo updated
First seen
Licence
Apache-2.0

At a glance

通过量化历史数据的自然波动幅度,自适应计算判定阈值。当需要从数据本身确定阈值(如波动阈值、影响度阈值等)、而非使用固定值时调用。仅适用于日/周粒度阈值确定。

  • Works in 5 steps: 检查数据量是否充足(即:数据行数 < 最少数据行数),不足则直接返回 默认阈值 → 计算变化率序列,用 IQR 围栏法(四分位距 × IQR 倍数)剔除极端异常值 → 通过 ruptures 库检测结构性变化点,将数据划分为若干分段 → …
  • Runs Python scripts from its folder; calls python

What it does

Bi Adaptive Threshold is an agent skill from agentscope-ai/QwenPaw-Data. 通过量化历史数据的自然波动幅度,自适应计算判定阈值。当需要从数据本身确定阈值(如波动阈值、影响度阈值等)、而非使用固定值时调用。仅适用于日/周粒度阈值确定。

Its SKILL.md is about 730 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/adaptive_threshold.py`).

The repository describes itself as: Agentic enterprise data analytics: governed facts (DataBridge), reusable methodology (Skill-Hub), and controllable execution (Host). The licence is Apache-2.0.

Example prompts

  • “/bi-adaptive-threshold”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. 检查数据量是否充足(即:数据行数 < 最少数据行数),不足则直接返回 默认阈值
  2. 计算变化率序列,用 IQR 围栏法(四分位距 × IQR 倍数)剔除极端异常值
  3. 通过 ruptures 库检测结构性变化点,将数据划分为若干分段
  4. 取最后一段平稳区间
  5. 最终阈值 = 标准差 × 标准差倍数,并限制在 [阈值下限, 阈值上限] 范围内,避免阈值过于敏感或过于迟钝

What it can do on your machine

Read from SKILL.md and the folder at commit e0bae36. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bi Adaptive Threshold loads about 726 tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 135 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~726

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from agentscope-ai/QwenPaw-Data at commit e0bae36, republished under its Apache-2.0 licence (© agentscope-ai). 135 words, ~726 tokens.

Download SKILL.mdSave it as .claude/skills/bi-adaptive-threshold/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
bi-adaptive-threshold
description
通过量化历史数据的自然波动幅度,自适应计算判定阈值。当需要从数据本身确定阈值(如波动阈值、影响度阈值等)、而非使用固定值时调用。仅适用于日/周粒度阈值确定。

bi-adaptive-threshold

基于标准差衡量数据的自然波动幅度,从数值序列中自适应计算阈值,常见场景:

  • 异常检测:确定指标波动率的异常阈值
  • 影响度判定:确定事件影响度的显著性阈值
  • 其他需要从数据分布中推导合理边界的场景

适用范围:仅适用于日粒度和周粒度的阈值计算。

执行步骤

1:数据准备

包含时间序列数据的 CSV 文件,至少包含以下两列:

列说明示例
日期列时间标识日期
数值列需要计算阈值的目标数值序列访问用户数

示例:

csv
日期,访问用户数
2025-01-01,10000
2025-01-02,10500
2025-01-03,9800

若上游步骤已产出可用数据文件则直接使用,否则自行取数。默认取近 90 天数据,若可用数据不足 90 天则取全部。

2:执行阈值计算

按以下优先级选择计算方式,命中即停:

方式一:使用脚本

路径: scripts/adaptive_threshold.py

原理:

  1. 检查数据量是否充足(即:数据行数 < 最少数据行数),不足则直接返回 默认阈值
  2. 计算变化率序列,用 IQR 围栏法(四分位距 × IQR 倍数)剔除极端异常值
  3. 通过 ruptures 库检测结构性变化点,将数据划分为若干分段
  4. 取最后一段平稳区间:
    • 若最后一段不足 最少数据行数,说明稳定数据不够,可能处于业务初期,返回 默认阈值;
    • 计算该段数据标准差,若标准差 ≥ 阈值上限,说明当前仍处于剧烈波动期,返回 默认阈值
  5. 最终阈值 = 标准差 × 标准差倍数,并限制在 [阈值下限, 阈值上限] 范围内,避免阈值过于敏感或过于迟钝

若脚本适用于当前场景,按以下方式调用:

参数:

参数说明默认值
--input-file输入数据文件路径(必填)
--date-col日期列名(必填)
--metric-col数值列名(必填)
--default-threshold默认阈值,按指标类型区分,详见下方说明(必填)
--min-periods最少数据行数30
--iqr-multiplierIQR 倍数1.5
--std-multiplier标准差倍数3.0
--threshold-min阈值下限0.05
--threshold-max阈值上限0.20
--ruptures-methodruptures 库的变化点检测算法(pelt/binseg/window)pelt
--ruptures-penaltyruptures 库的变化点检测的惩罚系数,值越大分段越少None (自动计算)

--default-threshold 是数据不足或波动剧烈时的兜底值,调用时应根据指标类型传入不同的值:

  • 量值指标:默认 10%(即 --default-threshold 0.10)
  • 率值指标:根据率值所在区间差异化设置:
    • 率值在 [40%, 60%]:±5%(即 --default-threshold 0.05)
    • 率值在 [20%, 40%) 或 (60%, 80%]:±3%(即 --default-threshold 0.03)
    • 率值在 [0%, 20%) 或 (80%, 100%]:±2%(即 --default-threshold 0.02)

调用示例:

bash
python scripts/adaptive_threshold.py \
  --input-file data.csv \
  --date-col "日期" \
  --metric-col "访问用户数"

输出格式:

# 正常
threshold: 0.14

# 数据不足
threshold: 0.10 (数据不足,使用默认阈值)

# 波动剧烈
threshold: 0.10 (波动剧烈,使用默认阈值)
方式二:自行实现

若脚本不适用于当前场景(如数据结构不匹配、场景特殊、用户有自定义需求等),基于上述核心思想自行实现阈值计算。

© agentscope-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in packages/qwenpaw-data-skills/skills/atomic/bi-adaptive-threshold of agentscope-ai/QwenPaw-Data.

  • SKILL.md
  • scripts/adaptive_threshold.py

Open the folder on GitHubat commit e0bae36

Compare with similar skills

Bi Adaptive Threshold next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bi Adaptive Threshold compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bi Adaptive Threshold this skillagentscope-ai/QwenPaw-Data127—~726Automated safety check: PassApache-2.0
Agent Adaptive Coordinatorruvnet/ruflo74k2 repos~4kAutomated safety check: PassMIT
Create Agent Adapterpaperclipai/paperclip99k—~8kAutomated safety check: PassMIT
Stellar Multisig Threshold Coordinatorsickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Audit Adaptivityben-manes/caffeine18k—~3.1kAutomated safety check: PassApache-2.0
OpenCLI Adapter Authorjackwener/OpenCLI30k1 repos~3.4kAutomated safety check: PassApache-2.0

Similar skills

  • Agent skill for adaptive-coordinator - invoke with $agent-adaptive-coordinator

    74k GitHub starsUsed in 2 repos~4k tokens
    Data & AnalyticsAuto-check passed
  • Create Agent Adapter

    paperclipai/paperclip

    Create or modify Paperclip agent adapters across server, UI, and CLI surfaces.

    99k GitHub stars~8k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Stellar Multisig Threshold Coordinator

    sickn33/agentic-awesome-skills

    Multi-signature signer and threshold coordination register: weight configurations, master key locks, and cosigner quorum thresholds for Stellar.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Audit Adaptivity

    ben-manes/caffeine

    Audit the adaptive window hill-climber and region-resize logic for implementation defects (not algorithm quality)

    18k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • OpenCLI Adapter Author

    jackwener/OpenCLI

    Walks through writing an OpenCLI adapter for a new site or a new command on an existing one, from first recon and field decoding to coding and verification.

    30k GitHub starsUsed in 1 repo~3.4k tokens
    DevelopmentAuto-check passed
  • MCP Create Adaptive Cards

    github/awesome-copilot

    Official

    Skill converted from mcp-create-adaptive-cards.prompt.md. An agent skill from github/awesome-copilot.

    40k GitHub starsUsed in 1 repo~3.1k tokens
    Agent WorkflowsAuto-check passed

More from agentscope-ai/QwenPaw-Data

All 29 skills in this repo
  • Bi Report Generation

    agentscope-ai/QwenPaw-Data

    将 BI 数据分析结果组织成可视化 HTML 报告。当分析完成、需要生成报告时调用. An agent skill from agentscope-ai/QwenPaw-Data.

    127 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed
  • Fetch Data

    agentscope-ai/QwenPaw-Data

    取数 / 查数据 / 拉数据 / 跑 SQL。把自然语言取数需求转为 SQL,经数据湖仓执行后返回查询结果供下游分析。任何需要业务数据的任务在工作区缺少对应文件时都必须先调用此技能——覆盖 BI 业务分析、留存 / 转化 / 同期群分析、数据探索 EDA、统计建模、定量计算、元数据查询、数据查询。命中任一即触发:(1) 直接索要指标或记录,如「DAU 多少」「上月销售额」「3…

    127 GitHub stars~2.5k tokensUpdated 5 days ago
    Auto-check passed
  • Bi Anomaly Detection

    agentscope-ai/QwenPaw-Data

    基于阈值检测时间序列中的显著异常波动点。当需要找出指标异常波动日期、识别数据异动时调用. An agent skill from agentscope-ai/QwenPaw-Data.

    127 GitHub stars~637 tokensUpdated 5 days ago
    Auto-check passed
  • Bi Attribution Analysis

    agentscope-ai/QwenPaw-Data

    计算各维度(组)值对指标变动的贡献度,支持可加型量值指标和加权平均型/率值指标。当需要计算贡献度、解释指标"为什么涨/跌"时调用。

    127 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed
  • Bi Causal Attribution

    agentscope-ai/QwenPaw-Data

    从运营周报、活动文档、对话输入或文档工具 API 中提取业务事件,与指标异常时间窗口对齐,生成有证据支撑的因果归因假设并排序。当已知指标存在异常波动、需要从外部文档证据中解释"为什么"时调用。

    127 GitHub stars~1.3k tokensUpdated 5 days ago
    Auto-check passed
  • Bi Clustering

    agentscope-ai/QwenPaw-Data

    对用户、产品等业务对象做分群:用波士顿矩阵法做象限分群,或用分层聚类、K-means、DBSCAN 等聚类技术分群。当需要做客群/产品分群、象限策略、画像或密度型子结构发现时调用。触发条件:当对话中出现“分群”、“分类”、“聚类”、“不同类型”、“不同场景”等体现分群分析词语时触发。

    127 GitHub stars~1.6k tokensUpdated 5 days ago
    Auto-check passed

Questions about Bi Adaptive Threshold

What does Bi Adaptive Threshold do?

通过量化历史数据的自然波动幅度,自适应计算判定阈值。当需要从数据本身确定阈值(如波动阈值、影响度阈值等)、而非使用固定值时调用。仅适用于日/周粒度阈值确定。. Bi Adaptive Threshold is an agent skill from agentscope-ai/QwenPaw-Data.

How do I install Bi Adaptive Threshold in Claude Code?

Run `npx skills add agentscope-ai/QwenPaw-Data --skill bi-adaptive-threshold -a claude-code`. Or copy the skill folder (packages/qwenpaw-data-skills/skills/atomic/bi-adaptive-threshold in agentscope-ai/QwenPaw-Data) into .claude/skills/bi-adaptive-threshold in your project. Claude Code loads it when a task matches its description.

How do I install Bi Adaptive Threshold in Codex?

Run `npx skills add agentscope-ai/QwenPaw-Data --skill bi-adaptive-threshold -a codex`. Or copy the skill folder (packages/qwenpaw-data-skills/skills/atomic/bi-adaptive-threshold in agentscope-ai/QwenPaw-Data) into .agents/skills/bi-adaptive-threshold in your project. Codex loads it when a task matches its description.

Can I use Bi Adaptive Threshold in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agentscope-ai/QwenPaw-Data --skill bi-adaptive-threshold -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bi-adaptive-threshold, .gemini/skills/bi-adaptive-threshold, .github/skills/bi-adaptive-threshold and .opencode/skills/bi-adaptive-threshold in your project.

What does Bi Adaptive Threshold need to run?

Going by SKILL.md and its folder, Bi Adaptive Threshold needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Bi Adaptive Threshold access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Bi Adaptive Threshold safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Bi Adaptive Threshold use?

Bi Adaptive Threshold is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bi Adaptive Threshold use?

About 726 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bi Adaptive Threshold?

Skills that share tags, products or a category with Bi Adaptive Threshold: Agent Adaptive Coordinator (ruvnet/ruflo, 74k stars), Create Agent Adapter (paperclipai/paperclip, 99k stars), Stellar Multisig Threshold Coordinator (sickn33/agentic-awesome-skills, 47k stars) and Audit Adaptivity (ben-manes/caffeine, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bi Adaptive Threshold?

agentscope-ai (a GitHub organization) maintains it in agentscope-ai/QwenPaw-Data, which has 127 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 5, 2026.

Source: agentscope-ai/QwenPaw-Data on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.