AgentSkillsCN

context-router

将上下文提取请求路由至相应的 CLI 工具。系统会根据 /context、/limitless、/research、/pieces 等指令,或由意图钩子自动识别的上下文需求触发相应操作。支持单次提取、并行提取以及增强型提取等多种模式。

SKILL.md
--- frontmatter
name: context-router
description: |
  Routes context extraction requests to appropriate CLI tools. Triggers on /context,
  /limitless, /research, /pieces, or detected context needs from intent hook.
  Supports single, parallel, and augmented extraction modes.

Context Router

Routes external context extraction to the three-CLI system.

Trigger Keywords: context, lifelog, research, ltm, recall, lookup, pieces, limitless, pendant, documentation

Trigger Conditions

Activate when:

  • Explicit commands: /context, /limitless, /research, /pieces
  • Intent hook signals context need (balanced detection)
  • User asks about past conversations, technical docs, or code history

Source Categories

SourceCLITriggersData Type
Personallimitlesslifelog, pendant, daily, personal, meetingTranscripts, chats
Researchresearchfact-check, docs, academic, verify, sdkCitations, documentation
Localpiecesltm, saved, snippets, my code, historyCode, snippets

Routing Decision Tree

code
Request Received
    │
    ├── Explicit Command?
    │   ├── /context → Parallel (all sources)
    │   ├── /limitless → Single (limitless)
    │   ├── /research → Single (research)
    │   └── /pieces → Single (pieces)
    │
    ├── Hook Signal Present?
    │   ├── need_limitless=true → Route to limitless
    │   ├── need_research=true → Route to research
    │   ├── need_pieces=true → Route to pieces
    │   └── Multiple → Parallel mode
    │
    └── No Signal
        └── Skip (no context needed)

Mode Selection

ModeTriggerProcess
SingleClear single-source intentRoute to one CLI
Parallel/context or multi-domainSpawn all relevant CLIs
AugmentedWith deep-researchPre-enrich Phase 0

CLI Commands

Limitless (Personal)

bash
limitless lifelogs search "query" --limit 10 --format json
limitless workflow daily YYYY-MM-DD --format json
limitless workflow recent --hours 24 --format json

Research (Online)

bash
research docs -t "query" -k "framework" --format json
research fact-check -t "claim" --format json
research pex-grounding -t "medical query" --format json

Pieces (Local)

bash
pieces ask "query" --ltm
pieces search --mode ncs "pattern"

Integration

  • Skill: skill-db/context-orchestrator/SKILL.md
  • Rules: rules/context/*.md
  • Subagents: skill-db/context-orchestrator/agents/*.md
  • Commands: skill-db/context-orchestrator/commands/*.md
  • Also listed in: skills/routers/skills-router/SKILL.md (Context Skills category)
  • Hooks: hooks/context-intent-detector.ts, hooks/session-context-primer.sh