Answer engineers' library questions in Slack from live docs

When someone asks a library or framework question in your help channel, they get a straight answer with working code and a source link, right in the thread.

Agentic Task
Context7Slack BotLinearEngineeringOperationsFeedback TriageResearch & Monitoring
PromptCreate

Watch our #eng-help Slack channel and answer library and framework questions for the team. Use a webhook trigger that fires on each new message posted in the channel. Use the Slack Bot integration throughout so replies come from a bot identity rather than from any individual person's account.

First decide whether the message is actually a question about a software library or framework. Genuine questions qualify: how to do something with a named library, why an API behaves a certain way, which method or option to use, how something changed between versions, or how to fix a specific error from a library. Ignore everything else: greetings, thanks, jokes, status updates, opinions, questions about our own internal systems that no public library documents, and any message posted by the bot itself so it never replies to its own output. If the message does not qualify, stop and do nothing. Staying quiet is the correct outcome for most messages in the channel.

If the message was posted inside an existing thread, use Get Thread Replies to read the whole thread before deciding anything. That tells you what the person is really asking after follow-ups, and stops you from answering a question a teammate has already answered.

When it is a real question, work out which library or framework it is about and resolve it with Context7 Search for Libraries to get a Context7 library ID. If several candidates come back, pick the best match on name and description, and prefer the one whose description matches the technology the person is clearly using. If nothing matches confidently, treat the question as not covered rather than forcing a bad match.

Then call Context7 Get Documentation Context with that library ID, passing the person's question as the natural-language query, close to verbatim so the ranking works against what they actually asked. Request type=json so the response comes back as structured code snippets and info snippets, which makes it far easier to pull out a clean snippet and its source link.

Reply in the same thread using Send a Message with thread_ts set to the original message, so the answer stays threaded and the main channel stays clean. Keep the reply short and direct: two or three sentences that answer the question, one working code snippet taken from the documentation, and a link to the source page that snippet came from. Format for Slack mrkdwn rather than standard Markdown, so *bold* uses single asterisks and links are written as <url|text>. Do not restate the question, do not pad with caveats, and do not add a snippet you invented rather than took from the docs.

If the documentation genuinely does not answer the question, or answering it makes clear that our own internal documentation has a gap, create a Linear issue with Create Issue. Title it with the question itself. In the description capture who asked, a link to the Slack thread, the exact question, which library was checked, and specifically what was missing. Then reply in the thread saying the documentation did not cover it and that it has been logged for a human to pick up, including the issue link. Never guess or fill the gap from memory when the documentation does not support the answer, because a confidently wrong answer is worse than no answer.

Create at most one Linear issue per question, and only when there is a real gap. Do not open issues for questions you answered successfully from the documentation.

Example output

Yes, you can stream partial responses. Pass stream: true and iterate the returned async iterator. Each chunk carries a delta you append as it arrives. const stream = await client.messages.create({ model: "claude-sonnet-4-5", max_tokens: 1024, messages: [{ role: "user", content: "Hello" }], stream: true, }); for await (const event of stream) { process.stdout.write(event.delta?.text ?? ""); } Source: Streaming Messages, docs page linked above.

Additional information

What does this prompt do?
  • Watches your engineering help channel and tells real questions apart from everyday chatter, so the channel stays quiet
  • Works out which library or framework is being asked about and pulls the current documentation for that exact question
  • Replies inside the original thread with a short answer, a working code example, and a link to where it came from
  • Files a ticket when the documentation genuinely does not cover the question, and says so in the thread so a person picks it up
What do I need to use this?
  • A Slack workspace with a help channel where your team asks questions
  • A Context7 account, which supplies current documentation for thousands of libraries and frameworks
  • A Linear account for logging questions the documentation cannot answer
  • Permission to add the assistant to the channel you want it to watch
How can I customize it?
  • Choose which channel it watches, or point it at several help channels
  • Tune how strict it is about what counts as a real question versus chatter
  • Pick which Linear team receives the tickets for unanswered questions

FAQs

Will it reply to every message in the channel?
No. It only answers messages that are genuine questions about a library or framework. Jokes, thanks, status updates, and side conversation are ignored, so the channel does not fill up with bot replies.
Where do the answers come from?
From the current published documentation for whichever library is being asked about, looked up at the moment the question is posted. That is the difference from a bot answering out of memory or from a snapshot that went stale months ago.
What happens if the documentation does not have the answer?
It creates a ticket capturing the question and what was missing, then posts in the thread saying a human needs to take it. Nothing quietly disappears, and you build a running list of the gaps worth filling.
Will it clutter our channel?
No. Every reply goes inside the thread of the original question, so the main channel view stays clean.
Can it answer questions about our own internal code?
It answers from public library and framework documentation. When a question exposes a gap in your own internal documentation, it flags that in the ticket so your team knows what to write up.

Related templates

Reconcile Stripe payouts against your Mercury deposits

Every weekday morning, check that every Stripe payout actually landed in your Mercury account, and hear about it only when one did not.

Stripe
Mercury
Slack Bot
Agentic Task
Catch social posts stuck in approval before they miss their slot

Every weekday morning, get a Slack digest of the social posts still waiting on sign-off, with the ones about to go live flagged first.

Hootsuite
Slack Bot
Agentic Task
Turn last week's support tickets into a Miro affinity map

Every Monday morning, last week's support tickets become a themed Miro board, so your product team can see what customers actually complain about.

Zendesk
Miro
Slack Bot
Agentic Task
Catch deployments that made your app slower or less reliable

Every hour we compare the 30 minutes before and after each release, and only speak up when a deployment genuinely degraded speed or reliability.

New Relic
Slack
Linear
Agentic Task
Chase unsigned contracts and nudge stalled signers daily

Every weekday we find the contracts still waiting on a signature, resend the ones going stale, and post a prioritized chase list to Slack.

Documenso
Gmail
Slack Bot
Agentic Task
Turn today's Miro boards into written Notion summaries

Every weekday at 6pm, any board your team edited today becomes a readable Notion write up, so the people who missed the session can catch up.

Miro
Notion
Slack Bot
Agentic Task

Stop losing hours to questions nobody answers.

Put an assistant in your help channel that answers from current documentation and flags whatever it cannot.