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.
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
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?
Where do the answers come from?
What happens if the documentation does not have the answer?
Will it clutter our channel?
Can it answer questions about our own internal code?
Related templates
Every weekday, find every unpaid JobNimbus invoice, email each customer one reminder that gets firmer as it ages, and post a receivables summary to Slack.
Every weekday at 7am, your active courses are checked for missing work, silent logins, and slipping grades, with a ranked list sent to your advising channel.
Every hour, find the tickets closest to breaching, leave a nudge on each one, and post a ranked at-risk list to your support channel.
Every weekday afternoon, each student who is behind gets a warm, personal message in their Canvas inbox listing exactly what they owe.
Every Monday at 8am, see exactly which assignments have work waiting, sorted worst first, posted to Slack and logged to a spreadsheet.
When a bot opens a version bump pull request, we read the real documentation for that exact version and tell you whether it is safe to merge.
Stop losing hours to questions nobody answers.
Put an assistant in your help channel that answers from current documentation and flags whatever it cannot.