Build a daily GitHub issues digest with a scheduled prompt and a Space hook
To get a GitHub issues digest every morning in Cohub, schedule a prompt that runs a digest skill in a fixed Chat, and add a Space hook that posts each new digest file to a webhook as soon as it is written.
- Who
- Maintainers and team leads who start the day by checking what was opened on a repository overnight.
- When
- Reading new issues and pull requests one by one each morning takes longer than reading a summary would.
- Why
- The schedule, the agent that writes the summary and the hook that delivers it all live in one Space, and every run is kept as a Chat turn or a task you can inspect.


Checking overnight GitHub issues and pull requests one by one slows down morning triage. In a cloud Space, you can produce a daily GitHub issues digest by splitting timing from delivery: a cron-scheduled prompt wakes an agent to summarize the last 24 hours into a Markdown file, and a file-creation hook pushes that file to a webhook without burning a second model turn.
We verified this flow on cohub.live on 2026-11-17 inside a Space named issue-digest, targeting a public GitHub repository with the schedule set a few minutes ahead. The screenshots above come directly from that test run.
What each part owns in the Space
| Component | Responsibility | Location or command |
|---|---|---|
Skill issue-digest |
Pull issues and pull requests opened over the past 24 hours, save digests/<file>.md, and post bullet highlights in Chat |
.agents/skills/issue-digest/ |
| Scheduled prompt | Trigger the skill every morning inside the dedicated "Morning digest" Chat | cohub spaces prompt --cron |
| Space hook | Detect a newly created digest file and POST its contents to a webhook | .cohub/hooks/deliver-digest.yml |
The clock controls when the agent drafts the report; the newly created file controls when the webhook fires. Because delivery runs as a plain shell script, it adds zero extra agent turns.
Prepare the digest skill and a single reply thread
Start by uploading the issue-digest folder—containing SKILL.md and fetch.sh—into .agents/skills/issue-digest/. The full skill contents and steps for sharing one copy across Spaces as a Mod are covered in Write a SKILL.md file.
cohub -s issue-digest spaces files upload issue-digest --dir .agents/skills/issue-digestNext, create one dedicated Chat so every morning's summary lands in the same thread on both web and mobile:
cohub -s issue-digest spaces sessions create "Morning digest"
cohub -s issue-digest spaces sessions ls # copy the ID of "Morning digest"Schedule the morning prompt
Attach a daily cron schedule to that Chat ID and invoke the skill with a 24-hour window:
cohub -s issue-digest spaces prompt --cron "0 8 * * *" --timezone Europe/London \
--session <chat-id> --label Digest "/skill:issue-digest <owner>/<repo> 24"Scheduled prompts accept /skill: calls directly. During our 2026-11-17 run, the turn logged the skill invocation with source scheduled_task, finished in 25 seconds, and wrote digests/cohub-2026-11-17.md containing 15 pull requests and None. under Issues because no new issues had been opened that day.
Push new digest files through a Space hook
Add .cohub/hooks/deliver-digest.yml so the Space posts each report the moment the agent writes it:
# .cohub/hooks/deliver-digest.yml
schema: cohub.space-hook.v1
on:
event: space.fs.changed
paths:
- digests/*.md
kinds:
- create
env:
DIGEST_WEBHOOK_URL: https://httpbin.org/post
run: |
cd /workspace
printf '%s\n' "$COHUB_HOOK_FS_PATHS" | while IFS= read -r f; do
case "$f" in digests/*.md) ;; *) continue ;; esac
[ -f "$f" ] || continue
jq -n --rawfile text "$f" '{content: ($text | .[:1900])}' |
curl -fsS -H 'content-type: application/json' -d @- "$DIGEST_WEBHOOK_URL"
echo "delivered $f"
doneTwo details in this manifest prevent duplicate or noisy posts:
- Restricting
kindsto[create]fires the hook once per report, so later edits to the same Markdown file do not re-post it. COHUB_HOOK_FS_PATHSreceives every path touched in that change event regardless of filter rules, so the loop checksdigests/*.mdagain before callingcurl.
In our test against httpbin.org/post (which echoes requests back), the schedule fired at 11:14:00 UTC, the report file landed at 11:14:17 UTC, and the space_hook task completed a fraction of a second later with event create digests/cohub-2026-11-17.md, exit code 0, a 250 ms runtime, and the digest's first line in the payload.
Inspect runs and pause the schedule from the CLI
Every execution leaves either a scheduled run record or a space_hook task you can query from your terminal:
cohub cron-jobs runs <cron-job-id> # each scheduled run and its status
cohub tasks ls --space <space-id> --type space_hook # each hook run
cohub tasks get <task-id> --json | jq '.run.result.hooks' # hook output and exit code
cohub cron-jobs toggle <cron-job-id> off # pauseFor other schedule flags and options, check scheduled prompts. For the full list of hook events and environment variables, see Space hooks.
Practical boundaries to keep in mind
- Owner identity and billing: Both the scheduled turn and the hook execute under the Space owner's account and billing. The cron job consumes a normal agent turn; the hook runs as a shell command inside the sandbox.
- Cloud Space required: Space hooks are discovered only inside a cloud sandbox workspace, and a failed hook is logged on the task with no automatic retry.
- GitHub API behavior: GitHub's issues endpoint includes pull requests, which the skill splits into separate Issues and Pull Requests sections. For private repositories, add
GITHUB_TOKENin the Space's environment variables. - Discord delivery: Posting directly to Discord was not tested in this run; binding a Discord channel is documented under Channels.
Reference in the docs
This page: How to split a recurring report between a scheduled prompt and a Space hook, and how to check that both ran.
- CLI: spaces prompt with --cron, --timezone and --session
- Core concepts: scheduled prompts, Tasks and Channels
- Spaces: Space settings for environment variables and Channels
FAQ
Why use a hook for delivery instead of asking the agent to post?
The hook is a fixed script that runs the same way every time and costs no model tokens. The agent writes the summary; the hook only moves the file.
What happens on a day with nothing new?
The skill still writes the file, with None. under each empty section, and the hook posts it. In our run the repository had no new issues, so the Issues section read None.
Related
- Set up AI agent scheduled tasks that run inside your Cohub Space while you are away
You schedule AI agent tasks in Cohub with a scheduled prompt: a message the Space sends to its agent once at a set time or on a cron schedule, with every run kept as a Chat.
- Scheduled prompts: cron for AI agents
Scheduled prompts are cron for AI agents: a Cohub prompt sent to a Space after a delay, at an ISO time, or on a cron expression with a time zone, with each run recorded in a Chat.
- Space hooks: run scripts on AI agent events
Space hooks let you run scripts on AI agent events in Cohub: a YAML file in .cohub/hooks/ runs a command, sends a prompt or calls an App Action when a turn finishes, files change, a Save is created or a webhook arrives.
- How to write a SKILL.md file and reuse it across Cohub Spaces
To write a SKILL.md file for Cohub, put a folder with SKILL.md (name and description in front matter, steps in the body) under .agents/skills/ in a Space; to reuse it, save that Space and mount it as a Mod wherever it is needed.