input-router
GitHub作为系统统一入口的路由分发器,根据URL模式或文件扩展名严格匹配并调用对应的下游处理技能(如文档、音视频、表格等),直至该工作流完成。不自行执行具体解析逻辑。
触发场景
安装
npx skills add gaotiexinqu/OneResearchClaw --skill input-router -g -y
SKILL.md
Frontmatter
{
"name": "input-router",
"description": "Use the input path to select the correct downstream grounding pipeline and continue execution until the selected grounding workflow is completed."
}
Input Router
Use this skill as the unified input entry layer for the system.
This skill is a system-level dispatcher. It does not implement document parsing, transcription, table extraction, PPT grounding, archive unpacking, or meeting summarization logic by itself.
However, it does not stop at routing analysis. After identifying the correct input type, it must immediately invoke the correct downstream skill and continue the task until that downstream grounding workflow is completed.
What This Skill Does
This skill must:
- inspect the input path,
- determine the file type strictly by extension,
- select the correct downstream grounding pipeline,
- invoke the corresponding existing skill,
- and continue until the selected downstream skill's workflow has completed.
What This Skill Does Not Do
This skill must not directly implement the grounding logic that belongs to downstream skills. It must not:
- transcribe audio by itself
- extract content from documents by itself
- parse tables by itself
- ground PPTX files by itself
- unpack archives by itself
- write
grounded.mdby bypassing the downstream skill
Those tasks belong to the selected downstream skill.
Routing Principle
Route inputs strictly by file extension or URL pattern.
URL Detection (Priority 1)
If the input is a URL instead of a local file:
| URL Pattern | Route To | Output Type |
|---|---|---|
arxiv.org/abs/ or arxiv.org/pdf/ |
remote-input |
.pdf |
youtube.com/watch, youtu.be, youtube.com/shorts |
remote-input |
.mp4/.mkv |
bilibili.com/video, b23.tv |
remote-input |
.mp4/.mkv |
URL routing workflow:
- Detect URL pattern
- Invoke
remote-inputskill to download - Use returned local path for downstream routing
- If
merge_failed: true, useaudio_pathinstead ofpath
- If
- Continue with extension-based routing
Note on merge failure: When
remote-inputreturnsmerge_failed: true, the actual file for downstream routing is the audio file (.webmetc.), which routes tomeeting-audio-groundinginstead ofmeeting-video-grounding.
File Extension Detection (Priority 2)
For local files, route strictly by file extension:
| Extension | Route To |
|---|---|
.mp3, .wav, .m4a, .webm, .aac, .ogg |
meeting-audio-grounding |
.mp4, .mov, .mkv |
meeting-video-grounding |
.pdf, .docx, .md, .txt |
document-grounding |
.xlsx, .csv |
table-grounding |
.pptx |
pptx-grounding |
.zip |
archive-grounding |
Do not use filename semantics, directory names, or inferred task intent to override the extension-based mapping.
Supported Routing Table
URL Patterns (Remote Inputs)
| URL Pattern | Route To | Local Output |
|---|---|---|
arxiv.org/abs/ or arxiv.org/pdf/ |
remote-input |
PDF in remote/arxiv/ |
youtube.com/watch, youtu.be, youtube.com/shorts |
remote-input |
Video in remote/youtube/ |
bilibili.com/video, b23.tv |
remote-input |
Video in remote/bilibili/ |
File Extensions (Local Inputs)
| Extension | Route To |
|---|---|
.mp3, .wav, .m4a, .webm, .aac, .ogg |
meeting-audio-grounding |
.mp4, .mov, .mkv |
meeting-video-grounding |
.pdf, .docx, .md, .txt |
document-grounding |
.xlsx, .csv |
table-grounding |
.pptx |
pptx-grounding |
.zip |
archive-grounding |
Required Workflow
When using this skill, you must follow this workflow:
-
Detect input type:
- If input contains URL patterns (arxiv.org, youtube.com, youtu.be, bilibili.com, b23.tv): goto URL handling
- Otherwise: goto file handling
-
URL handling:
- Match URL pattern to
remote-input - Invoke
remote-inputskill - Receive returned local file path
- Use the local path for downstream routing
- Match URL pattern to
-
File handling:
- Inspect the input path
- Determine the file extension
- Match the extension to the routing table
- Select the corresponding downstream skill
-
Continue:
- Immediately invoke the selected downstream skill
- Follow the downstream skill's own workflow strictly
- Do not stop after only reporting the routing decision
URL Detection Patterns
arXiv URLs
- Pattern:
https?://(?:www\.)?arxiv\.org/(abs|pdf)/ - Examples:
https://arxiv.org/abs/2301.07041https://arxiv.org/pdf/2301.07041.pdfhttp://arxiv.org/abs/2301.07041
YouTube URLs
- Pattern:
https?://(?:www\.)?youtube\.com/(watch|shorts)/orhttps?://youtu\.be/ - Examples:
https://www.youtube.com/watch?v=dQw4w9WgXcQhttps://youtu.be/dQw4w9WgXcQhttps://www.youtube.com/shorts/abc123
Bilibili URLs
- Pattern:
https?://(?:www\.)?bilibili\.com/video/orhttps?://b23\.tv/ - Examples:
https://bilibili.com/video/BV1xx411c7JZhttps://www.bilibili.com/video/av12345678https://b23.tv/abc123
Merge Failure Handling
When downloading video from URL (YouTube or Bilibili), the downloader may produce separate video and audio files instead of a merged video file (merge failure). This happens when:
- The video has separate video and audio streams that couldn't be merged
- Common pattern:
.mp4file without audio +.webmaudio file
Detection and Recovery
After remote-input downloads video content:
-
Check return values for
merge_failedfield:merge_failed: false→ Usepathas normal (video with audio)merge_failed: true→ Useaudio_pathinstead ofpath
-
Reroute based on actual file type:
- If
audio_pathis used → route tomeeting-audio-grounding - If
pathis used → route based on extension (video →meeting-video-grounding)
- If
Routing After Merge Failure
When merge_failed: true, the local file is typically a pure audio file (.webm, .mp3, etc.):
| Returned File Type | Route To |
|---|---|
.mp3, .wav, .m4a, .webm, .aac, .ogg |
meeting-audio-grounding |
.mp4, .mov, .mkv (with audio) |
meeting-video-grounding |
Workflow Example
User: https://youtube.com/watch?v=xxx
↓
remote-input downloads video
↓
Returns: {
"path": "video.mp4", // video without audio
"audio_path": "audio.webm", // separate audio file
"merge_failed": true
}
↓
Since merge_failed=true, use audio_path
↓
audio.webm extension → .webm
↓
Route to: meeting-audio-grounding
Completion Rule
The task is not complete after:
- identifying the URL pattern or extension,
- naming the downstream skill,
- or reporting the selected pipeline.
The task is complete only after:
- for URL inputs:
remote-inputhas successfully downloaded the content - the selected downstream skill has been invoked,
- its required workflow has been followed,
- and the expected grounding result for that input type has been produced.
Unsupported Inputs
If the input is neither a supported URL nor a supported file extension:
- report that the input is unsupported by the current router,
- do not guess a pipeline,
- do not force the file through an unrelated skill.
Dispatch Behavior
The router is an entry skill, not a stopping point.
For URL inputs:
- do not stop after saying
remote-input; run it - use the returned local path to continue routing
For audio inputs, do not stop after saying meeting-audio-grounding; run it
For video inputs, do not stop after saying meeting-video-grounding; run it
For document inputs, do not stop after saying document-grounding; run it
For table inputs, do not stop after saying table-grounding; run it
For PPT inputs, do not stop after saying pptx-grounding; run it
For ZIP inputs, do not stop after saying archive-grounding; run it
Practical Meaning
From the user's perspective, this skill should behave like a unified input layer:
For URL inputs:
- the user provides a URL (arxiv paper or YouTube video),
- this skill downloads the content to
data/raw_inputs/remote/, - the task continues through the appropriate grounding pipeline.
For local file inputs:
- the user provides one input file,
- this skill selects the correct downstream grounding pipeline,
- and the task continues through that pipeline until grounding is actually completed.
The user should not need to manually re-enter another instruction just because the router has already identified the correct skill.
版本历史
- 37e86c6 当前 2026-07-24 12:30


