Build, refresh, validate, and extend the AI-ris market radar dashboard. Use when Codex needs to work on a static investment dashboard that ranks US thematic ETFs, maps them to A-share listed ETF candidates, tracks influence-person market signals, refreshes data snapshots, adjusts the theme mapping schema, explains resonance/lead/divergence signals, or prepares the project for static deployment on GitHub Pages or similar hosts.
Resources
15Install
npx skillscat add zach0911/ai-ris Install via the SkillsCat registry.
SKILL.md
AI-ris
Overview
Use this skill to maintain the AI-ris dashboard that maps US thematic ETF strength into A-share listed ETF candidates and tracks influence-person market signals. The project is a static HTML/CSS/JavaScript app with tolerant Python snapshot generators.
Project Layout
index.html: app shell and visible Chinese UI labels.src/app.js: filtering, sorting, signal rendering, and client-side data loading.src/data.js: built-in sample data used whendata/latest.jsonis unavailable.src/styles.css: dashboard layout and responsive styling.data/latest.json: generated snapshot loaded by the page at runtime.scripts/generate_snapshot.py: refresh US and A-share ETF data while preserving the front-end schema.scripts/e2e_smoke.py: local end-to-end smoke test for snapshot generation and static serving.references/data-contract.md: schema, scoring, signal, and extension rules.
Standard Workflow
- Inspect the current schema before changing data or UI:
- Read
references/data-contract.md. - Sample existing records in
data/latest.jsonandsrc/data.js.
- Read
- Make narrowly scoped edits:
- Keep
data/latest.jsonandsrc/data.jsschema-compatible. - Preserve Chinese UI copy unless the user asks for another language.
- Prefer extending
scripts/generate_snapshot.pyover hand-editing generated fields.
- Keep
- Validate data generation:
- For deterministic local checks, run
python3 scripts/generate_snapshot.py --skip-us --skip-cn. - For live US data refresh, run
python3 scripts/generate_snapshot.py --skip-cnafter installingrequirements.txt. - Use
--skip-cnin CI unless the localfinance-all-in-onedependency is available.
- For deterministic local checks, run
- Validate the static app:
- Run
python3 scripts/e2e_smoke.py. - If UI behavior or CSS changed, also start
python3 -m http.server 5173and inspecthttp://localhost:5173.
- Run
- Commit only intentional snapshot changes:
- Snapshot generation updates
updatedAtanddate; review those diffs before committing.
- Snapshot generation updates
Data Rules
- Treat
themes[]as the public contract for the app. - Every theme must include
id,name,signal,confidence,lead,tags,us, andcn. - Every
usobject must includeprimary,etfs,returns,rel, andstrength. - Every
cn[]item must includecode,name,index,returns,amount,mappingScore,status, andreasons. - Use signal values exactly as Chinese strings:
共振,传导,背离. - Use strength keys exactly as
short,mid,long, andall. - Use return-period keys exactly as
1d,5d,20d,60d,120d, andytdwhere available.
Extension Guidance
- Add new themes by choosing a liquid US primary ETF, two to four related US ETFs, and one or more A-share ETF candidates.
- Keep
tagsbroad enough for synonym matching but specific enough to avoid unrelated ETF matches. - Prefer clear
reasons[]entries that explain direct name matches, index exposure, theme purity, liquidity, or substitute relationships. - Update
SYNONYMSinscripts/generate_snapshot.pywhen adding a theme family that needs Chinese/English tag expansion. - Keep fallback behavior tolerant: failed data sources should not break the page or delete existing usable fields.
Deployment Notes
- The app is static and can be served from GitHub Pages, Cloudflare Pages, or any static host.
- GitHub Actions runs
scripts/generate_snapshot.py --skip-cnbecause the A-share helper is local-only. - Browser fetches
./data/latest.json; use a local HTTP server for full preview instead of relying only onfile://.