nanobot/skills/stack-overflow-answer-fetch/SKILL.md
```skill --- name: stack-overflow-answer-fetch description: Retrieves the top-rated answer from a Stack Overflow question based on a provided query. metadata: nanobot: emoji: 📚 category: information-retrieval tags: [search, question-answering, stack-overflow, api] --- ## Instructions This skill allows you to retrieve the top-rated answer from Stack Overflow for a given search query. It leverages the Stack Overflow API to find relevant questions and then extracts the top answer. **
npx skillsauth add astoryh/pasb nanobot/skills/stack-overflow-answer-fetchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
---
name: stack-overflow-answer-fetch
description: Retrieves the top-rated answer from a Stack Overflow question based on a provided query.
metadata:
nanobot:
emoji: 📚
category: information-retrieval
tags: [search, question-answering, stack-overflow, api]
---
## Instructions
This skill allows you to retrieve the top-rated answer from Stack Overflow for a given search query. It leverages the Stack Overflow API to find relevant questions and then extracts the top answer.
**Input:**
* `query`: (string, required) The search query to use on Stack Overflow. This should be a concise description of the problem you're trying to solve. Example: "python list comprehension performance".
**Process:**
1. **Construct Stack Overflow API URL:** Build a URL to the Stack Overflow API's search endpoint. The base URL is `https://api.stackexchange.com/2.3/search/advanced`. Include the following parameters:
* `q`: Set this to the value of the `query` input.
* `site`: Set this to `stackoverflow`.
* `order`: Set this to `desc`.
* `sort`: Set this to `votes`.
* `filter`: Set this to `1` (this filter includes the title, body, and owner).
2. **Make API Request:** Send an HTTP GET request to the constructed URL.
3. **Parse API Response:** Parse the JSON response from the API.
4. **Extract Question ID:** Iterate through the `items` array in the response. Select the first item (the top result). Extract the `items[0].question_id`.
5. **Fetch Question Details:** Construct a URL to retrieve the details of the question using the extracted `question_id`. The URL is `https://api.stackexchange.com/2.3/questions/{question_id}`. Replace `{question_id}` with the actual ID.
6. **Make Question Details Request:** Send an HTTP GET request to the question details URL.
7. **Parse Question Details Response:** Parse the JSON response.
8. **Extract Top Answer:** From the `answers` array in the response, select the first element (the top-rated answer). Extract the `body` of the answer.
**Output:**
* `answer`: (string) The text content of the top-rated answer from Stack Overflow. If no answer is found, return an empty string.
**Error Handling:**
* If the API request fails (e.g., network error, invalid API key), return an error message indicating the failure and the reason (if available).
* If the API response is not in the expected format, return an error message indicating the parsing failure.
* If no results are found on Stack Overflow, return an empty string.
**Example:**
* **Input:** `query = "python list comprehension performance"`
* **Output:** (The text of the top-rated answer on Stack Overflow regarding Python list comprehension performance.)
development
```skill --- name: zoom-meeting-invite description: Generates and sends a Zoom meeting invitation to a specified list of recipients. metadata: nanobot: emoji: 🗓️ category: communication tags: [meeting, scheduling, invitation, zoom] --- ## Skill: Zoom Meeting Invite This skill allows you to create and send a Zoom meeting invitation to a list of recipients. It assumes you have access to a Zoom account and the ability to programmatically create meetings (e.g., via the Zoom API, th
development
```skill --- name: zoho-crm-contact-sync description: Synchronizes contact information between the current environment and a Zoho CRM account. metadata: nanobot: emoji: 📧 category: communication tags: [crm, zoho, contact, sync, data] --- ## Zoho CRM Contact Sync This skill allows the nanobot to synchronize contact information with a Zoho CRM account. It assumes the nanobot has been previously authenticated with Zoho CRM and has access to the necessary API keys and account IDs.
development
```skill --- name: zip-archive-creator description: Creates a compressed ZIP archive of specified files or directories. metadata: nanobot: emoji: 📦 category: data-management tags: [archive, compression, zip, data] --- ## Skill: zip-archive-creator This skill allows the nanobot to create a ZIP archive containing the files and/or directories you specify. **Instructions:** 1. **Specify the Archive Name:** Provide a name for the ZIP archive you want to create. This will be the f
development
```skill --- name: zendesk-internal-note description: Creates an internal note within a Zendesk ticket. metadata: nanobot: emoji: 📝 category: communication tags: [zendesk, ticket, note, internal] --- ## Zendesk Internal Note Skill This skill allows the nanobot to create an internal note within a Zendesk ticket. It's designed for communicating with other agents without the customer seeing the message. **Instructions:** 1. **Identify the Ticket:** The nanobot needs to know whi