podcast-discovery
Podcast discovery skill for Wherever.Audio. Given a natural-language query, find the right podcast show or episode and return a playable wherever.audio link.
Do NOT use this skill for non-podcast queries (general web search, music, etc.).
Trigger phrases
Use this skill immediately when the user message includes podcast lookup language such as:
- - "find podcast", "find the podcast", "look up podcast", "search podcasts"
- "find episode", "podcast episode about", "interview episode", "latest episodes"
- "give me a wherever link", "wherever link", "wherever.audio link", "listen link", "show link"
- named show/host requests like "Radiolab", "Lex Fridman", "Hard Fork", or "Joe Rogan"
When triggered, prioritize link construction over metadata reporting.
Primary Objective (Highest Priority)
Your job is to produce a working Wherever link (/show or /listen) as soon as enough information is available.
Success condition:
- 1. Resolve a valid RSS URL from Clawsica.
- If
contentScope = podcast-show, immediately return a show link. - If
contentScope = podcast-episode and a matching item is found, immediately return an episode link.
Do not stop at metadata, search summaries, or candidate lists if a valid link can be constructed.
Link Templates
Episode (contentScope = podcast-episode):
INLINECODE4
Show (contentScope = podcast-show):
INLINECODE5
All {placeholder} values must be URL-encoded.
Action Policy: Link-First, Ask-Last
Default behavior is to execute and return a link in the same response.
Only ask a follow-up question when one of these is true:
- - You cannot determine whether the user wants a show vs episode.
- Clawsica returns no plausible show/RSS result after retries.
- Multiple episode candidates are similarly strong and no clear best match exists.
If none of the above apply, do not ask for confirmation. Return the link.
Token Budget Policy
- - Run local tooling first and send only compact result fields to the model.
- Never send raw RSS XML, full feed dumps, or large metadata blobs to the model.
- For episode matching, pass only top-ranked candidate rows needed for decision-making and link construction.
Workflow
Step 1 — Classify the query
Before searching, classify the user's query along two dimensions:
intentType — what kind of request?
- -
specific-podcaster — user names a host or show (e.g. "Lex Fridman", "Radiolab") - INLINECODE8 — user describes a topic or guest (e.g. "Geoffrey Hinton interview about AI")
- INLINECODE9 — broad exploration (e.g. "best science podcasts", "podcasts about space")
contentScope — what are they looking for?
- -
podcast-show — a show/feed (e.g. "find the Radiolab podcast") - INLINECODE11 — a specific episode (e.g. "the Radiolab episode about colors")
Step 2 — Resolve the show
If intentType is specific-podcaster (show name is known):
Go directly to Clawsica (step 3). The query likely contains the show title.
If intentType is specific-topic or discovery (show name is unknown):
Search the web first to discover likely podcast titles, then proceed to Clawsica with those titles.
Step 3 — Clawsica show search
Search for podcast shows using the public Clawsica endpoint. This returns show metadata including RSS feed URLs.
CODEBLOCK0
Returns a JSON array of show objects. Each object includes a url field containing the RSS feed URL.
Important: Only use the url field from Clawsica results as the RSS URL. Do NOT substitute web page URLs, Apple Podcasts links, Spotify links, or any other URL — Wherever.Audio only understands RSS feed URLs. If Clawsica returns no results and you cannot obtain a definitive RSS feed URL, tell the user you were unable to find the podcast rather than guessing with a non-RSS URL.
If Clawsica returns no results, try alternate spellings or broader terms. See references/CLAWSICA_API.md for the full API reference.
Step 4 — Branch by contentScope
If contentScope is podcast-show:
Construct a show link using the RSS URL from step 3 and present it immediately. Do not ask for additional confirmation. Done.
Example: INLINECODE19
If contentScope is podcast-episode:
Continue to step 5.
Step 5 — Run local feed tooling (required for episode lookup)
For episode lookup, use local tooling instead of manual XML parsing:
CODEBLOCK1
Optional semantic rerank:
CODEBLOCK2
Compact search output contract:
- - top-level keys:
mode, rssUrl, query, semanticUsed, candidateCount, INLINECODE27 - candidate keys:
guid, title, pubDate, fallbackLink, INLINECODE32
Use these candidate rows to select the best episode. Do not return feed-level metadata unless explicitly requested.
Selection policy:
- - Auto-pick when the top
score is clearly stronger than the second candidate. - If top candidates are near-tied, ask one disambiguation question.
Step 6 — Construct the episode link
Build a wherever.audio episode link using values from the selected search candidate:
- -
rss_url — the feed URL from step 3 - INLINECODE36 — candidate INLINECODE37
- INLINECODE38 — candidate INLINECODE39
Example:
CODEBLOCK3
Present the link to the user along with the episode title and publish date.
Optional utilities — newest and overview
If the user asks for latest episodes from a known feed:
CODEBLOCK4
Compact newest output contract:
- - top-level keys:
mode, rssUrl, count, INLINECODE44 - item keys:
guid, title, pubDate, INLINECODE48
If the user asks for feed-level metadata:
CODEBLOCK5
Compact overview output contract:
- -
mode, rssUrl, feedTitle, feedDescriptionShort, author, language, lastBuildDate, INLINECODE57
Use these utility modes to answer the request directly while keeping payloads compact.
Run the local feed tool (for developers/testing)
Path: scripts/searchfeedepisodes.py (relative to the skill directory)
Requirements: scripts/requirements.txt (feedparser, rapidfuzz, pytest)
Quick start (recommended, cross-platform):
1) Create and activate a virtual environment in the skill folder:
python3 -m venv .venv
source .venv/bin/activate # macOS / Linux.venv\Scripts\activate # Windows (PowerShell)
2) Install dependencies:
pip install -r scripts/requirements.txt
3) Run the tool (examples):
python scripts/searchfeedepisodes.py --mode overview --rss-url ""
python scripts/searchfeedepisodes.py --mode newest --rss-url "" --limit 10
python scripts/searchfeedepisodes.py --mode search --rss-url "" --query "attack on Iran" --limit 5 --semantic
Notes:
The tool prints compact JSON matching the skill's expected contracts.
Make the script executable (chmod +x scripts/searchfeedepisodes.py) for direct execution.
Use the venv if system pip is restricted.
Response Format
When a link is available, respond in this order:
- 1. The Wherever URL (first line).
- One short line identifying the resolved show/episode.
- Optional one-line note only if there was ambiguity.
Keep responses concise. Do not include raw metadata dumps unless explicitly requested.
Prohibited Behavior
- - Do not return only webpage metadata when a Wherever link can be built.
- Do not ask "Should I proceed?" if required link parameters are already known.
- Do not present candidate options unless disambiguation is truly required.
Privacy
- - Do NOT expose internal Clawsica infrastructure details beyond what is documented here.
- The Clawsica search endpoint does not require authentication.
- See
references/CLAWSICA_API.md for the full API reference. - See
references/LOCAL_EPISODE_SEARCH.md for local feed-tool commands and schema details.
Example prompts
- - "Find a Geoffrey Hinton interview episode and give me a wherever.audio link."
- "What episodes cover Radiolab's space stories?"
- "Search for BBC science podcasts about AI."
- "Give me the Lex Fridman podcast."
- "Find the podcast Hard Fork."
podcast-discovery
适用于Wherever.Audio的播客发现技能。根据自然语言查询,找到正确的播客节目或单集,并返回可播放的wherever.audio链接。
请勿将此技能用于非播客查询(通用网页搜索、音乐等)。
触发短语
当用户消息包含以下播客查询语言时,立即使用此技能:
- - 查找播客、找播客、搜索播客
- 查找单集、关于...的播客单集、访谈单集、最新单集
- 给我一个wherever链接、wherever链接、wherever.audio链接、收听链接、节目链接
- 指定节目/主持人请求,如Radiolab、Lex Fridman、Hard Fork或Joe Rogan
触发时,优先构建链接而非返回元数据。
主要目标(最高优先级)
你的任务是尽快生成一个可用的Wherever链接(/show或/listen)。
成功条件:
- 1. 从Clawsica解析出有效的RSS URL。
- 如果contentScope = podcast-show,立即返回节目链接。
- 如果contentScope = podcast-episode且找到匹配项,立即返回单集链接。
如果能够构建有效链接,不要停留在元数据、搜索摘要或候选列表上。
链接模板
单集(contentScope = podcast-episode):
https://wherever.audio/listen?rssUrl={rss_url}&itemGuid={guid}&fallbackLink={fallback}
节目(contentScope = podcast-show):
https://wherever.audio/show?rssUrl={rss_url}
所有{placeholder}值必须进行URL编码。
行动策略:链接优先,询问最后
默认行为是在同一响应中执行并返回链接。
仅在以下情况之一成立时才提出后续问题:
- - 无法确定用户想要节目还是单集。
- Clawsica在重试后仍返回无合理节目/RSS结果。
- 多个单集候选同样强且没有明确最佳匹配。
如果不适用上述任何情况,请勿要求确认。直接返回链接。
Token预算策略
- - 首先运行本地工具,仅向模型发送紧凑的结果字段。
- 切勿向模型发送原始RSS XML、完整Feed转储或大型元数据块。
- 对于单集匹配,仅传递决策和链接构建所需的高排名候选行。
工作流程
第1步 — 分类查询
在搜索之前,按两个维度对用户的查询进行分类:
intentType — 请求类型?
- - specific-podcaster — 用户指定主持人或节目(例如Lex Fridman、Radiolab)
- specific-topic — 用户描述主题或嘉宾(例如Geoffrey Hinton关于AI的访谈)
- discovery — 广泛探索(例如最佳科学播客、关于太空的播客)
contentScope — 他们在寻找什么?
- - podcast-show — 节目/Feed(例如查找Radiolab播客)
- podcast-episode — 特定单集(例如Radiolab关于颜色的那集)
第2步 — 解析节目
如果intentType是specific-podcaster(节目名称已知):
直接前往Clawsica(第3步)。查询很可能包含节目标题。
如果intentType是specific-topic或discovery(节目名称未知):
先搜索网页以发现可能的播客标题,然后使用这些标题前往Clawsica。
第3步 — Clawsica节目搜索
使用公共Clawsica端点搜索播客节目。这将返回包含RSS Feed URL的节目元数据。
bash
curl -s https://clawsica.wherever.audio/p?q=radiolab
返回节目对象的JSON数组。每个对象包含一个url字段,其中包含RSS Feed URL。
重要提示: 仅使用Clawsica结果中的url字段作为RSS URL。请勿替换为网页URL、Apple Podcasts链接、Spotify链接或任何其他URL——Wherever.Audio仅识别RSS Feed URL。如果Clawsica未返回结果且无法获得确定的RSS Feed URL,请告知用户无法找到该播客,而非使用非RSS URL进行猜测。
如果Clawsica未返回结果,请尝试替代拼写或更广泛的术语。完整API参考请参见references/CLAWSICA_API.md。
第4步 — 按contentScope分支
如果contentScope是podcast-show:
使用第3步的RSS URL构建节目链接并立即呈现。请勿要求额外确认。完成。
示例:https://wherever.audio/show?rssUrl=https%3A%2F%2Ffeeds.feedburner.com%2Fradiolab
如果contentScope是podcast-episode:
继续执行第5步。
第5步 — 运行本地Feed工具(单集查询必需)
对于单集查询,使用本地工具而非手动XML解析:
bash
python scripts/searchfeedepisodes.py --mode search --rss-url https://feeds.feedburner.com/radiolab --query space stories --limit 5
可选的语义重排序:
bash
python scripts/searchfeedepisodes.py --mode search --rss-url https://feeds.feedburner.com/radiolab --query space stories --limit 5 --semantic
紧凑的search输出契约:
- - 顶级键:mode、rssUrl、query、semanticUsed、candidateCount、candidates
- 候选键:guid、title、pubDate、fallbackLink、score
使用这些候选行选择最佳单集。除非明确请求,否则不要返回Feed级元数据。
选择策略:
- - 当最高score明显强于第二候选时,自动选择。
- 如果顶级候选分数接近,提出一个消歧问题。
第6步 — 构建单集链接
使用所选search候选的值构建wherever.audio单集链接:
- - rss_url — 第3步的Feed URL
- guid — 候选的guid
- fallback — 候选的fallbackLink
示例:
https://wherever.audio/listen?rssUrl=https%3A%2F%2Ffeeds.feedburner.com%2Fradiolab&itemGuid=some-guid-value&fallbackLink=https%3A%2F%2Fradiolab.org%2Fepisode
将链接连同单集标题和发布日期一起呈现给用户。
可选工具 — 最新和概览
如果用户请求已知Feed的最新单集:
bash
python scripts/searchfeedepisodes.py --mode newest --rss-url https://feeds.feedburner.com/radiolab --limit 10
紧凑的newest输出契约:
- - 顶级键:mode、rssUrl、count、items
- 项目键:guid、title、pubDate、fallbackLink
如果用户请求Feed级元数据:
bash
python scripts/searchfeedepisodes.py --mode overview --rss-url https://feeds.feedburner.com/radiolab
紧凑的overview输出契约:
- - mode、rssUrl、feedTitle、feedDescriptionShort、author、language、lastBuildDate、itemCount
使用这些工具模式直接回答请求,同时保持负载紧凑。
运行本地Feed工具(供开发者/测试使用)
路径:scripts/searchfeedepisodes.py(相对于技能目录)
依赖:scripts/requirements.txt(feedparser、rapidfuzz、pytest)
快速开始(推荐,跨平台):
1) 在技能文件夹中创建并激活虚拟环境:
python3 -m venv .venv
source .venv/bin/activate # macOS / Linux.venv\Scripts\activate # Windows (PowerShell)
2) 安装依赖:
pip install -r scripts/requirements.txt
3) 运行工具(示例):
python scripts/searchfeedepisodes.py --mode overview --rss-url
python scripts/searchfeedepisodes.py --mode newest --rss-url --limit 10
python scripts/searchfeedepisodes.py --mode search --rss-url --query attack on Iran --limit 5 --semantic
注意:
该工具打印与技能预期契约匹配的紧凑JSON。
使脚本可执行(chmod +x scripts/searchfeedepisodes.py)以直接运行。
如果系统pip受限,请使用venv。
响应格式
当链接可用时,按此顺序响应:
- 1. Wherever URL(第一行)。
2.