Initial commit with translated description

This commit is contained in:
2026-03-29 09:48:38 +08:00
commit 3d5c8219d4
3 changed files with 122 additions and 0 deletions

84
SKILL.md Normal file
View File

@@ -0,0 +1,84 @@
---
name: baidu-scholar-search-skill
description: "百度学术搜索 - 搜索中英文学术文献(期刊、会议、论文等)。"
homepage: https://xueshu.baidu.com/
metadata: { "openclaw": { "emoji": "🔬", "requires": { "bins": ["curl"] ,"env":["BAIDU_API_KEY"]},"primaryEnv":"BAIDU_API_KEY" } }
---
# Baidu Scholar Search Skill
## Features
Search Chinese and English academic literature by keyword, including journal papers, conference papers, dissertations, etc.
## LLM Usage Guide
### Basic Usage
```bash
bash baidu_scholar_search.sh "keyword"
bash baidu_scholar_search.sh "keyword" page_number
bash baidu_scholar_search.sh "keyword" page_number include_abstract
```
### Parameter Description
| Parameter | Required | Default | Description |
|-----------|----------|---------|-------------|
| keyword | ✅ | - | Search term, e.g., "machine learning" or "cancer immunotherapy" |
| page_number | ❌ | 0 | Starts from 0, 0=first page, 1=second page |
| include_abstract | ❌ | false | true=return detailed abstract, false=return only title and basic info |
### Default Behavior
- **No abstract returned** - Fast response, suitable for quickly browsing literature lists
- Start from page 1
### When to Return Abstract
- User explicitly requests "abstract", "include abstract", "detailed content"
- User says "I need to understand the paper content", "give me detailed explanation"
### When NOT to Return Abstract
- User only says "search", "retrieve", "check"
- User says "see what's available", "help me find"
- No explicit request for abstract information
## API Specification
### Endpoint
`GET https://qianfan.baidubce.com/v2/tools/baidu_scholar/search`
### Request Parameters
- `wd` - Search keyword (required)
- `pageNum` - Page number (optional, default 0)
- `enable_abstract` - Whether to return abstract (optional, default false)
### Response Fields
- `title` - Paper title
- `abstract` - Abstract (only returned when enable_abstract=true)
- `keyword` - Keywords
- `paperId` - Paper ID
- `publishYear` - Publication year
- `url` - Baidu Scholar link
## Examples
### Quick Search (No Abstract)
```bash
bash baidu_scholar_search.sh "cancer immunotherapy"
# Returns title, year, keywords and other basic information
```
### Detailed Search (With Abstract)
```bash
bash baidu_scholar_search.sh "cancer immunotherapy" 0 true
# Returns detailed information including abstract
```
### Pagination Search
```bash
bash baidu_scholar_search.sh "machine learning" 1
# Search page 2 (no abstract)
```
## Notes
- Need to set `BAIDU_API_KEY` environment variable
- Keywords must be wrapped in quotes
- Returning abstract significantly increases response time
- Both Chinese and English keywords are supported

6
_meta.json Normal file
View File

@@ -0,0 +1,6 @@
{
"ownerId": "kn7akgt520t01vgs2tzx7yk6m180kt26",
"slug": "baidu-scholar-search-skill",
"version": "1.1.0",
"publishedAt": 1770956108163
}

32
baidu_scholar_search.sh Normal file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Baidu Scholar Search Skill Implementation
# Usage: bash baidu_scholar_search.sh "keyword" [page_number] [include_abstract]
# Example: bash baidu_scholar_search.sh "肿瘤免疫" 0 true
set -e
# Check required environment variable
if [ -z "$BAIDU_API_KEY" ]; then
echo '{"error": "BAIDU_API_KEY environment variable not set"}'
exit 1
fi
# Get search keyword (required)
WD="$1"
if [ -z "$WD" ]; then
echo '{"error": "Missing search keyword parameter"}'
exit 1
fi
# Page number (default 0, i.e., first page)
pageNum="${2:-0}"
# Include abstract (default false, not included)
enable_abstract="${3:-false}"
# Send request
curl -s -X GET \
-H "Authorization: Bearer $BAIDU_API_KEY" \
-H "X-Appbuilder-From: openclaw" \
"https://qianfan.baidubce.com/v2/tools/baidu_scholar/search?wd=$WD&pageNum=$pageNum&enable_abstract=$enable_abstract"