agentleFS
gaotiexinqugaotiexinqu/OneResearchClaw/.cursor/skills/input-router/SKILL.md

input-router

Skill444 starsChanged 7 months agoMITView on GitHub

Use the input path to select the correct downstream grounding pipeline and continue execution until the selected grounding workflow is completed.

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 15 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill as the unified input entry layer for the system.

    line 9
  2. Distinctive:

    After identifying the correct input type, it must immediately invoke the correct downstream skill and continue the task until that …

    line 14
  3. Very specific:

    write grounded.md by bypassing the downstream skill

    line 36
  4. Distinctive:

    If the input is a URL instead of a local file:

    line 46
  5. Distinctive:

    Use returned local path for downstream routing

    line 57
  6. Very specific:

    If merge_failed: true, use audio_path instead of path

    line 58
  7. Distinctive:

    Do not use filename semantics, directory names, or inferred task intent to override the extension-based mapping.

    line 76
  8. Distinctive:

    When using this skill, you must follow this workflow:

    line 101
  9. Distinctive:

    If input contains URL patterns (arxiv.org, youtube.com, youtu.be, bilibili.com, b23.tv): goto URL handling

    line 104
  10. Distinctive:

    Use the local path for downstream routing

    line 111
  11. Distinctive:

    Follow the downstream skill's own workflow strictly

    line 121
  12. Distinctive:

    Do not stop after only reporting the routing decision

    line 122
  13. Distinctive:

    When downloading video from URL (YouTube or Bilibili), the downloader may produce separate video and audio files instead of a merged video …

    line 149
  14. Very specific:

    After remote-input downloads video content:

    line 156
  15. Very specific:

    If audio_path is used → route to meeting-audio-grounding

    line 163
  16. Very specific:

    If path is used → route based on extension (video → meeting-video-grounding)

    line 164
  17. Very specific:

    When merge_failed: true, the local file is typically a pure audio file (.webm, .mp3, etc.):

    line 168
  18. Distinctive:

    If the input is neither a supported URL nor a supported file extension:

    line 212
  19. Distinctive:

    do not guess a pipeline,

    line 215
  20. Distinctive:

    do not force the file through an unrelated skill.

    line 216
  21. Very specific:

    do not stop after saying remote-input.

    line 223
  22. Distinctive:

    use the returned local path to continue routing

    line 224

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. inspect the input path,
  2. determine the file type strictly by extension,
  3. select the correct downstream grounding pipeline,
  4. invoke the corresponding existing skill,
  5. 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.md by 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 PatternRoute ToOutput Type
arxiv.org/abs/ or arxiv.org/pdf/remote-input.pdf
youtube.com/watch, youtu.be, youtube.com/shortsremote-input.mp4/.mkv
bilibili.com/video, b23.tvremote-input.mp4/.mkv

URL routing workflow:

  1. Detect URL pattern
  2. Invoke remote-input skill to download
  3. Use returned local path for downstream routing
    • If merge_failed: true, use audio_path instead of path
  4. Continue with extension-based routing

Note on merge failure: When remote-input returns merge_failed: true, the actual file for downstream routing is the audio file (.webm etc.), which routes to meeting-audio-grounding instead of meeting-video-grounding.

File Extension Detection (Priority 2)

For local files, route strictly by file extension:

ExtensionRoute To
.mp3, .wav, .m4a, .webm, .aac, .oggmeeting-audio-grounding
.mp4, .mov, .mkvmeeting-video-grounding
.pdf, .docx, .md, .txtdocument-grounding
.xlsx, .csvtable-grounding
.pptxpptx-grounding
.ziparchive-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 PatternRoute ToLocal Output
arxiv.org/abs/ or arxiv.org/pdf/remote-inputPDF in remote/arxiv/
youtube.com/watch, youtu.be, youtube.com/shortsremote-inputVideo in remote/youtube/
bilibili.com/video, b23.tvremote-inputVideo in remote/bilibili/

File Extensions (Local Inputs)

ExtensionRoute To
.mp3, .wav, .m4a, .webm, .aac, .oggmeeting-audio-grounding
.mp4, .mov, .mkvmeeting-video-grounding
.pdf, .docx, .md, .txtdocument-grounding
.xlsx, .csvtable-grounding
.pptxpptx-grounding
.ziparchive-grounding

Required Workflow

When using this skill, you must follow this workflow:

  1. 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
  2. URL handling:
    1. Match URL pattern to remote-input
    2. Invoke remote-input skill
    3. Receive returned local file path
    4. Use the local path for downstream routing
  3. File handling:
    1. Inspect the input path
    2. Determine the file extension
    3. Match the extension to the routing table
    4. Select the corresponding downstream skill
  4. Continue:
    1. Immediately invoke the selected downstream skill
    2. Follow the downstream skill's own workflow strictly
    3. 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.07041
    • https://arxiv.org/pdf/2301.07041.pdf
    • http://arxiv.org/abs/2301.07041

YouTube URLs

  • Pattern: https?://(?:www\.)?youtube\.com/(watch|shorts)/ or https?://youtu\.be/
  • Examples:
    • https://www.youtube.com/watch?v=dQw4w9WgXcQ
    • https://youtu.be/dQw4w9WgXcQ
    • https://www.youtube.com/shorts/abc123

Bilibili URLs

  • Pattern: https?://(?:www\.)?bilibili\.com/video/ or https?://b23\.tv/
  • Examples:
    • https://bilibili.com/video/BV1xx411c7JZ
    • https://www.bilibili.com/video/av12345678
    • https://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: .mp4 file without audio + .webm audio file

Detection and Recovery

After remote-input downloads video content:

  1. Check return values for merge_failed field:
    • merge_failed: false → Use path as normal (video with audio)
    • merge_failed: true → Use audio_path instead of path
  2. Reroute based on actual file type:
    • If audio_path is used → route to meeting-audio-grounding
    • If path is used → route based on extension (video → meeting-video-grounding)

Routing After Merge Failure

When merge_failed: true, the local file is typically a pure audio file (.webm, .mp3, etc.):

Returned File TypeRoute To
.mp3, .wav, .m4a, .webm, .aac, .oggmeeting-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-input has 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.