spec-from-thread
Skill1 starsChanged 7 months agoMITView on GitHub
Take a Slack thread URL, classify each message into [decision / requirement / open question / chatter], and create a Notion spec page from the non-chatter messages with the original thread permalink attached.
In this repository13 other files it gives its agents.
- battle-card-builderSkill
- blocker-radarSkill
- deal-context-loaderSkill
- decision-log-keeperSkill
- follow-up-radarSkill
- inbox-zero-triageSkill
- knowledge-graph-builderSkill
- meeting-prep-pullSkill
- okr-syncSkill
- project-briefSkill
- thread-zombie-killerSkill
- ticket-triage-routerSkill
- weekly-shipped-from-noiseSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 92
When confidence is unclear, decision wins (if requirement/question contains decision-like phrasing, classify as decision).
- Very specific: line 96
If --title is missing, generate a title (≤ 50 chars) using the LLM with the thread's first message + 1-2 decisions as input.
- Distinctive: line 114
Loose classification prompt: when decisions and requirements blend in one sentence, the LLM tags both.
- Very specific: line 116
Re-running on the same thread duplicates pages: every call creates a new Notion page.
- Distinctive: line 122
Do not anonymize the author — keep display_name as-is
- Distinctive: line 124
No fake confidence ("these are all the decisions", etc.)
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
spec-from-thread
When a PM debates a new feature in a Slack thread, decisions, requirements, and open questions get scattered across 50-100 messages. Hand-converting them into a Notion spec page takes 1-2 hours — so it never happens. With a single URL as input, this skill fetches + classifies + writes to Notion in one command.
Zero-config: this skill auto-resolves the Notion parent page "Specs" on first run and caches the ID — see docs/auto-resolve.md.
Input
--thread-url <slack-permalink>(required) — Slack thread permalink (https://<workspace>.slack.com/archives/<channel>/p<ts>format)--notion-parent-id <id>(override only — defaults to auto-resolve Notion parent page "Specs". Env override:CLAUDE_CODE_TOOLKIT_SPEC_PARENT_ID)--title <text>(optional) — title for the spec page being created. If missing, the LLM extracts one from the thread's first message.
Output
One-line console summary + Notion page URL:
Thread <permalink> → classified N messages (decisions N / requirements N / questions N / chatter N) → Notion spec page created
- Notion: <page URL>Format of the Notion page body:
# <Title>
## Source
- Slack thread: <permalink>
- Extracted at: YYYY-MM-DD HH:MM KST
- Message count: N (decisions N / requirements N / questions N / chatter excluded)
## Purpose
<thread's first message, or LLM-inferred 1-paragraph summary>
## Decisions
- <decision 1> (author: @<display_name>, <time>)
- ...
## Requirements
- <requirement 1> (author: ...)
- ...
## Open issues
- <question 1> (author: ...)
- ...
## Next actions (suggested)
- [ ] <action 1>
- [ ] <action 2>
## Caveats
- N messages classified as chatter were excluded from the body (originals available in the Slack thread)
- When decision/requirement is ambiguous, decision winsProcedure
1. Parse input
- Parse
--thread-url: extract workspace · channel-id · ts. Reject if not in this format. - Notion parent page ID: auto-resolve "Specs" via the algorithm in docs/auto-resolve.md (cache-first, fall through to notion-search with page filter). Override:
--notion-parent-id <id>or envCLAUDE_CODE_TOOLKIT_SPEC_PARENT_ID. --titlemissing → LLM-infer in step 3
2. Collect thread messages
Call mcp__claude_ai_Slack__slack_read_channel:
channel: extracted channel-idoldest: thread_ts (parent message time)latest: thread_ts + 30 days (to cover all thread replies)limit: 200
Or use a thread-dedicated tool if exposed (check the Slack Connector's tool name in claude /mcp output).
For each message, resolve user_id → display_name with mcp__claude_ai_Slack__slack_read_user_profile (cached).
3. LLM classification
Classify each message into one of [decision / requirement / question / chatter]:
| Category | Signal |
| decision | "going with X", "decided on Y", "finalized Z", approval reactions |
| requirement | "need Y", "must have X", "definitely", spec-shaped statements |
| question | ends in ?, "how to", "is it possible", "what about exceptions?" |
| chatter | greetings, agreement ("ok"), thanks, unrelated info |
When confidence is unclear, decision wins (if requirement/question contains decision-like phrasing, classify as decision).
4. Title inference (if needed)
If --title is missing, generate a title (≤ 50 chars) using the LLM with the thread's first message + 1-2 decisions as input.
5. Create Notion page
Call mcp__claude_ai_Notion__notion-create-pages:
parent:page_id= the resolved parent page IDproperties:title= titlechildren: combination of paragraph / heading_2 / bulleted_list_item / to_do blocks per the body format above
Hook behavior: the plugin's PreToolUse(mcp__claude_ai_Notion__notion-create-pages) hook fires — asks the user once "About to create a new Notion page. Proceed?". In this release this is interactive-confirm only — bypass not allowed (the current hook only writes audit logs to decision-log-YYYY-MM-DD.jsonl, so a spec-from-thread bypass would mix into another skill's audit trail). Cron automation will be considered after caller-aware audit log separation lands.
6. Output
One-line console summary + Notion page URL. Done.
Pitfalls
- Thread parent message is a #channel root with almost no replies: the "thread" may actually be a single message rather than an actual thread. If only the parent exists, print "No spec to extract" and exit.
- Loose classification prompt: when decisions and requirements blend in one sentence, the LLM tags both. Force in the system prompt: "one category per message, decisions win".
- LLM drops factual info from chatter messages: chatter-classified messages may carry real facts — mention this explicitly in the "Caveats" section.
- Re-running on the same thread duplicates pages: every call creates a new Notion page. No dedupe logic — the user must delete the old page or use an
--updatemode (TBD). - No thread-dedicated tool from the Slack Connector: confirm the exposed tool names with
claude /mcp(e.g. whetherget_thread_repliesis exposed separately). If absent, fall back toget_channel_history+ thread_ts.
Tone
- Quote decisions/requirements verbatim — no paraphrasing
- Do not anonymize the author — keep display_name as-is
- "Speculative" wording is welcome (when chatter classification confidence is low)
- No fake confidence ("these are all the decisions", etc.)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

