bug-scan
Skill3 starsChanged 4 months agoMITView on GitHub
Classifier-anomaly detector for swing-scan, morning-brief, and external-scanner workflows. Detects Pattern B shapes (absent-with-subs, silent, ghost), sub-signal weight drift, L3 calibration skew, and cross-TF classification contradictions. Audit 2026-06-23 #2.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- AlvaroVFon/skillstheir own version, first seen Oct 13, 2026
- wukun2005-gif/ai-skillstheir own version, first seen May 10, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- AlvaroVFon/skills★ 2same name
- wukun2005-gif/ai-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- beadsSkill
- backtest-engineSkill
- backtest-pipelineSkill
- backtest-trend-minerSkill
- daily-trade-pickSkill
- execution-kraken-perpsSkill
- execution-kraken-spotSkill
- l3-conviction-scanSkill
- market-accumulationSkill
- market-basisSkill
- market-breadthSkill
- market-breakoutSkill
- market-emaSkill
- market-exhaustionSkill
- market-fibonacciSkill
- market-liquidity-sweepSkill
- market-macdSkill
- market-macroSkill
- market-moversSkill
- market-notesSkill
- market-overviewSkill
- market-rsiSkill
- market-snapshotSkill
- market-squeezeSkill
- market-s-rSkill
- market-stateSkill
- market-trend-qualitySkill
- market-trendSkill
- market-valuationSkill
- market-volatilitySkill
- market-volumeSkill
- market-watchlistSkill
- portfolio-mgmtSkill
- position-watchdogSkill
- risk-engineSkill
- run-all-l2Skill
- run-all-l3Skill
- run-watchlistSkill
- strategy-accumulation-swingSkill
- strategy-breakout-confirmSkill
- strategy-exhaustion-fadeSkill
- strategy-fitness-heatmapSkill
- strategy-funding-carrySkill
- strategy-liquidity-sweepSkill
- strategy-mean-reversionSkill
- strategy-trend-followSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
After running run-all-l2 or run-all-l3 — pipe the envelope through --from-json to surface bugs the brief would otherwise miss.
- Very specific: line 100
Use --json to get the full list unsorted.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
bug-scan
Single source of truth for the classifier-anomaly rules the swing-scan workflow has been hunting since 2026-06-21. Designed for both automated-tick surfacing and LLM-agent surface so morning briefs and external scanners stop missing the same anomalies that swing-scan catches.
When to use
- After running
run-all-l2orrun-all-l3— pipe the envelope through--from-jsonto surface bugs the brief would otherwise miss. An L3-only envelope now also surfaces cross-TF direction conflicts (alongdominant idea on one TF vs ashorton another for the same strategy), not just the L2 healthy-vs-weakening contradictions — so a merged multi-timeframerun-all-l3envelope no longer reports zero findings. SetBUG_SCAN_FROM_JSON_DEBUG=1to print abug-scan from-json: l2_keys=<n>, l3_keys=<n>line to stderr before the scan runs, which makes future "empty findings" regressions surface immediately. - Offline (no network):
--from-statereads the existing swing-scan state tracker and translates its open_findings into the bug-scan envelope. - Standalone for a fresh scan on ad-hoc tickers (does the fetch + run + detect all in one call).
When NOT to use
- For full L2/L3 analysis — use
run-all-l2/run-all-l3directly. This skill is a detector on top of their output, not a replacement. - For live trade signals — bug-scan is purely diagnostic. Never pair its output with execution.
Detection rules
| Shape | Tag | Trigger | Severity |
pattern_b_1 (absent-with-subs) | [BUG] | l2_fired=False AND ≥2 sub-signals present AND wsum > 0.30 | medium / high (wsum ≥ 0.5) |
pattern_b_2 (silent) | [BUG] | pattern.present=True AND classification=None AND any sub-signal present | high |
pattern_b_3 (ghost) | [BUG] | pattern.present=False AND classification populated | high |
weight_drift | [DRIFT] | sub-signal weights sum outside 1.0 ± 0.05 | medium |
l3_calibration_skew | [INFO] | ≥6 ideas, zero with conviction ≥ 4 | low (regime signal) |
cross_tf_contradiction | [INFO] | same ticker + L2 skill, healthy vs weakening across TFs | medium |
cross_tf_direction_conflict | [INFO] | same ticker + L3 strategy, long dominant idea on one TF vs short on another (both ideas conviction ≥ 2) | medium |
The first three shapes are the recurring Pattern B family: classifier
anomaly + L1 absence + non-null classification (ghost-classifier
shape). Weight drift catches the market-exhaustion 0.900 regression.
The L3 and cross-TF checks detect calibration skew and inter-timeframe
contradictions.
Usage
# Fresh fetch — positional tickers, comma-separated interval/period
uv run skills/bug-scan/scripts/run.py HYPEUSD SOLUSD AEROUSD \
--interval=1h,4h --period=1mo,6mo --json
# Read the swing-scan state tracker (no network)
uv run skills/bug-scan/scripts/run.py --from-state --json
# Pipe a pre-fetched run-all-l2 envelope
uv run skills/bug-scan/scripts/run.py --from-json /path/to/l2_envelope.json --jsonThe --interval / --period flags accept comma-separated lists paired
1:1. A single --period value is reused for every interval.
Output schema
{
"ok": true,
"findings": [
{
"tag": "[BUG]",
"shape": "pattern_b_1",
"ticker": "HYPEUSD",
"tf": "1h",
"skill": "market-trend-quality",
"summary": "Pattern B Shape #1: 3 subs (w=0.60) but pattern absent",
"wsum": 0.60,
"present_sub_signals": ["ema_alignment", "pullback_depth", "volume_confirmation"],
"severity": "medium"
}
]
}Findings are sorted high → medium → low severity for terminal output.
Use --json to get the full list unsorted.
State-resolved paths
--from-state(bare) reads from$XDG_DATA_HOME/market-skills/swing_scan_state.json. Pass--from-state=PATHto override. The env var must be set — the runner does not fall back to a host-specific default.- The fresh-fetch mode uses the same data provider stack as
run-all-l2/run-all-l3(Hyperliquid → CCXT → Kraken → YFinance).
Layer rules
- Sits between L2/L3 and the LLM narrative layer. Reads L2/L3 output, emits diagnostic findings. Does not gate trades.
- Detection rules use
analysis.contracts.l2_firedandl2_classification(the single source of truth for "did the L2 actually fire?") — never rawpattern.get("classification").
Output envelope (AXI)
--json output follows the canonical AXI envelope — {data, count, errors, help[]}. Pass --fields=<csv> to project or --full for the full payload. count is the item count (findings for bug-scan, ranked ideas for l3-conviction-scan, total journal entries for daily-trade-pick), help[] is contextual next-step command templates.
Home view (no-arg mode)
No-arg mode prints the home view from $XDG_DATA_HOME/market-skills/<skill>_last.json (last successful run). Errors are not cached.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

