---
title: "Set up a daily GitHub issues digest in a Cohub Space"
description: "Automate a daily GitHub issues digest in Cohub: run an issue-digest skill on a cron schedule, write a Markdown report, and push it to a webhook with a hook."
lang: "en"
canonical: "https://cohub.live/guides/github-issues-digest"
image: "https://cohub.live/_seo/og/guides/github-issues-digest.png"
updated: "2026-12-02"
---

# 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.

![Terminal: a scheduled prompt runs /skill:issue-digest for a 24-hour window in the Morning digest Chat; the run completed and the turn is marked scheduled_task](https://cohub.live/_seo/img/guides/digest-schedule-run-dark.webp)

Source: <https://cohub.live>

![Terminal: the space_hook task for deliver-digest.yml fired on the new digest file, exited 0 in 250 ms and posted the digest](https://cohub.live/_seo/img/guides/digest-hook-run-dark.webp)

Source: <https://cohub.live>

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](https://cohub.live/guides/write-skill-md-file).

```bash
cohub -s issue-digest spaces files upload issue-digest --dir .agents/skills/issue-digest
```

Next, create one dedicated Chat so every morning's summary lands in the same thread on both web and mobile:

```bash
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:

```bash
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:

```yaml
# .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"
  done
```

Two details in this manifest prevent duplicate or noisy posts:
- Restricting `kinds` to `[create]` fires the hook once per report, so later edits to the same Markdown file do not re-post it.
- `COHUB_HOOK_FS_PATHS` receives every path touched in that change event regardless of filter rules, so the loop checks `digests/*.md` again before calling `curl`.

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:

```bash
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                    # pause
```

For other schedule flags and options, check [scheduled prompts](https://cohub.live/features/scheduled-prompts). For the full list of hook events and environment variables, see [Space hooks](https://cohub.live/features/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_TOKEN` in 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](https://cohub.live/docs/developers/cli): spaces prompt with --cron, --timezone and --session
- [Core concepts](https://cohub.live/docs/learn/core-concepts): scheduled prompts, Tasks and Channels
- [Spaces](https://cohub.live/docs/workspace/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](https://cohub.live/use-cases/schedule-ai-agent-tasks): 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](https://cohub.live/features/scheduled-prompts): 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](https://cohub.live/features/space-hooks): 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](https://cohub.live/guides/write-skill-md-file): 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.

## Sources

- [Cohub docs: CLI (prompt a Chat, schedules)](https://cohub.live/docs/developers/cli)
- [Cohub docs: Core concepts (Scheduled prompt, Task, Channel)](https://cohub.live/docs/learn/core-concepts)
- [Cohub docs: Spaces (settings: Env, Channels)](https://cohub.live/docs/workspace/spaces)

Updated Dec 2, 2026
