Felo Search Skill
When to Use
Trigger this skill for questions requiring current or real-time information:
- - Current events & news: Recent developments, trending topics, breaking news
- Real-time data: Weather, stock prices, exchange rates, sports scores
- Information queries: "What is...", "Tell me about...", product reviews, comparisons, recommendations
- Location-based: Restaurants, travel destinations, local attractions, things to do
- How-to guides: Tutorials, step-by-step instructions, best practices
- Shopping & prices: Product prices, deals, "where to buy"
- Trends & statistics: Market trends, rankings, data analysis
- Any question where Claude's knowledge may be outdated
Trigger words:
- - 简体中文: 最近、什么、哪里、怎么样、如何、查、搜、找、推荐、比较、新闻、天气
- 繁體中文: 最近、什麼、哪裡、怎麼樣、如何、查、搜、找、推薦、比較、新聞、天氣
- 日本語: 最近、何、どこ、どう、検索、探す、おすすめ、比較、ニュース、天気
- English: latest, recent, what, where, how, best, search, find, compare, news, weather
Explicit commands: /felo-search, "search with felo", "felo search"
Do NOT use for:
- - Code questions about the user's codebase (unless asking about external libraries/docs)
- Pure mathematical calculations or logical reasoning
- Questions about files in the current project
Setup
1. Get Your API Key
- 1. Visit felo.ai and log in (or register)
- Click your avatar in the top right corner → Settings
- Navigate to the "API Keys" tab
- Click "Create New Key" to generate a new API Key
- Copy and save your API Key securely
2. Configure API Key
Set the FELO_API_KEY environment variable:
Linux/macOS:
CODEBLOCK0
Windows (PowerShell):
CODEBLOCK1
Windows (CMD):
CODEBLOCK2
For permanent configuration, add it to your shell profile (~/.bashrc, ~/.zshrc) or system environment variables.
How to Execute
When this skill is triggered, execute the following steps using the Bash tool:
Step 1: Check API Key
Use the Bash tool to verify the API key is set:
CODEBLOCK3
If the API key is not set, inform the user with setup instructions and STOP.
Step 2: Make API Request
Extract the user's query and call the Felo API using a temporary JSON file to handle special characters:
CODEBLOCK4
Notes:
- - Replace
USER_QUERY_HERE with the actual user query - Use heredoc (
cat > file << 'EOF') to properly handle Chinese, Japanese, and special characters - Use
-s flag with curl for clean output
Step 3: Parse and Format Response
The API returns JSON with this structure:
CODEBLOCK5
Parse the JSON response and present it to the user in this format:
CODEBLOCK6
Complete Examples
Example 1: Weather query
User asks: "What's the weather in Tokyo today?"
Expected response format:
CODEBLOCK7
Bash command:
CODEBLOCK8
Example 2: Local news / events
User asks: "What's new in Hangzhou recently?"
Expected response format:
CODEBLOCK9
Bash command:
CODEBLOCK10
Example 3: Travel / things to do
User asks: "What are the best things to do in Taipei?"
Bash command:
CODEBLOCK11
Example 4: Restaurants / recommendations
User asks: "Popular restaurants in Tokyo?"
Bash command:
CODEBLOCK12
Error Handling
Common Error Codes
- -
INVALID_API_KEY - API Key is invalid or revoked
- Solution: Check if your API key is correct and hasn't been revoked
- -
MISSING_PARAMETER - Required parameter is missing
- Solution: Ensure the query parameter is provided
- -
INVALID_PARAMETER - Parameter value is invalid
- Solution: Check the query format
- -
CHAT_FAILED - Internal service error
- Solution: Retry the request or contact Felo support
Missing API Key
If FELO_API_KEY is not set, display this message:
CODEBLOCK13
API Configuration
Endpoint: INLINECODE10
Authentication: Bearer token in Authorization header (from FELO_API_KEY environment variable)
Request format:
CODEBLOCK14
Response format:
CODEBLOCK15
Important Notes
- - This skill should be used for any question requiring current information
- Execute immediately using the Bash tool - don't just describe what you would do
- Multi-language support: Fully supports Simplified Chinese, Traditional Chinese (Taiwan), Japanese, and English
- Handle special characters properly: Use heredoc for JSON files to avoid encoding issues
- Parse JSON response: Extract answer and query_analysis fields
- Format nicely: Present results in a clean, readable format with proper markdown
- The API returns results in the same language as the query when possible
Additional Resources
Felo 搜索技能
使用时机
当问题需要当前或实时信息时,触发此技能:
- - 当前事件与新闻: 最新动态、热门话题、突发新闻
- 实时数据: 天气、股票价格、汇率、体育比分
- 信息查询: 什么是...、告诉我关于...、产品评测、比较、推荐
- 基于位置: 餐厅、旅游目的地、当地景点、活动推荐
- 操作指南: 教程、分步说明、最佳实践
- 购物与价格: 产品价格、优惠、在哪里购买
- 趋势与统计: 市场趋势、排名、数据分析
- 任何Claude知识可能过时的问题
触发词:
- - 简体中文:最近、什么、哪里、怎么样、如何、查、搜、找、推荐、比较、新闻、天气
- 繁體中文:最近、什麼、哪裡、怎麼樣、如何、查、搜、找、推薦、比較、新聞、天氣
- 日本語:最近、何、どこ、どう、検索、探す、おすすめ、比較、ニュース、天気
- English:latest, recent, what, where, how, best, search, find, compare, news, weather
显式命令: /felo-search、search with felo、felo search
请勿用于:
- - 关于用户代码库的代码问题(除非询问外部库/文档)
- 纯数学计算或逻辑推理
- 关于当前项目中文件的问题
设置
1. 获取您的 API 密钥
- 1. 访问 felo.ai 并登录(或注册)
- 点击右上角的头像 → 设置
- 导航到API 密钥选项卡
- 点击创建新密钥生成新的 API 密钥
- 安全地复制并保存您的 API 密钥
2. 配置 API 密钥
设置 FELOAPIKEY 环境变量:
Linux/macOS:
bash
export FELOAPIKEY=your-api-key-here
Windows (PowerShell):
powershell
$env:FELOAPIKEY=your-api-key-here
Windows (CMD):
cmd
set FELOAPIKEY=your-api-key-here
如需永久配置,请将其添加到您的 shell 配置文件(~/.bashrc、~/.zshrc)或系统环境变量中。
如何执行
当此技能被触发时,使用 Bash 工具执行以下步骤:
步骤 1:检查 API 密钥
使用 Bash 工具验证 API 密钥是否已设置:
bash
if [ -z $FELOAPIKEY ]; then
echo 错误:FELOAPIKEY 未设置
exit 1
fi
echo API 密钥已配置
如果 API 密钥未设置,请向用户提供设置说明并停止。
步骤 2:发起 API 请求
提取用户的查询并使用临时 JSON 文件调用 Felo API,以处理特殊字符:
bash
创建查询 JSON(将 USER_QUERY 替换为实际查询)
cat > /tmp/felo_query.json << EOF
{query: USER
QUERYHERE}
EOF
调用 Felo API
curl -s -X POST https://openapi.felo.ai/v2/chat \
-H Authorization: Bearer $FELO
APIKEY \
-H Content-Type: application/json \
-d @/tmp/felo_query.json
清理
rm -f /tmp/felo_query.json
注意:
- - 将 USERQUERYHERE 替换为实际的用户查询
- 使用 heredoc(cat > file << EOF)正确处理中文、日文和特殊字符
- 使用 curl 的 -s 标志以获得干净输出
步骤 3:解析并格式化响应
API 返回的 JSON 结构如下:
json
{
answer: AI 生成的答案文本,
query_analysis: [优化查询 1, 优化查询 2]
}
解析 JSON 响应并以以下格式呈现给用户:
答案
[显示 answer 字段]
查询分析
优化搜索词:[列出 query_analysis 项]
完整示例
示例 1:天气查询
用户提问:今天东京的天气怎么样?
预期响应格式:
答案
今天东京天气:晴,22°C(72°F)。最高 25°C,最低 18°C。
东风,风速 10 公里/小时。紫外线指数:6(高)。
适合户外活动!
查询分析
优化搜索词:Tokyo weather today、東京 天気 今日
Bash 命令:
bash
cat > /tmp/felo_query.json << EOF
{query: 今天东京的天气怎么样?}
EOF
curl -s -X POST https://openapi.felo.ai/v2/chat \
-H Authorization: Bearer $FELOAPIKEY \
-H Content-Type: application/json \
-d @/tmp/felo_query.json
rm -f /tmp/felo_query.json
示例 2:本地新闻/活动
用户提问:杭州最近有什么新鲜事?
预期响应格式:
答案
杭州近期新闻:亚运会场馆升级完成、西湖夜游上线、新地铁线路开通。详情...
查询分析
优化搜索词:Hangzhou recent news、Hangzhou events、杭州 最近 新闻
Bash 命令:
bash
cat > /tmp/felo_query.json << EOF
{query: 杭州最近有什么新鲜事}
EOF
curl -s -X POST https://openapi.felo.ai/v2/chat \
-H Authorization: Bearer $FELOAPIKEY \
-H Content-Type: application/json \
-d @/tmp/felo_query.json
rm -f /tmp/felo_query.json
示例 3:旅游/活动推荐
用户提问:台北有哪些必做的事情?
Bash 命令:
bash
cat > /tmp/felo_query.json << EOF
{query: 台北有哪些必做的事情}
EOF
curl -s -X POST https://openapi.felo.ai/v2/chat \
-H Authorization: Bearer $FELOAPIKEY \
-H Content-Type: application/json \
-d @/tmp/felo_query.json
rm -f /tmp/felo_query.json
示例 4:餐厅/推荐
用户提问:东京有哪些热门餐厅?
Bash 命令:
bash
cat > /tmp/felo_query.json << EOF
{query: 东京有哪些热门餐厅}
EOF
curl -s -X POST https://openapi.felo.ai/v2/chat \
-H Authorization: Bearer $FELOAPIKEY \
-H Content-Type: application/json \
-d @/tmp/felo_query.json
rm -f /tmp/felo_query.json
错误处理
常见错误代码
- - INVALIDAPIKEY - API 密钥无效或已被撤销
- 解决方案:检查您的 API 密钥是否正确且未被撤销
- - MISSING_PARAMETER - 缺少必需参数
- 解决方案:确保提供了查询参数
- - INVALID_PARAMETER - 参数值无效
- 解决方案:检查查询格式
- 解决方案:重试请求或联系 Felo 支持
缺少 API 密钥
如果 FELOAPIKEY 未设置,显示以下消息:
❌ Felo API 密钥未配置
要使用此技能,您需要设置 Felo API 密钥:
- 1. 从 https://felo.ai 获取您的 API 密钥(设置 → API 密钥)
- 设置环境变量:
Linux/macOS:
export FELOAPIKEY=your-api-key-here
Windows (PowerShell):
$env:FELOAPIKEY=your-api-key-here
- 3. 重启 Claude Code 或重新加载环境
API 配置
端点: https://openapi.felo.ai/v2/chat
认证: Authorization 头中的 Bearer 令牌(来自 FELOAPIKEY 环境变量)
请求格式:
json
{
query: 用户的搜索查询
}
响应格式:
json
{
answer: AI 生成的综合答案,
query_analysis: [优化查询 1, 优化查询 2]
}
重要说明
- - 此技能应用于任何需要当前信息的问题
- 立即使用 Bash 工具执行——不要仅描述您将做什么
- 多语言支持:完全支持简体