一键导入
notification-hub
Operate the notification-hub API and web interface to manage notifications from GitHub, Slack, and Email sources.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Operate the notification-hub API and web interface to manage notifications from GitHub, Slack, and Email sources.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Edit the visual grid layout of a garden bed, assigning crops to cells on a canvas editor. Use when asked to arrange crops in a bed, draw a planting layout, move crops around, visualize companion planting placement, or check for enemy crop adjacency in a specific bed. Triggers include "layout editor", "bed grid", "draw the bed", "assign crops to cells", "companion warning in layout", or similar visual planning tasks.
Plan crop rotations, planting schedules, and companion planting for garden beds and fields. Use when asked to manage a farm, garden, or plot layout; schedule what to plant and when; check companion planting relationships; track rotation history; or generate a printable planting schedule. Triggers include "crop rotation", "planting schedule", "companion planting", "garden bed", "what to plant", "frost dates", or any task involving seasonal crop planning.
Log crop harvests with yield quantity, quality grade, field, and storage destination. Use when asked to record a harvest, check total yield for a crop or field, filter harvest history by date or grade, view analytics charts, or export harvest data. Triggers include "log harvest", "record yield", "harvest entry", "crop yield", "grade breakdown", "field yield", "harvest history", or any task involving tracking what was picked and where it went.
Query and interpret yield analytics data from harvest-logger. Use when asked about yield trends over time, comparing crop performance, finding the best-performing field, analyzing grade quality rates, running season comparisons, or generating data for external reports. Triggers include "yield trend", "top crops", "grade analysis", "field performance", "season comparison", "best yield", "harvest analytics", or any task requiring aggregated harvest data rather than individual entries.
Schedule and monitor irrigation zones with weather-aware skip rules and water usage tracking. Use when asked to manage irrigation timing, set up zone schedules, configure rain-based skip rules, check water usage, trigger manual watering, or apply seasonal duration presets. Triggers include "irrigation", "sprinkler schedule", "watering zones", "skip when raining", "water usage tracking", "manual run irrigation", or any task involving automated watering management.
Configure and troubleshoot weather-based irrigation skip rules using the Open-Meteo API. Use when asked to set up rain forecast skips, configure rain threshold values, debug why zones are or are not being skipped, check weather cache status, understand skip preview results, or tune skip rule sensitivity for your local climate. Triggers include "skip when rain", "weather threshold", "Open-Meteo", "skip preview", "rain forecast rule", "freeze protection", or any task involving weather-driven irrigation decisions.
| name | notification-hub |
| version | 1.0 |
| description | Operate the notification-hub API and web interface to manage notifications from GitHub, Slack, and Email sources. |
| tools | ["Bash","Read","Write","Edit"] |
notification-hub is a unified notification aggregator. It ingests notifications from GitHub, Slack, and Email, normalises them into a single feed, and lets you filter, mute, label, archive, and digest them through a web UI and REST API.
The server listens on PORT (default 3000). Set these variables before running:
NOTIFICATION_HUB_PORT=3000
NOTIFICATION_HUB_DB=./data/notifications.db
NOTIFICATION_HUB_ENCRYPTION_KEY=<32-byte hex> # AES-256-GCM key for OAuth token storage
NOTIFICATION_HUB_SESSION_SECRET=<random>
GITHUB_CLIENT_ID=<app client id>
GITHUB_CLIENT_SECRET=<app client secret>
GITHUB_CALLBACK_URL=http://localhost:3000/auth/github/callback
SLACK_CLIENT_ID=<app client id>
SLACK_CLIENT_SECRET=<app client secret>
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=alerts@example.com
SMTP_PASS=<password>
DIGEST_RECIPIENT=you@example.com
pnpm install
pnpm dev # development with hot reload
pnpm build && pnpm start # production
Or with Docker:
docker compose up
All routes are prefixed /api. Authenticate with the session cookie or the API token via Authorization: Bearer <token>.
# List notifications (most recent first)
curl http://localhost:3000/api/notifications
# Filter by source, read status, priority
curl "http://localhost:3000/api/notifications?source=github&unread=1&priority=high"
# Full-text search
curl "http://localhost:3000/api/notifications?q=auth+middleware"
# Get a single notification
curl http://localhost:3000/api/notifications/:id
# Mark as read
curl -X PATCH http://localhost:3000/api/notifications/:id \
-H 'Content-Type: application/json' \
-d '{"read": true}'
# Set priority
curl -X PATCH http://localhost:3000/api/notifications/:id \
-H 'Content-Type: application/json' \
-d '{"priority": "high"}'
# Archive
curl -X POST http://localhost:3000/api/notifications/:id/archive
# Bulk mark read
curl -X POST http://localhost:3000/api/notifications/bulk \
-H 'Content-Type: application/json' \
-d '{"ids": ["id1","id2"], "action": "read"}'
# Bulk archive
curl -X POST http://localhost:3000/api/notifications/bulk \
-H 'Content-Type: application/json' \
-d '{"ids": ["id1","id2"], "action": "archive"}'
# List connected sources
curl http://localhost:3000/api/sources
# Get source detail
curl http://localhost:3000/api/sources/:id
# Trigger manual sync
curl -X POST http://localhost:3000/api/sources/:id/sync
# Disconnect a source
curl -X DELETE http://localhost:3000/api/sources/:id
# Update watched repos (GitHub)
curl -X PATCH http://localhost:3000/api/sources/:id \
-H 'Content-Type: application/json' \
-d '{"config": {"repos": ["acme/api-gateway","acme/frontend"]}}'
# Update watched channels (Slack)
curl -X PATCH http://localhost:3000/api/sources/:id \
-H 'Content-Type: application/json' \
-d '{"config": {"channels": ["C012ABCDE","C999FGHIJ"]}}'
# List rules
curl http://localhost:3000/api/mute-rules
# Create a rule
curl -X POST http://localhost:3000/api/mute-rules \
-H 'Content-Type: application/json' \
-d '{
"pattern": "repo:acme/billing-api",
"source": "github",
"expiresAt": null
}'
# Create a time-limited rule
curl -X POST http://localhost:3000/api/mute-rules \
-H 'Content-Type: application/json' \
-d '{
"pattern": "title:chore*",
"source": "github",
"expiresAt": "2026-04-01T00:00:00Z"
}'
# Enable / disable a rule
curl -X PATCH http://localhost:3000/api/mute-rules/:id \
-H 'Content-Type: application/json' \
-d '{"enabled": false}'
# Delete a rule
curl -X DELETE http://localhost:3000/api/mute-rules/:id
Supported pattern prefixes: repo:, channel:, title:, from:, type:. Use * as a wildcard.
# Get digest config
curl http://localhost:3000/api/digest/config
# Update digest config
curl -X PATCH http://localhost:3000/api/digest/config \
-H 'Content-Type: application/json' \
-d '{"enabled": true, "deliveryTime": "08:00", "timezone": "UTC"}'
# Trigger an immediate digest
curl -X POST http://localhost:3000/api/digest/send
# List past digests
curl http://localhost:3000/api/digest/history
# List labels
curl http://localhost:3000/api/labels
# Create a label
curl -X POST http://localhost:3000/api/labels \
-H 'Content-Type: application/json' \
-d '{"name": "incident", "color": "#dc2626"}'
# Apply a label to a notification
curl -X POST http://localhost:3000/api/notifications/:id/labels \
-H 'Content-Type: application/json' \
-d '{"labelId": "lbl_xyz"}'
# Remove a label
curl -X DELETE http://localhost:3000/api/notifications/:id/labels/:labelId
# Get 30-day stats summary
curl http://localhost:3000/api/stats
# Get stats for a specific period
curl "http://localhost:3000/api/stats?from=2026-03-01&to=2026-03-31"
NOTIFICATION_HUB_ENCRYPTION_KEY.SYNC_INTERVAL_MS milliseconds (default 300000).xoxb-...). The token is validated immediately.conversations.history).The daily digest is sent via nodemailer using the SMTP credentials in the environment. To test delivery without waiting for the scheduled time:
curl -X POST http://localhost:3000/api/digest/send
curl -X POST http://localhost:3000/api/settings/api-token/rotate \
-H 'Authorization: Bearer <current_token>'
Store the new token returned in the response. The old token is invalidated immediately.