SuperAPI AI Directory

gitcode-repo-daily

Data & analytics

View repository

Updated 10-15 19:58

About this skill

GitCode Repository Operations Report (Daily)

Generate a daily operations report based on the repository list specified in config or by the user (call API + write DB).After the summary is generated from the report data, it is automatically written to the DB during rendering。

When to use

  • The user expresses intents such as "generate daily report", "repository operations report", "today's updates", "organize into a daily report".
  • Optional: the user provides repository links or owner/repo, and date; if not provided, use the script to read from config.json the reposread by the script (the script is responsible for reading and writing config).
  • If the user specifies repositories for this run, pass --repos "owner/repo,..."when calling the script; the script will use it for this run and write it to config, and will use this list next time when none is specified.
  • If in config repos is empty and the user has not specified repositories, prompt: "Please specify the repositories to be counted in this conversation (will be saved as default), or configure repos in config.json".

Authentication

GITCODE_TOKEN: Read according to the following priority; if any location has a value, use it.

Priority Source Applicable platform
1 Process environment variable GITCODE_TOKEN All platforms
2 Windows user-level environment variable Windows
3 Windows system-level environment variable Windows
  • Linux / macOS: Reads only process environment variables. It is recommended to add ~/.bashrc or ~/.zshrc in export GITCODE_TOKEN="your_token"。
  • Windows: Process environment variable → user-level → system-level.
  • Required for daily report(call the API to pull the day's data).

Path conventions

  • Skill root directory(hereinafter referred to as SKILL_ROOT): the directory where this SKILL.md is located. The script locates itself via __file__ ,does not depend on the working directory。
  • Intermediate file directory:SKILL_ROOT/temp_dir/, automatically created by the script.
  • When executing the script, uniformly use thescript absolute path, no need to cd to a specific directory.
  • --report-json and --summaries-file relative paths of parameters are automatically resolved according to SKILL_ROOT (absolute paths may also be passed), and default values already exist so there is no need to specify them every time.

Fixed process (must be executed in this order)

Daily report

  1. Parse: Parse date(today/yesterday/YYYY-MM-DD) and repository list(optional).
  2. Call script: If the user specifies repositories for this run, pass --repos "owner/repo,..."(comma-separated); otherwise do not pass it.config is read and written by the script; you do not need to write config. python <SKILL_ROOT>/scripts/generate_daily_report.py [--date YYYY-MM-DD] [--repos "owner/repo,..."](default --type day). Requires GITCODE_TOKEN.
  3. Read result: When the script succeeds, itautomatically writes SKILL_ROOT/temp_dir/report.json(UTF-8 encoding), and also outputs to stdout.Prefer reading from the file(to avoid garbled Windows pipe encoding); if the file does not exist, then parse stdout.
  4. Error: If status == "error", prompt message and end.
  5. Prompt the user: If the script output or report.json contains repos_saved: true or repos_saved_message, you must tell the user in natural language: "It has been saved as the default repository list; next time, if no repository is specified, this list will be used." Do not mention implementation details such as config.json or --repos to the user.
  6. Success:
    • Read SKILL_ROOT/temp_dir/report.json(the script has already written it automatically; no manual saving is needed).
    • For each repository in report.repos that has no fetch_error , based on merged_prs_for_ai,generate on your ownthat repository'stoday's summary; then, based on the summaries of each repository, generateglobal one-sentence summary。

      Summary requirements: 1-2 sentences, ≤100 characters, summarizing the main direction of changes in that repository for the day. Example: "Merged 3 PRs today, involving NPU scheduling policy optimization and unit test additions."

    • Write each repository summary and the global summary as SKILL_ROOT/temp_dir/summaries.json(using the Write tool), in the following format:
      {
        "period_type": "day",
        "date": "2026-03-10",
        "repos": [
          {"repo": "owner/repo", "summary": "今日合并3个PR,涉及调度优化和单测补充。"}
        ],
        "global": "全局一句话摘要"
      }
      
    • The daily report Markdown must be generated using the script rendering mode: python <SKILL_ROOT>/scripts/generate_daily_report.py --render --output <用户指定的 .md 路径> The script automatically reads from temp_dir/report.json and temp_dir/summaries.json,and during rendering it also automatically writes the summaries to the DB. When executed multiple times on the same day, the DB automatically keeps the latest result. The report structure is uniquely determined by resources/daily_report.md . Do not rewrite the template structure yourself or skip rendering.

Prohibited

  • Do not guess or fabricate data before obtaining the script's stdout output. Call generate only once for the daily report.

Script and paths

  • scripts/generate_daily_report.py(the only script):
    • Generate daily report:--type day(default),[--date YYYY-MM-DD]、[--repos "owner/repo,..."]. Repository list: if --repos is not passed, read from config.json; if passed, use it for this run and write it to config (used next time when unspecified). Results are automatically written to temp_dir/report.json. stdout outputs only a brief status (file path),the complete data must be read from the file。
    • Render report:--render --output <PATH> [--template ]. The daily report uses the resources/daily_report.md template.During rendering, the summaries in summaries.json are automatically saved to the DB。
    • Save summaries separately(optional):--save-summaries, used only when not rendering but needing to write to the DB.
  • resources/daily_report.md: the fixed template for the daily report; do not modify it without authorization.
  • Configuration:config.json is read and written by the script (no need to write it); storage:resources/report.db。
  • The script uses __file__ to locate the skill root directory,does not depend on the working directory, and can be executed with absolute paths on Windows / Linux / macOS.

Examples (for unambiguous execution)

The following <S> represents <SKILL_ROOT>/scripts/generate_daily_report.py; when executing, replace it with the script's absolute path.

User intent Command
Generate today's daily report python <S>
Generate the March 8 daily report python <S> --date 2026-03-08
Generate the daily report for specified repositories (and save as default) python <S> --repos "owner/repo,owner2/repo2"
Render the report to a file (while automatically saving summaries to the DB) python <S> --render --output 报告路径.md

Report content structure (uniquely determined by the template)

Daily report must via --render using resources/daily_report.md template generation to ensure consistent output format. Structure: title (with emoji) → 1. Repository Overview (overall metrics table + global one-sentence summary) → 2. Per-repository Details (including clickable Issue/PR links, merged PR list, popular Issue details, and a summary for that repository) → 3. Action Recommendations (items of concern automatically identified based on data).

Reference

  • Design, config, DB tables, report Schema:README.md。

Historical Versions

v1.0.0 (2026-03-11)

  • 🎉 Initial version release
  • 📅 Support daily reports and summaries