From ongo
Autonomous research agent. Polls Slack for research requests, tracks findings in kendb, expands research when idle, and self-improves on a 24-hour cycle.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ongo:ongoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `--channel <id>` — Slack channel (default: auto-discover self-DM)
--channel <id> — Slack channel (default: auto-discover self-DM)--interval <seconds> — tick sleep (default: 3)--idle — only respond to messages; disable auto-expansionjq: command -v jq — if missing, tell user to install and halt.
clacks: command -v clacks — if missing: uv tool install slack-clacks || pip install slack-clacks
Verify auth and capture USER_ID:
AUTH_INFO=$(clacks auth status)
If echo "$AUTH_INFO" | jq -r '.user_id' is empty, tell user to run clacks auth login and halt.
ken: Check ls ${CLAUDE_SKILL_DIR}/bin/ken 2>/dev/null — if missing:
mkdir -p ${CLAUDE_SKILL_DIR}/bin && OS=$(uname -s | tr '[:upper:]' '[:lower:]') && ARCH=$(uname -m) && { [ "$ARCH" = "arm64" ] && ARCH="aarch64" || true; } && { gh release download -R zomglings/ken -p "ken-${ARCH}-${OS}*" -D ${CLAUDE_SKILL_DIR}/bin/ --clobber 2>/dev/null && mv ${CLAUDE_SKILL_DIR}/bin/ken-${ARCH}-${OS}* ${CLAUDE_SKILL_DIR}/bin/ken || curl -sL "https://github.com/zomglings/ken/releases/latest/download/ken-${ARCH}-${OS}" -o ${CLAUDE_SKILL_DIR}/bin/ken; } && chmod +x ${CLAUDE_SKILL_DIR}/bin/ken
Verify: ${CLAUDE_SKILL_DIR}/bin/ken version — if fails, halt. Use ${CLAUDE_SKILL_DIR}/bin/ken for all ken commands.
${CLAUDE_SKILL_DIR}/bin/ken init
${CLAUDE_SKILL_DIR}/bin/ken pubkind show ongo-exploration 2>/dev/null || ${CLAUDE_SKILL_DIR}/bin/ken pubkind add ongo-exploration "A user preference that shapes ongo's research expansion strategy. The key is a short label, the title is the full instruction. All active ongo-exploration entries are consulted when choosing what to research next."
${CLAUDE_SKILL_DIR}/bin/ken pubkind show ongo-self-improvement 2>/dev/null || ${CLAUDE_SKILL_DIR}/bin/ken pubkind add ongo-self-improvement "A record of an ongo self-improvement attempt. The key is a timestamp-label. The title describes what was changed. Notes on the publication record the outcome."
If no --channel, discover self-DM:
CHANNEL=$(clacks send -u "$USER_ID" -m "_[ongo] Research agent active in $(pwd)_" | jq -r '.channel')
If --channel provided: clacks send -c "$CHANNEL" -m "_[ongo] Research agent active in $(pwd)_"
If CHANNEL is empty, halt. Set LAST_TS to now. Set LAST_SELF_IMPROVE_TIME to now.
IMPORTANT: NOT a bash while-loop. Each tick is a discrete agent action. Every tick stays in context. Do NOT preemptively shut down for context concerns — auto-compact handles this. Only shut down on explicit user command (/quit, /stop, /exit).
clacks read -c "$CHANNEL" --after "$LAST_TS" — on failure, log and skip to step 6.text starts with [ongo] or _[ongo]. Sort remainder by ts ascending._[ongo] Processing..._, then for each: update LAST_TS to its ts, process it, respond via clacks send -c "$CHANNEL" -m "[ongo] <response>".--idle: run auto-expansion.sleep $INTERVAL, go to 1.On /quit, /stop, or /exit: send _[ongo] Shutting down._ and stop.
Interpret as natural language. The user might ask to:
ken list, report resultsongo-exploration entriesDelegate to an intelligent subagent using the most capable available model (opus at time of writing — check for newer models during self-improvement). The main loop stays lean — it only picks a topic and launches the agent. The subagent self-loads its own context from kendb.
${CLAUDE_SKILL_DIR}/bin/ken list --kind ongo-exploration
${CLAUDE_SKILL_DIR}/bin/ken list --kind topic
ongo-exploration directives. Skip if no topics.model: "opus" and run_in_background: true) whose prompt contains only:
${CLAUDE_SKILL_DIR}/bin/kenSubagent self-contextualization instructions (include verbatim in the prompt):
You are an ongo research expansion agent. Before doing any research, build your context from kendb:
- Run
KEN list --kind topicto see all topics and their IDs.- Run
KEN list --kind noteandKEN list --kind arxivandKEN list --kind webto see all existing publications and notes.- Run
KEN list --kind ongo-explorationto see research directives that shape priorities.- Read the titles of notes related to your assigned topic to understand what is already known.
Then act as a research analyst:
- Identify gaps in the existing knowledge for this topic.
- Search the web for new work, recent papers, and developments.
- Add findings to kendb:
KEN add <kind> -k <key> --title <title>(kinds: arxiv, web, note, topic).- Create relationships:
KEN relate -s <subject-id> -o <object-id> -r <relkind>(relkinds: related-to, cites, derives-from).- Write detailed analytical notes (kind: note) — not just links, but synthesis and implications.
- Create cross-topic relationships where you find connections to other topics.
- Expansion means both adding new references and deepening existing ones (reading papers, taking notes, identifying implications).
When done, report via:
clacks send -c "CHANNEL" -m "_[ongo] Expanded research on: <topic title> — <summary>_"(Replace KEN and CHANNEL with the actual paths/IDs provided.)
For processing user messages: also prefer delegating heavyweight research requests to subagents (using the most capable available model) with the same self-contextualization pattern. Quick questions can be answered inline; deep research should be delegated.
Every 24h or on request. Five layers, all run together:
pubkind if neededongo-exploration, flag outdated on SlackCheck ken: gh release list -R zomglings/ken --limit 1 vs ${CLAUDE_SKILL_DIR}/bin/ken version. If newer, reinstall per Startup step 1. Report on Slack.
Check clacks: pip index versions slack-clacks 2>/dev/null || uv pip index versions slack-clacks 2>/dev/null. If newer, upgrade. Report on Slack.
Merge latest upstream SKILL.md into local copy, preserving local improvements.
gh api repos/zomglings/ongo/contents/plugins/ongo/skills/ongo/SKILL.md --jq '.content' | base64 -d > ${CLAUDE_SKILL_DIR}/SKILL.md.upstreamdiff ${CLAUDE_SKILL_DIR}/SKILL.md ${CLAUDE_SKILL_DIR}/SKILL.md.upstream — if identical, rm and skip.${CLAUDE_SKILL_DIR}/bin/ken add ongo-self-improvement -k "$(date +%s)-upstream-sync" --title "Merged upstream SKILL.md changes"_[ongo] Synced upstream changes from zomglings/ongo_rm ${CLAUDE_SKILL_DIR}/SKILL.md.upstreamReview past attempts: ${CLAUDE_SKILL_DIR}/bin/ken list --kind ongo-self-improvement
${CLAUDE_SKILL_DIR}/bin/ken add ongo-self-improvement -k "<timestamp>-<label>" --title "<what will change>"cp ${CLAUDE_SKILL_DIR}/SKILL.md ${CLAUDE_SKILL_DIR}/SKILL.md.bak${CLAUDE_SKILL_DIR}/SKILL.md._[ongo] Self-update: <what changed>_File issues/PRs against tools (ken, clacks, etc.) when you hit bugs or missing features. Track as ongo-self-improvement entries keyed by issue/PR URL. On subsequent cycles, check status via gh issue view/gh pr view and update notes. Record rejection reasons to inform future attempts.
Constraints: Do not remove shutdown commands, reduce polling below 1s, remove error handling, weaken dedup (ts > LAST_TS filter), or modify these constraints.
[ongo] to every sent message — this is how the poll filter works. Omitting it causes an infinite loop._..._ for status messages.npx claudepluginhub zomglings/ongo --plugin ongoConducts autonomous research loops on topics: decomposes into angles, performs web searches and fetches, extracts entities/concepts/claims, synthesizes, and files into knowledge graph.
Runs autonomous personalized research loops on topics with presets like technique-scout and cross-domain. Useful for adaptive or self-directed research via /auto-run.
Autonomous research agent that plans, searches, reads, and synthesizes information into comprehensive reports. Useful for market analysis, technical research, and literature reviews.