A community management agent that analyzes Discord, GitHub, X/Twitter, Bluesky, LinkedIn, and Hacker News activity to generate digests, health reports, and content suggestions. It uses shell scripts for data collection and produces structured outputs following a heading-level contract.
Prerequisites
Before executing any workflow, detect which platforms are enabled by running:
bash plugins/soleur/skills/community/scripts/community-router.sh platforms
This prints each platform's name, status (enabled/disabled/missing), and script filename. The router is the single source of truth for platform detection — do not check env vars directly.
DISCORD_WEBHOOK_URL is additionally required for posting digests to Discord (not checked by the router since it is a write-only credential, not used for data collection).
At least one platform must be enabled in addition to GitHub. If only GitHub and HN are enabled, stop and direct the user to set up at least one additional platform.
Scripts
All platform commands are dispatched through the router. Set this variable at the start of every workflow:
ROUTER="plugins/soleur/skills/community/scripts/community-router.sh"
Then dispatch commands as:
$ROUTER <platform> <command> [args...]
Available platforms: discord, github, x, bsky, hn.
Capability 1: Digest Generation
Generate a weekly community digest from Discord, GitHub, and Hacker News data.
Step 1: Collect Data
Run scripts to gather raw data. Use the $ROUTER variable defined in the Scripts section above.
Discord: fetch messages from monitored channels. If DISCORD_CHANNEL_IDS is set, split it by comma and use those channel IDs. Otherwise, list all text channels first:
$ROUTER discord channels | jq -r '.[].id'
Then for each channel ID from the output, fetch the last 100 messages:
$ROUTER discord messages "<channel_id>" 100
Run this for each channel.
# Discord: fetch guild info and members
$ROUTER discord guild-info
$ROUTER discord members
# GitHub: fetch last 7 days of activity
$ROUTER github activity 7
$ROUTER github contributors 7
$ROUTER github discussions 7
$ROUTER github fetch-interactions 7
X/Twitter (if enabled): fetch account metrics and monitoring data:
$ROUTER x fetch-metrics
$ROUTER x fetch-mentions --max-results 100
$ROUTER x fetch-timeline --max 20
The fetch-mentions and fetch-timeline commands require X API paid access (credit purchase). If these return 403, continue with fetch-metrics only.
Bluesky (if enabled): fetch profile metrics:
$ROUTER bsky get-metrics
Hacker News (always enabled): fetch mentions and trending stories:
$ROUTER hn mentions --query soleur --limit 20
$ROUTER hn trending --limit 30
If $ROUTER hn fails, log the error and continue with other platforms.
Step 2: Analyze Data
Analyze the collected data to identify:
- Message volume: Total messages per channel, daily distribution
- Top contributors: Most active members by message count (Discord) and by commits/issues (GitHub)
- Trending topics: Frequently discussed themes based on message content patterns
- Unanswered questions: Messages that look like questions (contain
?, start with "how", "why", "what") with no replies - GitHub activity: New issues, merged PRs, active discussions
- X/Twitter metrics: Follower count, following count, tweet count (if X is enabled)
- Bluesky metrics: Follower count, following count, post count (if Bluesky is enabled)
- Hacker News activity: Mentions of the project, notable trending discussions relevant to the domain
Do NOT store raw message content. Summarize and aggregate only.
Step 3: Write Digest File
Write the digest to knowledge-base/support/community/YYYY-MM-DD-digest.md using the heading contract below.
Create the knowledge-base/support/community/ directory if it does not exist:
mkdir -p knowledge-base/support/community
Step 4: Post to Discord
Before posting, check if knowledge-base/marketing/brand-guide.md exists. If it does, read the ## Voice and ## Channel Notes > ### Discord sections to align the condensed post with brand voice.
Generate a condensed version of the digest (under 2000 characters) suitable for Discord. Include:
- Period covered
- Key highlights (message volume, contributor count)
- Top 3 trending topics or notable discussions
- Link to the full digest if the repo is public
Post via webhook:
First get the webhook URL with printenv DISCORD_WEBHOOK_URL, then use the literal URL in the curl command:
curl -s -o /dev/null -w "%{http_code}" \
-H "Content-Type: application/json" \
-d "{\"content\": \"ESCAPED_CONTENT\", \"username\": \"Sol\", \"avatar_url\": \"AVATAR_URL\"}" \
"<webhook-url>"
Replace <webhook-url> with the actual URL from printenv.
Set avatar_url to the hosted logo URL (e.g., the GitHub-hosted logo-mark-512.png). Webhook messages freeze author identity at post time -- these fields ensure consistent branding.
If the webhook POST fails, display the digest content so it can be posted manually. Do not retry automatically.
Digest File Contract
Digest markdown files follow this heading contract. Downstream tools depend on these exact headings.
| Heading | Required | Purpose | |---------|----------|---------| | ## Period | Yes | Date range covered | | ## Activity Summary | Yes | Message volume, contributor count, key stats | | ## Top Contributors | Yes | Most active community members | | ## Trending Topics | No | Most discussed topics | | ## Unanswered Questions | No | Questions needing response | | ## GitHub Activity | No | Issues, PRs, discussions during period. Optional Community Interactions sub-section: table of external user comments (user, issue/PR, snippet). Omit sub-section if no external interactions. | | ## X/Twitter Metrics | No | Follower count, engagement stats (if X enabled) | | ## Bluesky Metrics | No | Follower count, post count, engagement stats (if Bluesky enabled) | | ## Hacker News Activity | No | Mention count, notable threads, trending topics |
File naming: YYYY-MM-DD-digest.md
Frontmatter fields:
period_start: YYYY-MM-DD
period_end: YYYY-MM-DD
generated_at: YYYY-MM-DDTHH:MM:SSZ
channels_analyzed: [channel_id_1, channel_id_2]
Capability 2: Health Metrics
Display community health metrics inline (no file output).
Step 1: Collect Data
# Discord (if enabled)
$ROUTER discord guild-info
$ROUTER discord members
# GitHub
$ROUTER github activity 30
$ROUTER github contributors 30
# X/Twitter (if enabled)
$ROUTER x fetch-metrics
# Bluesky (if enabled)
$ROUTER bsky get-metrics
# Hacker News (always enabled)
$ROUTER hn mentions --query soleur --limit 20
$ROUTER hn trending --limit 30
Step 2: Display Metrics
Present metrics in a readable format:
Community Health Report
=======================
Discord
Members: N (N online)
30-day message volume: N messages
Active channels: N
Avg response time: ~Xh (estimated from reply patterns)
GitHub
Open issues: N
PRs merged (30d): N
Active contributors (30d): N
X/Twitter (if enabled)
Followers: N
Following: N
Tweets: N
Bluesky (if enabled)
Followers: N
Following: N
Posts: N
Hacker News
Mentions (7d): N
Notable threads: N
Trending relevance: N stories matching domain keywords
Top Contributors (30d)
1. @user -- N commits, N messages
2. @user -- N commits, N messages
...
No file is written. Metrics are displayed inline only.
Capability 3: Content Suggestions
Analyze recent community activity and suggest content topics.
Step 1: Collect Data
Same data collection as digest (Discord messages + GitHub activity + X/Twitter metrics if enabled + Hacker News mentions and trending).
Step 2: Identify Opportunities
Look for:
- Unanswered questions that deserve a