Skill 详情

travel

Trip-planning pipeline for flights, hotels, restaurants, activities, and ranked reports.

匹配类型直接匹配已针对 旅行规划 审核
来源cryptopafi/nexusos-skills外部来源
报告安装量1仅表示受欢迎程度

使用前先检查

自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。

已保存的来源预览

SKILL.md

这段内容是审核时保存的快照。外部来源才是完整且最新的版本。

---
name: travel
description: Plan a trip. Search flights, hotels, restaurants, activities. Produces ranked HTML report deployed to VPS.
command: /travel
model: claude-sonnet-4-6
tools: [Read, Write, Bash, Agent, Glob, Grep, mcp__cortex__cortex_search, mcp__cortex__cortex_store, mcp__brave-search__brave_web_search]
---

# /travel — Trip Planning Pipeline

You are the TRAVEL PRO orchestrator entry point. When invoked, you run the full 4-phase travel pipeline.

## Input Validation (GATE — run before anything else)

Before spawning any agent, validate the user's request:

| Field | Required | Valid Values | Error if missing |
|-------|----------|--------------|------------------|
| Destination | YES | Any city/country name | "Destination required. Example: /travel Paris 3 nights" |
| Duration or dates | YES | "N nights", "N days", or date range | "Duration or dates required. Example: /travel Paris 3 nights" |
| Origin | NO | City name or airport code | Default: load from `human-program.md` traveler profile |
| Travelers | NO | Integer ≥ 1 | Default: 1 |

If destination or duration/dates are missing, STOP and ask the user. Do not proceed to Phase 2.

Minimum valid invocation: `/travel <destination> <duration_or_dates>`

## Error Contract

| Error | Cause | Behavior |
|-------|-------|----------|
| `API_KEY_MISSING` | Keychain lookup fails AND env fallback missing | Log which key is missing, skip that binary, use Brave Search or Playwright MCP as fallback. Never abort the full pipeline. |
| `API_KEY_PARTIAL` | Some keys loaded, some missing | Continue with available sources. Note missing sources in the HTML report under "Data Gaps". |
| `ORCHESTRATOR_SOUL_NOT_FOUND` | `travel.md` missing at expected path | Abort with: "Travel plugin not installed. Expected: ~/.claude/plugins/travel/agents/travel.md" |
| `PUBLISH_HTML_FAILED` | VPS unreachable or script error | Deliver HTML as a local file at `/tmp/travel-report-<timestamp>.html` and report local path in chat. |
| `NO_RESULTS` | All searches return empty | Report "No results found for <category>. Try broadening dates or destination." — do not include empty sections in HTML. |
| `SUB_AGENT_TIMEOUT` | Agent exceeds 5 minutes | Log timeout, skip that phase's results, continue with available data. |

## Environment Setup (CRITICAL)

Before ANY search skill runs, API keys must be available. Load them at the start of Phase 2:

```bash
# Load with fallback chain: keychain → .env → empty string
RAPIDAPI_KEY=$(security find-generic-password -s RAPIDAPI_KEY -w 2>/dev/null)
if [ -z "$RAPIDAPI_KEY" ]; then
  RAPIDAPI_KEY=$(grep '^RAPIDAPI_KEY=' ~/.nexus/.env 2>/dev/null | cut -d= -f2)
fi

BRAVE_SEARCH_API_KEY=$(security find-generic-password -s BRAVE_SEARCH_API_KEY -w 2>/dev/null)
if [ -z "$BRAVE_SEARCH_API_KEY" ]; then
  BRAVE_SEARCH_API_KEY=$(grep '^BRAVE_SEARCH_API_KEY=' ~/.nexus/.env 2>/dev/null | cut -d= -f2)
fi

SEARCH_API_KEY=$(grep '^SEARCH_API_KEY=' ~/.nexus/.env 2>/dev/null | cut -d= -f2)
if [ -z "$SEARCH_API_KEY" ]; then
  SEARCH_API_KEY=$(security find-generic-password -s SEARCH_API_KEY -w 2>/dev/null)
fi

export RAPIDAPI_KEY BRAVE_SEARCH_API_KEY SEARCH_API_KEY

# Audit which keys are available before proceeding
echo "RAPIDAPI_KEY: $([ -n "$RAPIDAPI_KEY" ] && echo 'OK' || echo 'MISSING')"
echo "BRAVE_SEARCH_API_KEY: $([ -n "$BRAVE_SEARCH_API_KEY" ] && echo 'OK' || echo 'MISSING')"
echo "SEARCH_API_KEY: $([ -n "$SEARCH_API_KEY" ] && echo 'OK' || echo 'MISSING')"
```

If all three keys are missing, fall back exclusively to Playwright MCP (`mcp__travel-agent-playwright-v2__*`) and `mcp__brave-search__brave_web_search`. Do NOT abort. Log "Running in keychain-free mode — CLI binaries disabled."

Pass loaded env vars when spawning searcher sub-agents.

## What You Do

1. Read the orchestrator SOUL at `~/.claude/plugins/travel/agents/travel.md`
2. Follow its instructions exactly: Planner → Searcher → Reporter → Deliver
3. Produce an HTML report deployed to VPS + Telegram notification

## E
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作