Chrono AI Weekly Report
Use this when someone asks for a weekly GitHub report — "本周我做了什么 / 周报 / weekly
report / what shipped this week" — for a GitHub account.
You (the agent) run the WHOLE flow yourself, calling your own tools — then actually
deliver. Do NOT just describe the steps; do NOT refuse because "the skill only formats".
Never ask the user for a token; your NyxID tools broker every credential. This skill owns
only the deterministic card/markdown formatting (step 6); you do all the GitHub reading,
analysis, and Lark sending.
How to run it
Resolve target + window. If the user gives a username, use it; otherwise resolve
the caller's own login with nyxid_proxy service api-github-pat: GET /user and read
login. Default the window to the last 7 days; honor an explicit since/week the user
names. Compute start and end as YYYY-MM-DD strings — you compute the dates, the
bundled script never reads a clock.
Fetch issues + PRs with nyxid_proxy service api-github-pat (PAT-backed so private
repos like aevatarAI/aevatar are visible). Run the Search API and merge items:
GET /search/issues?q=author:{login}+created:{start}..{end}&per_page=100&sort=updated
GET /search/issues?q=author:{login}+updated:{start}..{end}&per_page=100&sort=updated
(catches items created earlier but worked on this week)
Paginate while total_count exceeds what you have. Dedupe by html_url. Each item is a
PR when it has a pull_request field, otherwise an issue. Parse repository_url
(https://api.github.com/repos/{owner}/{repo}) and number from every item.
Enrich each PR with nyxid_proxy service api-github-pat:
GET /repos/{owner}/{repo}/pulls/{number} → state, draft, merged, merged_at,
mergeable_state, additions, deletions, changed_files, head.sha, base.ref.
- Optional CI rollup:
GET /repos/{owner}/{repo}/commits/{head_sha}/check-runs → count
conclusion failure/in_progress.
- Optional review state:
GET /repos/{owner}/{repo}/pulls/{number}/reviews.
Map each PR to a status: merged (merged=true), draft (draft=true), blocked
(mergeable_state in dirty/conflicting OR a required check failed), review (review
requested / changes requested), else open. If mergeable_state is null, GitHub is still
computing it — say "unknown", do not claim conflict-free.
Categorize. Bucket every item by its title prefix: feat/feature → Feature,
refactor → Refactor, fix/test/chore/docs → Fix / Test / Chore. Items without a
conventional prefix: judge from the title. Inside Feature, you may sub-group by theme
(e.g. 技能系统 / OpenAI 兼容 / Lark / 基础设施) using the section title.
Analyze with your own model and assemble the report object:
account, window:{start,end,label}
headline: one sentence — the week's throughline, not a list.
metrics: sum across the fetched PRs — additions, deletions, changed_files; plus
rework_commits (count items whose title matches review / r\d / gate).
sections: [{ title, items:[{ number, title, url, status, scope }] }] — url is the
PR/issue html_url (this is the hyperlink), scope is a short tag like the target
branch or #1698. List EVERY item; do not summarize away the long tail.
blockers: [{ title, url, why, cost }] — only genuinely blocked items (conflicting,
CI red, stale draft), each with why it is blocked and what it is holding up.
Build the deliverable deterministically. Run
scripts/build_weekly_report_payload.js with code_execute (Node), passing the report
object on stdin. It returns markdown and lark.body (an interactive card with a metrics
table, per-section hyperlinked rows, and a red header when blockers exist). Prefer this
script over hand-building the card; it is the deterministic source of truth. If you truly
cannot execute code, follow references/weekly-report-contract.md field-for-field.
Deliver.
- On Lark (the user is talking to you through a Lark bot): take the
chat_id from your
runtime conversation context — never hardcode or invent it — set it as receive_id, then
nyxid_proxy service api-lark-bot:
POST /open-apis/im/v1/messages?receive_id_type=chat_id with the returned lark.body
(msg_type is interactive, content is the stringified card).
- Otherwise, return the
markdown.
Report one line: how many issues and PRs were fetched, how many merged / open / blocked,
and where the report was delivered.
If GitHub returns no items in the window, say so plainly and stop.
Payload builder reference (step 6)
Bundled script: scripts/build_weekly_report_payload.js. Mode: single (build_report).
Input may be at the root, under report, or under body. It accepts sections, or the
aliases features / refactors / fixes as arrays. Per-item status accepts
merged|open|review|draft|blocked|closed (or infers from merged/draft booleans). It emits
either { needs_more_information: true, missing: ["report"] } or a
message_type: "weekly_report" object with markdown and lark.{path,query,body,card}.
Exact aliases, the card element shapes, and a full worked example are in
references/weekly-report-contract.md.
Guardrails
- Use real returned GitHub data only; never invent issue numbers, URLs, statuses, counts, or
diff metrics. Every hyperlink must be a real
html_url.
- Never fetch or store a token;
nyxid_proxy brokers GitHub and Lark credentials.
- The Lark
receive_id (chat_id) comes from your runtime context, never a literal in this skill.
- Conflict detail is API-level (
mergeable_state, check-runs, reviews). File-level conflict
diffs require a clone and are out of scope — report mergeable_state instead.
- Prefer running the bundled script over hand-building JSON.
1---2name: chrono-ai-weekly-report3version: "1.0"4description: Pulls a GitHub account's issues and pull requests for the week, analyzes what shipped, what is in progress, and what is blocked with real workload metrics, then renders a Lark interactive card with hyperlinked rows and a metrics table, or a markdown report. The agent runs the whole flow itself using its own NyxID-brokered tools.5metadata:6 source: https://skillmd.com/skills/chronoaiproject/chrono-ai-weekly-report7 category: plain8 tag:9 - aevatar10 - s-capability11 - payload-builder12 - github13 - weekly-report14 - lark15 clawdbot:16 emoji: "bar_chart"17 files:18 - "references/*"19 - "scripts/*"20---2122# Chrono AI Weekly Report2324Use this when someone asks for a weekly GitHub report — "本周我做了什么 / 周报 / weekly25report / what shipped this week" — for a GitHub account.2627**You (the agent) run the WHOLE flow yourself, calling your own tools — then actually28deliver.** Do NOT just describe the steps; do NOT refuse because "the skill only formats".29Never ask the user for a token; your NyxID tools broker every credential. This skill owns30only the deterministic card/markdown formatting (step 6); you do all the GitHub reading,31analysis, and Lark sending.3233## How to run it34351. **Resolve target + window.** If the user gives a `username`, use it; otherwise resolve36 the caller's own login with `nyxid_proxy` service `api-github-pat`: `GET /user` and read37 `login`. Default the window to the last 7 days; honor an explicit `since`/week the user38 names. Compute `start` and `end` as `YYYY-MM-DD` strings — you compute the dates, the39 bundled script never reads a clock.40412. **Fetch issues + PRs** with `nyxid_proxy` service `api-github-pat` (PAT-backed so private42 repos like `aevatarAI/aevatar` are visible). Run the Search API and merge `items`:43 - `GET /search/issues?q=author:{login}+created:{start}..{end}&per_page=100&sort=updated`44 - `GET /search/issues?q=author:{login}+updated:{start}..{end}&per_page=100&sort=updated`45 (catches items created earlier but worked on this week)46 Paginate while `total_count` exceeds what you have. Dedupe by `html_url`. Each item is a47 PR when it has a `pull_request` field, otherwise an issue. Parse `repository_url`48 (`https://api.github.com/repos/{owner}/{repo}`) and `number` from every item.49503. **Enrich each PR** with `nyxid_proxy` service `api-github-pat`:51 - `GET /repos/{owner}/{repo}/pulls/{number}` → `state`, `draft`, `merged`, `merged_at`,52 `mergeable_state`, `additions`, `deletions`, `changed_files`, `head.sha`, `base.ref`.53 - Optional CI rollup: `GET /repos/{owner}/{repo}/commits/{head_sha}/check-runs` → count54 `conclusion` failure/in_progress.55 - Optional review state: `GET /repos/{owner}/{repo}/pulls/{number}/reviews`.56 Map each PR to a status: `merged` (merged=true), `draft` (draft=true), `blocked`57 (`mergeable_state` in dirty/conflicting OR a required check failed), `review` (review58 requested / changes requested), else `open`. If `mergeable_state` is null, GitHub is still59 computing it — say "unknown", do not claim conflict-free.60614. **Categorize.** Bucket every item by its title prefix: `feat`/`feature` → Feature,62 `refactor` → Refactor, `fix`/`test`/`chore`/`docs` → Fix / Test / Chore. Items without a63 conventional prefix: judge from the title. Inside Feature, you may sub-group by theme64 (e.g. 技能系统 / OpenAI 兼容 / Lark / 基础设施) using the section `title`.65665. **Analyze with your own model** and assemble the `report` object:67 - `account`, `window:{start,end,label}`68 - `headline`: one sentence — the week's throughline, not a list.69 - `metrics`: sum across the fetched PRs — `additions`, `deletions`, `changed_files`; plus70 `rework_commits` (count items whose title matches `review` / `r\d` / `gate`).71 - `sections`: `[{ title, items:[{ number, title, url, status, scope }] }]` — `url` is the72 PR/issue `html_url` (this is the hyperlink), `scope` is a short tag like the target73 branch or `#1698`. List EVERY item; do not summarize away the long tail.74 - `blockers`: `[{ title, url, why, cost }]` — only genuinely blocked items (conflicting,75 CI red, stale draft), each with why it is blocked and what it is holding up.76776. **Build the deliverable deterministically.** Run78 `scripts/build_weekly_report_payload.js` with `code_execute` (Node), passing the `report`79 object on stdin. It returns `markdown` and `lark.body` (an interactive card with a metrics80 table, per-section hyperlinked rows, and a red header when blockers exist). Prefer this81 script over hand-building the card; it is the deterministic source of truth. If you truly82 cannot execute code, follow `references/weekly-report-contract.md` field-for-field.83847. **Deliver.**85 - **On Lark** (the user is talking to you through a Lark bot): take the `chat_id` from your86 runtime conversation context — never hardcode or invent it — set it as `receive_id`, then87 `nyxid_proxy` service `api-lark-bot`:88 `POST /open-apis/im/v1/messages?receive_id_type=chat_id` with the returned `lark.body`89 (`msg_type` is `interactive`, `content` is the stringified card).90 - **Otherwise**, return the `markdown`.91928. **Report** one line: how many issues and PRs were fetched, how many merged / open / blocked,93 and where the report was delivered.9495If GitHub returns no items in the window, say so plainly and stop.9697## Payload builder reference (step 6)9899Bundled script: `scripts/build_weekly_report_payload.js`. Mode: single (`build_report`).100Input may be at the root, under `report`, or under `body`. It accepts `sections`, or the101aliases `features` / `refactors` / `fixes` as arrays. Per-item status accepts102`merged|open|review|draft|blocked|closed` (or infers from `merged`/`draft` booleans). It emits103either `{ needs_more_information: true, missing: ["report"] }` or a104`message_type: "weekly_report"` object with `markdown` and `lark.{path,query,body,card}`.105106Exact aliases, the card element shapes, and a full worked example are in107`references/weekly-report-contract.md`.108109## Guardrails110111- Use real returned GitHub data only; never invent issue numbers, URLs, statuses, counts, or112 diff metrics. Every hyperlink must be a real `html_url`.113- Never fetch or store a token; `nyxid_proxy` brokers GitHub and Lark credentials.114- The Lark `receive_id` (chat_id) comes from your runtime context, never a literal in this skill.115- Conflict detail is API-level (`mergeable_state`, check-runs, reviews). File-level conflict116 diffs require a clone and are out of scope — report `mergeable_state` instead.117- Prefer running the bundled script over hand-building JSON.