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.
npx skills add fatfingererr/macro-skills --skill detect-atr-squeeze-regimegit clone --depth 1 https://github.com/fatfingererr/macro-skillsWrote 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.
[](https://agentmods.dev/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime)<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime/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.
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00070 | $0.03116 |
| Opus 5 | $0.00035 | $0.01558 |
| Sonnet 5 | $0.00014 | $0.00623 |
| Haiku 4.5 | $0.00007 | $0.00312 |
Grade A, and why
detect-atr-squeeze-regime 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 11d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 293 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<essential_principles>
傳統 ATR 是絕對值(價格單位),不同價位資產無法比較。 將 ATR 轉換為百分比(ATR / Close * 100)後:
- 可跨資產比較波動強度
- 能建立「常態基準」(3 年移動均值)
- 用「倍率」判定是否進入異常波動區
ATR% = (14-day EMA of True Range) / Close * 100
Ratio = Current ATR% / 3-year Rolling Mean ATR%
| 行情 | ATR% 條件 | Ratio 條件 | 市場特徵 |
|---|---|---|---|
orderly_market |
常態區間 | < 1.2 | 技術位有效、停損精準、趨勢追蹤可靠 |
elevated_volatility_trend |
偏高 | 1.2 - 2.0 | 技術位減效、需放寬停損、仍有方向性 |
volatility_dominated_squeeze |
>= 高波門檻 | >= 2.0 | 技術位失靈、停損頻被掃、反身性主導 |
擠壓行情的判定需要同時滿足:
- ATR% >=
high_vol_threshold_pct(預設 6%) - Ratio >=
spike_threshold_x(預設 2.0)
當進入 volatility_dominated_squeeze 行情:
價格運動被「被迫流」主導:
- 保證金調整 / 槓桿去化
- 期權 Delta/Gamma 避險
- 空頭回補
- 被動風險平價再平衡
技術位可靠度下降:
- 突破/跌破更常是流動性與風控觸發的結果
- 不代表基本面改變或趨勢確認
停損脆弱性:
- 同一口波動可掃過多層 stops
- 低時間尺度的 conviction trading「結構性受損」
- 宏觀看對也難撐:短期雜訊大到足以讓方向正確的部位先被洗掉
當偵測到擠壓行情時:
| 調整項目 | 秩序市場 | 擠壓行情 |
|---|---|---|
| 停損倍數 | 1.0-1.5 ATR | 2.0-3.0 ATR |
| 倉位縮放 | 正常 | 降至 1/ATR% |
| 時間框架 | 日內/短線 | 切換到較長週期 |
| 工具選擇 | 裸倉位 | 期權/價差結構 |
| 技術位信任 | 高 | 低(視為雜訊) |
</essential_principles>
- 計算 ATR%:14 日 EMA 平滑的真實波幅百分比
- 建立基準:3 年滾動均值作為「常態」參照
- 判定行情:比較當前值與基準的倍率
- 輸出建議:停損調整、倉位縮放、技術位信任度
輸出:行情判定、ATR% 數值、倍率、可操作的風控建議。
<quick_start>
最快的方式:偵測白銀(SI=F)
cd skills/detect-atr-squeeze-regime
pip install pandas numpy yfinance pandas_ta # 首次使用
python scripts/atr_squeeze.py --symbol SI=F --quick
輸出範例:
{
"symbol": "SI=F",
"as_of": "2026-01-14",
"regime": "volatility_dominated_squeeze",
"atr_pct": 7.23,
"atr_ratio_to_baseline": 2.41,
"tech_level_reliability": "low",
"tech_level_reliability_score": 28,
"suggested_stop_atr_mult": 2.5,
"position_scale": 0.41
}
完整分析:
python scripts/atr_squeeze.py --symbol XAGUSD --start 2020-01-01 --end 2026-01-01 --output result.json
生成視覺化儀表盤:
pip install matplotlib # 首次使用
python scripts/plot_atr_squeeze.py --symbol SI=F --output output/
儀表盤包含:
- 價格走勢圖
- ATR% 波動率時間序列
- ATR 倍率儀表盤
- 當前狀態與風控建議面板
</quick_start>
- 快速偵測 - 檢查單一資產的當前行情狀態
- 多資產掃描 - 掃描多個資產尋找擠壓行情
- 歷史回測 - 回溯識別過去的擠壓期間
- 持續監控 - 設定警報當行情切換時通知
- 方法論學習 - 了解 ATR 擠壓行情的理論基礎
請選擇或直接提供資產代碼開始分析。
路由後,閱讀對應文件並執行。
<directory_structure>
detect-atr-squeeze-regime/
├── SKILL.md # 本文件(路由器)
├── skill.yaml # 前端展示元數據
├── manifest.json # 技能元數據
├── workflows/
│ ├── detect.md # 單資產偵測工作流
│ ├── monitor.md # 多資產監控工作流
│ └── backtest.md # 歷史回測工作流
├── references/
│ ├── methodology.md # ATR 擠壓行情方法論
│ ├── input-schema.md # 完整輸入參數定義
│ └── data-sources.md # 資料來源說明
├── templates/
│ ├── output-json.md # JSON 輸出模板
│ └── output-markdown.md # Markdown 報告模板
├── scripts/
│ ├── atr_squeeze.py # 主偵測腳本
│ └── plot_atr_squeeze.py # 視覺化儀表盤腳本
└── examples/
└── xagusd-squeeze-2024.json # 範例輸出
</directory_structure>
What ships with it
13 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.
- examples/xagusd-squeeze-2024.json 2.2 KB
- manifest.json 2.6 KB
- references/data-sources.md 4.9 KB
- references/input-schema.md 5.8 KB
- references/methodology.md 5.2 KB
- scripts/atr_squeeze.py 19 KB runs code
- scripts/plot_atr_squeeze.py 15 KB runs code
- skill.yaml 13 KB
- templates/output-json.md 7.5 KB
- templates/output-markdown.md 5.0 KB
- workflows/backtest.md 3.8 KB
- workflows/detect.md 3.1 KB
- workflows/monitor.md 3.5 KB
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.
- 11d ago First seen · 293 lines · 70 tokens per session scan A cdb2be8ae90d
detect-atr-squeeze-regime is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 70 tokens to every session and 3,116 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-31.
Other skills, from other repositories
sector-rotation
An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.
strategy-pivot-designer
Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.
twitter-reader
Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…
chenhao-limit-up
A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.
trading-risk-gate
Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.
furusato
A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.