my-skills
CLAUDE.md2 starsChanged 3 months agoMITView on GitHub
A portable Agent Skills repo, not an application. Skills follow the open SKILL.md spec (https://agentskills.io/specification) and install via npx skills add. No build, lint or test suite — verify changes by running the scripts directly (commands below). The why behind every rule here — measurements, post-mortems, history — lives in docs/architecture/ (one file per skill plus cross-cutting.md). Read the matching file before changing a rule; update it when the reasoning changes. docs/solutions/ holds searchable write-ups of past problems (YAML frontmatter:…
- Reads credentials
- Commits and pushes
In this repository4 other files it gives its agents.
- ai-industry-weeklySkill
- ai-pullback-dailySkill
- daily-risk-monitorSkill
- rust-best-practicesSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 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.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 88
When touching write, md5 assets/baseline.md before and after a rejected write — it must be byte-identical.
- Very specific: line 185
Run order: fetch → re-rate → validate → diff → report body → write → Slack.
- Very specific: line 225
Every script needing the weekly install resolves it through _weekly.py.
- Very specific: line 238
No third RUN_MODE; run_state.py MODES stays two.
- Very specific: line 244
Every fetch is its own standalone script.
- Very specific: line 263
Before deleting any ported script, run a live interleaved sh → py → sh → py comparison.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md 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
CLAUDE.md
A portable Agent Skills repo, not an application. Skills follow the open
SKILL.md spec (https://agentskills.io/specification) and install via
npx skills add. No build, lint or test suite — verify changes by running the
scripts directly (commands below).
The why behind every rule here — measurements, post-mortems, history — lives in
docs/architecture/ (one file per skill plus cross-cutting.md). Read the
matching file before changing a rule; update it when the reasoning changes.
docs/solutions/ holds searchable write-ups of past problems (YAML frontmatter:
module, tags, problem_type).
Layout
skills/<name>/SKILL.md plus optional references/ (on-demand docs),
scripts/, assets/ (templates, data, state). Adding a skill means a new row
in README.md's skills table. Every SKILL.md starts with:
name: <dir name, must match>
description: <written so an agent auto-invokes it; pack in trigger words>
license: MIT
compatibility: <runtime requirements, or "no script/package/network requirements">
metadata:
author: BigtoC
version: "0.1.0"
tags: "comma,separated"
triggers: "optional glob hints".claude/settings.json has a PreToolUse hook nudging toward
rust-best-practices on .rs edits — the documented way to force a skill's
auto-invocation.
| skill | what it is |
rust-best-practices | pure documentation |
ai-industry-weekly | weekly re-rating of an AI-compute quality table; owns assets/baseline.md and universe.json |
ai-pullback-daily | daily when-to-buy over the same universe, every calendar day; per-ticker technicals only on complete trading days, carried forward and labelled otherwise |
daily-risk-monitor | daily cross-market risk sweep → 7 hard sell thresholds + two-track decision; standalone |
Commands
Scripts resolve their data via __file__, so they run from any cwd.
W=skills/ai-industry-weekly
python3 $W/scripts/baseline.py show
python3 $W/scripts/baseline.py meta
python3 $W/scripts/baseline.py validate <table.md> --caps /tmp/fundamentals.json
python3 $W/scripts/baseline.py diff <table.md> --caps /tmp/fundamentals.json
python3 $W/scripts/baseline.py write <table.md> --date YYYY-MM-DD --caps /tmp/fundamentals.json
python3 $W/scripts/fetch_fundamentals.py # optional: --tickers NVDA,TSM --json out.json --quiet
python3 $W/scripts/hk_quote.py 0700.HK 1810.HK --json
python3 $W/scripts/etf_holdings.py # optional: --tickers LYTE,NCLD --check --json out.json --sleep 1
P=skills/ai-pullback-daily
python3 $P/scripts/industry_table.py --check # preflight: sibling install, staleness, row count
python3 $P/scripts/technicals.py --json /tmp/tech.json
python3 $P/scripts/perp_quotes.py --spot /tmp/tech.json --json /tmp/perp.json
python3 $P/scripts/neocloud_credit_monitor.py --emit both --no-history # drop --no-history only in a real run: it rewrites the tracked history file
R=skills/daily-risk-monitor
$R/scripts/fetch_all.sh launch # start the ten fetch units (--serial without job control)
$R/scripts/fetch_all.sh join # collect each unit's exit code from <unit>.rc
$R/scripts/fetch_all.sh list # every unit as a command runnable exactly as printed
python3 $R/scripts/snapshot.py show # also: diff today.json / write today.json --date YYYY-MM-DD (overwrites last_run.json)Needs python3 with requests and yfinance (neocloud_credit_monitor.py
also numpy); daily-risk-monitor's shell fetchers need bash + curl + awk, and
cnn_fng.sh alone needs jq. AV_API_KEYS (comma-separated, environment only —
never a file in the repo) enables etf_holdings.py's first tier; unset, it starts
at yfinance and the rest of the skill is unaffected.
Verifying baseline.py (also run from cd /tmp with absolute paths, and
check no output contains a local absolute path):
python3 $W/scripts/baseline.py show > /tmp/t.md
python3 $W/scripts/baseline.py validate /tmp/t.md # exit 0
python3 $W/scripts/baseline.py diff /tmp/t.md # 「本周评级无变动」
grep -v '^| ASML ' /tmp/t.md > /tmp/bad.md
python3 $W/scripts/baseline.py diff /tmp/bad.md # exit 1, 0 bytes on stdoutWhen touching write, md5 assets/baseline.md before and after a rejected
write — it must be byte-identical.
Two-place edits — the worst failure in this repo
Two copies of one rule silently disagreeing means whichever copy ran that day is what the report states as fact. Change every copy:
- The two
THdicts —neocloud_credit_monitor.pyandneocloud_credit_lite.py(stdlib cloud variant). Different key names, so not copy-pasteable.THcarries rules the tables don't spell out (L1_primary_window_days = 30), so also updatereferences/neocloud-credit.md. - The two
search-contract.md(one per daily skill; deliberate — no shared file is allowed). The common envelope (§2–§5 + the handoff receipt) is shared; group tables, dispatch lists, payload families, per-group caliber notes and sentinel sets (three vs four) are per-skill and must not be homogenised. Open item: thedaily-risk-monitorcopy lacks# 数据自身的日期,不是取数日onas_of. bars_fallback.pyvsmarket_fallback.py— separate on purpose (daily-risk-monitormay not import fromai-pullback-daily).scrub()andrel_display()— not deliberate, just unconverged: a fix is an N-place edit. Path-scrubbing is the public-repo leak rule, so a missed copy publishes a home directory. Count, never trust a written number:grep -rl _HOMEISH_RE --include='*.py' skills/(scrub) andgrep -rl 'def rel_display' --include='*.py' skills/. Converging is fine, butneocloud_credit_lite.pymust gain no import tying it to the rest of the script directory.
Things that must stay single-sourced: the industry table (baseline.md, written
only by baseline.py write), CASH_DEBT_TH (only in fetch_fundamentals.py;
never quote its numbers in rating-rules.md), fetch_all.sh's ten unit argv
lines (never restated in SKILL.md), signals 14–18 (crypto.py /
stock_perp.py only — the deleted .sh versions come back via git history, never
into the tree).
Cross-cutting rules
Missing data is never quietly safe
Record N/A / ⚪️ 数据暂缺, never estimate. ⚪️ counts toward neither numerator
nor denominator of the 7-threshold tally and carries a staleness figure in weeks.
Fallback chains — the rule
Eight chains exist; a ninth follows these: (1) fixed, written order; (2) label
the tier in text and --json; (3) Never merge tiers into one table;
(4) thresholds don't travel between tiers — recalibrate with a date, or N/A;
(5) what a degraded tier can't support is N/A with a reason, never computed from
partial data; (6) falling back is loud; (7) a fresh lower tier beats a stale
higher one — no holdings cache. An available tier is not an authoritative
one: the issuer's own ETF sheet still has to be pulled.
The one deliberate exception to (4): FCF's TTM and annual tiers share
CASH_DEBT_TH (same line, same 12-month window) — not an oversight.
JSON equivalence — the rule
--json carries everything the text output does, as fields; exit codes and
stderr are only redundant channels. (1) ok is never a literal — it is false
whenever any self-check failed; (2) a trigger that couldn't be evaluated is
null + reason, never false; (3) every text-branch prohibition is also a
field; (4) --quiet drops human rendering, never warnings — stderr stays live,
plus a top-level degraded: bool / degraded_reasons[].
Retrieval transport layer
The transport side returns readings and provenance only, never a 🟢🟡🔴 state,
threshold comparison or narrative; the schema enforces it. The two
search-contract.md are the skills' own contracts (edit normally, unlike other
references/*.md), but may only say how a caliber is carried, never restate
it. Cite other docs by anchor (`file.md`「verbatim phrase」 or
`file.md` §「heading」), never by line number.
.claude/agents/search-transport.md is optional. SKILL.md names the
capability, never the mechanism — no @agent-name or mcp__… in any SKILL.md.
Without it the parent searches itself (same contract, same files). Never add
isolation: worktree to it. Announce a fallback in the report body when it
changes the data's caliber; only in run output when the data is byte-identical.
Commands an agent types
Anything a SKILL.md tells it to run: no &, no rm with globs or variables,
no shell function definitions, no for/while loops — put them in a script.
Claude Code forces a permission prompt on these that no allow-rule can cover.
Open item: ai-pullback-daily still has this defect in step 1.1's ( … ) & and
in its while join loop.
Per-skill invariants
ai-industry-weekly
universe.jsonis the single source of the ticker set and row order; never hardcode a row count. Flags:hk_quoteroutes price fields tohk_quote.py;ratio_distorted/currencymark ADR/FX rows whose PS/PB/cash-flow ratios are meaningless. Itsratingslist sets the rating order, andfetch_fundamentals.pyrefuses to run unless it matches the cap rule's four tiers.baseline.mdis its own seed. Nobaseline.seed.md,history/,.bakor snapshots — rollback is git.- Run order: fetch → re-rate → validate → diff → report body →
write→ Slack. baseline.py:writevalidates first and on failure exits 1 untouched; no--force, ever.diffvalidates too; malformed input → exit 1, empty stdout (--jsoninstead emitsok:false/summary_produced:false/result:null). Validation covers header, row count, ticker set and order, rating vocabulary, empty cells, lazy placeholders (「见 Slack thread」), anduniverse.jsonitself.writerenders compact| a | b |itself. Parsing takes every|line, so a temp file holds one table. Output paths are relativized.- Rating caps:
fetch_fundamentals.pyemitscash_debt.caps;baseline.py --capsrefuses ratings above cap and caps files >7 days old or future-dated; without--capsit says so (caps_checked: false).--capsis repeatable: per ticker the most recently fetched file wins, and a missing ticker is judged against the union.cap: nullmeans "no cap" only whenevaluated == "full"; an applicable ticker not fully evaluated has an unknown cap (listed incaps_unevaluated+degraded_reasons) and may not be 🟢 if its FCF leg wasn't evaluated. The step-1 preview readsbaseline.mdonly throughbaseline.py'sTable/column_index— never a second parser. - Cap FCF: from the cash-flow statement, never
.infofreeCashflow(mappingF'sFCFfield stays untouched, reference only). TTM uses the same four quarter-ends as the income statement; TTM → latest annual → N/A, each verdict carrying tier and period end; either tier older thanmax_period_age_daysis refused; the TTM-miss reason goes infcf_fallback_notes. Retry statements on a freshyf.Ticker(yfinance caches empty frames). Leverage is net debt / EBITDA, not liabilities-to-assets. - HK price / 52w high / drawdown come from
hk_quote.py, never yfinance (dividend-adjusted). fetch_fundamentals.pyimports yfinance lazily inmain()and usesrequests.Session, not curl_cffi.etf_holdings.py: Alpha Vantage → yfinance (top-N only) → issuer page, no cache. Under top-N, swap / non-US / cash-T-bill totals are N/A. Any holdings figure in a report quotes itssourceand fetch date; the issuer sheet wins on conflict. AV throttling is HTTP 200 with anInformationbody — inspect every body; classify burst wording before daily wording. Invalid and exhausted keys look identical, so the quota message must admit a mistyped key, and every key failing on its first call means suspect the key.references/*.mdare verbatim migrations: edit only the line you must.
ai-pullback-daily
- Reads the weekly skill read-only (
baseline.md,universe.json,hk_quote.py); never writes there and never copies the table. - Every script needing the weekly install resolves it through
_weekly.py.AI_INDUSTRY_WEEKLY_DIRset but invalid always errors, never falls back. industry_table.py --checkfails loudly if the table is missing; it warns (exit 0) on >10 days stale, row count ≠ ticker count, or future date.neocloud_credit_monitor.pyowns tripwire ④ outright; the report quotes its verdict and never second-guesses it.technicals.pybars: yfinance →bars_fallback.py(US / KR; HK stays on yfinance +hk_quote.py; indices → N/A). Fallback rows carryvol_ratio_comparable: falseand suppress 「放量 ≥1.5x」.- US pre-market (weekday 04:00 ET–open,
session.US.premarket_window) isRUN_MODE=postcloseplus a ⏳ pre-market overlay (1mprepostbars, gated onpremarket_active, never onstate): headline price only, labelled 仅供参考 while the analysis still runs in full — never a close, a trigger or a bucket. No third RUN_MODE;run_state.pyMODESstays two. references/*.md(exceptsearch-contract.md) are verbatim migrations.
daily-risk-monitor
- Standalone: no sibling dependency. Shares no code with
ai-pullback-daily, even though both read Hyperliquid'sxyzpool — never merge the fetchers. - Every fetch is its own standalone script. Per-host headers: FRED never a
browser UA; Yahoo always one; CNN F&G browser UA + Referer + Origin. stdlib
urllibfails TLS here;requestsreaches FRED fine. fred.sh/cape.shstay shell (no Python packages needed); parallelism usescurl --parallel. Don't port them.fetch_all.sh listmust print commands runnable exactly as printed (with theSCRIPTS=/RUN=lines and real redirections). The units table's columns 2 (stdout target) and 3 (payload file) differ only formarket—joinchecks column 3; don't merge them.market_fallback.pyrefusesDX-Y.NYBandGC=F(→ N/A): never substituteDTWEXBGS, TencentusDX(a company), GLD or PAXG. Its tiers land on different dates (signals 21/22 on D-1, 19/26 on D), so it must emit a date-skew warning intodegraded_reasons.stock_perp.py: a shortassetCtxsgives that marketMissingMarket+ exit 3, never an abort. Keep the resolved entry inreferences/known-traps.md.assets/last_run.jsonholds every signal's tier plus both tracks, written bysnapshot.py writebefore the Slack push. Slack history is only a fallback; the skill must stay usable with no Slack at all.- Signals 3 and 12 (thresholds 6 and 7) have no stable source — never fabricate.
- Before deleting any ported script, run a live interleaved
sh → py → sh → pycomparison; a fixture oracle doesn't cover the transport layer. Open item: the oracle (replayed viaRISK_FIXTURE_DIR/RISK_FIXTURE_NOW) is not checked in, so a fresh clone cannot replay it. references/*.md(exceptsearch-contract.md) are verbatim migrations.
Public repo
BigtoC/my-skills is public. Skills ship no config file; Slack channel ids come
only from the environment. No channel or routine ids in code, and no real channel
id, absolute home path or username in a report body. Every notifying skill reads
one variable, NOTIFICATION_SLACK_CHANNEL_ID (unset → full report, push
skipped); new skills reuse it. AI_INDUSTRY_SLACK_CHANNEL_ID and
RISK_MONITOR_SLACK_CHANNEL_ID must not come back. .claude/settings.local.json
is gitignored and must stay so.
git push uses the SSH alias github.com-personal; gh may be a different
account — check gh auth status before opening a PR.
Commits and pull requests
- Commits: Conventional Commits 1.0.0 —
<type>[(scope)][!]: <description>, blank line, body, blank line, footers. Types:feat,fix,docs,chore,refactor,style(perf/test/ci/buildonly when genuinely that). Scope is the skill directory,claudeforCLAUDE.md/.claude/,readmeforREADME.md; comma-separate for two. Routine data commits:chore(<skill>): daily run YYYY-MM-DD. Breaking (a CLI,--jsonshape or state-file format a caller would trip over) takes!and/or aBREAKING CHANGE:footer (that token uppercase). Footers are git trailers (Token: value), soCo-Authored-By:goes after a blank line. - PR titles name the problem, not the change:
Problem: <the problem>orProblem(<skill>): …. GitHub appends(#NN)— don't add it. - Each commit leaves every script runnable (
python3 -m py_compileplus the area's verification commands). Split by concern; when two files can't change apart, keep them in one commit and say so in the body.
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.

