card-refresh
Invoked by cron (or manually) to refresh the widgets on the ai-desk-card e-ink display with fresh data. Reads the current widget cache, decides which widgets need new data, pulls from the user's data sources (calendar, mail, git, weather APIs, etc.), and pushes back via the card-widget skill. Use when invoked headless from cron, or when user says "刷新一下卡片" / "refresh card" / "update widgets now".
npx skills add op7418/ai-desk-card --skill card-refresh --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# card-refresh — periodic widget data refresh You're invoked to re-pull data for whatever widgets are currently shown on the user's ai-desk-card 副屏. This typically runs from cron every 2 hours (see [REFRESH.md](./REFRESH.md) for the setup). Be quick, idempotent, and silent unless something's wrong. ## Operating principles - **Read first, push second**. Pull the current widget cache from `GET /widget` — it tells you which slots are filled with which widget types. Only refresh those; don't push new widget types unprompted. - **No data → don't push**. If a data source is unreachable (calendar not synced, mail offline), skip that widget. Leave the existing one in place rather than wiping with stale data. - **Be fast**. Don't burn 30 s on one data source. 5 s timeout per fetcher; move on. - **Be quiet**. No "I'm refreshing..." chatter when invoked from cron. Emit nothing on stdout unless there's an actionable error. ## What to do (every run) ### 1. Snapshot current cache ```bash curl -sf http://127.0.0.1:9877/widget | python3 -m json.tool ``` Parse `widgets[]`. For each `{slot, type, age}`, decide: - `age` < 60 s → just pushed, skip. - `type` in `{ai-status, ai-tasks}` → driven by conve
- Operating principles
- What to do (every run)
- 1. Snapshot current cache
- 2. Fetch fresh data per widget type
- 3. Push back
- 4. Done — exit
- When invoked interactively (not from cron)
- Error handling
- What NOT to do
- Helper scripts
curl -sf http://127.0.0.1:9877/widget | python3 -m json.tool
What does the card-refresh skill do?
Invoked by cron (or manually) to refresh the widgets on the ai-desk-card e-ink display with fresh data. Reads the current widget cache, decides which widgets need new data, pulls from the user's data sources (calendar, mail, git, weather APIs, etc.), and pushes back via the card-widget skill. Use when invoked headless from cron, or when user says "刷新一下卡片" / "refresh card" / "update widgets now".
How do I install it?
Run `npx skills add op7418/ai-desk-card --skill card-refresh --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From op7418/ai-desk-card, a repository with 136 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.