ワンクリックで
wiki-fetch-slack
Use when the user asks to fetch Slack, ingest Slack, sync Slack channels, or process Slack messages into the knowledge base.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when the user asks to fetch Slack, ingest Slack, sync Slack channels, or process Slack messages into the knowledge base.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Use when the user notices a system, concept, person, project, decision, competitor, or problem is missing from the Wiki and wants to create a page for it.
Use when the user asks any question, requests research, or wants information from the knowledge base. This is the default action in this repository — when in doubt, search the Wiki. Use for "find me...", "what do we know about...", "tell me about...", "who is...", "what is...", or any general research question.
Use when the user asks to ground this conversation in the knowledge base, says "wiki-ground", asks to treat the KB as source of truth, or wants domain answers backed by the Wiki. Optional topic front-loads relevant knowledge base pages.
Use when the user asks for a health check, lint, audit, or wants to check for orphan pages, contradictions, or data gaps in the Wiki.
Use when the user asks to finalize an ingest, merge batch logs, or rebuild Wiki indexes after a batch import.
Use when about to process individual notes during Wiki ingestion — loaded as a required background skill by wiki-ingest and wiki-ingest-next-batch. Contains file conversion rules, topic assignment rules, WikiLink rules, and the session log format.
SOC 職業分類に基づく
| name | wiki-fetch-slack |
| description | Use when the user asks to fetch Slack, ingest Slack, sync Slack channels, or process Slack messages into the knowledge base. |
Fetch Slack threads and DMs configured in config/personal_info.md and write them as Markdown files to raw/slack/. After fetching, tell the user to use the wiki-ingest skill (or say ingest new notes) to ingest them — or run scripts/wiki-ingest.sh for unattended bulk ingestion.
Read config/personal_info.md. Find the # Slack section and parse the Markdown table:
| Channel / DM | Days | Mode |
|---|---|---|
| #channel-name | N | signal |
| @Person Name | N | software design decisions |
# → Slack channels@ → individual DMs with that personDays blank → use 7 days (default), or the command-level override if providedMode blank → default to signalMode values:
signal — apply universal noise exclusion filter (see Step 3)all — no filtering, include everythingIf personal_info.md is missing or has no # Slack section, report:
"No Slack sources configured. Add a
# Slacktable toconfig/personal_info.md." Then stop.
If the # Slack table cannot be parsed (missing header row, malformed pipes, unrecognised column names), report the specific problem and stop.
Command override: If the user said "fetch Slack last N days", use N for all sources regardless of per-row Days values.
Before fetching, list available Slack MCP tools. Look for tools to:
The exact tool names depend on which Slack MCP is configured. Use whatever tools are available to accomplish the steps below.
Process each row in the config table in order.
Directory names:
#architecture-decisions → raw/slack/architecture-decisions/@Alice van Dijk → raw/slack/DM-Alice van Dijk/Create the directory if it does not exist.
Look up cached state: Before resolving IDs or fetching, find the most recent slack-fetch entry for this source in wiki/log.jsonl:
jq 'select(.type == "slack-fetch" and .source == "<dir>")' wiki/log.jsonl | tail -1grep '"slack-fetch"' wiki/log.jsonl | grep '"<dir>"' | tail -1From that entry extract:
id — cached channel or user ID (use directly; skip MCP resolution if present)date — use as fetch window start (fall back to start of day N calendar days ago if absent)ID resolution: Only resolve via MCP if no cached id was found above.
#-prefixed rows: look up the channel by name.@-prefixed rows: search for the person by display name or real name. If the tool returns multiple matches, use the closest exact match. If no match is found or the lookup is ambiguous, warn ("Could not resolve @Person Name to a Slack user — skipping") and skip that row. Do not guess.Fetch: Use the Slack MCP to get all messages in the source that had activity within the fetch window (from the determined window start to now). Separate threads from loose (unthreaded) messages.
Apply mode filter: For each thread, apply the filter based on the source's resolved mode:
all — include everything, no filtering.signal or all) — strict inclusion filter: only include threads with a direct, obvious connection to that topic. When in doubt, skip. (The signal thread-override does not apply here — if the root looks like noise, skip the thread regardless of replies.) A thread must have a direct, obvious connection to be included — loose or tangential relevance is not enough.signal (or blank) — noise exclusion filter: skip the thread if it clearly falls into one of these categories:
Copy each message's text exactly as returned by the Slack MCP — character for character. Do not edit, summarize, paraphrase, shorten, or remove anything. Preserve typos, emoji, informal language, code blocks, formatting, and links exactly as they appear.
For each thread:
YYYY-MM-DD HH_mm_ss format (replace : with _). This is thread_ts.latest_reply_ts.<thread_ts> - reply - <latest_reply_ts>.mdNote: filenames use underscores (HH_mm_ss); frontmatter latest_reply_ts and fetched fields use colons (HH:mm:ss).
Check for an existing file in the directory whose name starts with <thread_ts> - reply:
reply - <latest_reply_ts>.md → skip (unchanged)File format:
---
source: slack
channel: "#architecture-decisions"
thread_url: <permalink from MCP response; omit field if not available>
fetched: YYYY-MM-DD HH:mm:ss # local time
latest_reply_ts: "YYYY-MM-DD HH:mm:ss"
mode: <resolved mode: signal, all, or the topic string>
---
**@username** — YYYY-MM-DD HH:mm:ss
<root message text>
**@username** — YYYY-MM-DD HH:mm:ss
<reply text>
For direct messages (DMs), use channel: "DM: Alice van Dijk" in the frontmatter.
Copy each message's text exactly as returned by the Slack MCP — character for character. Do not edit, summarize, paraphrase, shorten, or remove anything. Preserve typos, emoji, informal language, code blocks, formatting, and links exactly as they appear.
Collect all messages in the source that are not part of any thread. Apply the same mode filter as for threads: all passes everything through, a topic string applies the strict inclusion filter, and signal applies the noise exclusion categories listed above. If any qualifying messages remain, write them to:
raw/slack/<dir>/YYYY-MM-DD loose-message.md
Use current date. Overwrite if the file already exists for today.
---
source: slack
channel: "#team-platform"
type: loose-messages
fetched: YYYY-MM-DD HH:mm:ss # local time
mode: <resolved mode: signal, all, or the topic string>
---
**@username** — YYYY-MM-DD HH:mm:ss
<message text>
**@username** — YYYY-MM-DD HH:mm:ss
<message text>
If there are no loose messages, do not create the file.
Record fetch in log: After successfully writing all files for this source, append one line to wiki/log.jsonl:
{"date": "YYYY-MM-DD HH:mm:ss", "type": "slack-fetch", "source": "<dir>", "id": "<channel or user id>", "window_start": "YYYY-MM-DD HH:mm:ss"}
date is the local time the fetch completed. window_start is the actual start of the window used. id is the resolved channel or user ID. Only append if the source completed without error — do not append if it was skipped due to a channel-not-found or MCP error.
After processing all sources, report a summary:
Slack fetch complete:
N new thread files written
N thread files updated (replaced)
N thread files unchanged (skipped)
N loose message files written
Then tell the user:
"Slack files written to
raw/slack/. Use thewiki-ingestskill (or sayingest new notes) to ingest them — or runscripts/wiki-ingest.shfor unattended bulk ingestion."