[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AFH7Z91G9M112TVTRKRBWT":3,"skill-same:01M6AFH7Z91G9M112TVTRKRBWT":103},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":29,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6AFH7Z91G9M112TVTRKRBWT","openalex-database",null,"Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.","davila7\u002Fclaude-code-templates","davila7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6216945?v=4","01M6ADEWWFPS191NFM0Y1EX1JH","Daniel Avila","01M6ADJHGM78PHQRD3XZTFDVKK",33481,"MIT","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fopenalex-database\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"database","openalex database","when","research","for","papers","output","trends","literature","database queries","across","query","queries","use","analyze","access","open","analysis","Citations","analyzing","2026-11-10 10:12:30",false,"---\nname: openalex-database\ndescription: Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.\n---\n\n# OpenAlex Database\n\n## Overview\n\nOpenAlex is a comprehensive open catalog of 240M+ scholarly works, authors, institutions, topics, sources, publishers, and funders. This skill provides tools and workflows for querying the OpenAlex API to search literature, analyze research output, track citations, and conduct bibliometric studies.\n\n## Quick Start\n\n### Basic Setup\n\nAlways initialize the client with an email address to access the polite pool (10x rate limit boost):\n\n```python\nfrom scripts.openalex_client import OpenAlexClient\n\nclient = OpenAlexClient(email=\"your-email@example.edu\")\n```\n\n### Installation Requirements\n\nInstall required package using uv:\n\n```bash\nuv pip install requests\n```\n\nNo API key required - OpenAlex is completely open.\n\n## Core Capabilities\n\n### 1. Search for Papers\n\n**Use for**: Finding papers by title, abstract, or topic\n\n```python\n# Simple search\nresults = client.search_works(\n    search=\"machine learning\",\n    per_page=100\n)\n\n# Search with filters\nresults = client.search_works(\n    search=\"CRISPR gene editing\",\n    filter_params={\n        \"publication_year\": \">2020\",\n        \"is_oa\": \"true\"\n    },\n    sort=\"cited_by_count:desc\"\n)\n```\n\n### 2. Find Works by Author\n\n**Use for**: Getting all publications by a specific researcher\n\nUse the two-step pattern (entity name → ID → works):\n\n```python\nfrom scripts.query_helpers import find_author_works\n\nworks = find_author_works(\n    author_name=\"Jennifer Doudna\",\n    client=client,\n    limit=100\n)\n```\n\n**Manual two-step approach**:\n```python\n# Step 1: Get author ID\nauthor_response = client._make_request(\n    '\u002Fauthors',\n    params={'search': 'Jennifer Doudna', 'per-page': 1}\n)\nauthor_id = author_response['results'][0]['id'].split('\u002F')[-1]\n\n# Step 2: Get works\nworks = client.search_works(\n    filter_params={\"authorships.author.id\": author_id}\n)\n```\n\n### 3. Find Works from Institution\n\n**Use for**: Analyzing research output from universities or organizations\n\n```python\nfrom scripts.query_helpers import find_institution_works\n\nworks = find_institution_works(\n    institution_name=\"Stanford University\",\n    client=client,\n    limit=200\n)\n```\n\n### 4. Highly Cited Papers\n\n**Use for**: Finding influential papers in a field\n\n```python\nfrom scripts.query_helpers import find_highly_cited_recent_papers\n\npapers = find_highly_cited_recent_papers(\n    topic=\"quantum computing\",\n    years=\">2020\",\n    client=client,\n    limit=100\n)\n```\n\n### 5. Open Access Papers\n\n**Use for**: Finding freely available research\n\n```python\nfrom scripts.query_helpers import get_open_access_papers\n\npapers = get_open_access_papers(\n    search_term=\"climate change\",\n    client=client,\n    oa_status=\"any\",  # or \"gold\", \"green\", \"hybrid\", \"bronze\"\n    limit=200\n)\n```\n\n### 6. Publication Trends Analysis\n\n**Use for**: Tracking research output over time\n\n```python\nfrom scripts.query_helpers import get_publication_trends\n\ntrends = get_publication_trends(\n    search_term=\"artificial intelligence\",\n    filter_params={\"is_oa\": \"true\"},\n    client=client\n)\n\n# Sort and display\nfor trend in sorted(trends, key=lambda x: x['key'])[-10:]:\n    print(f\"{trend['key']}: {trend['count']} publications\")\n```\n\n### 7. Research Output Analysis\n\n**Use for**: Comprehensive analysis of author or institution research\n\n```python\nfrom scripts.query_helpers import analyze_research_output\n\nanalysis = analyze_research_output(\n    entity_type='institution',  # or 'author'\n    entity_name='MIT',\n    client=client,\n    years='>2020'\n)\n\nprint(f\"Total works: {analysis['total_works']}\")\nprint(f\"Open access: {analysis['open_access_percentage']}%\")\nprint(f\"Top topics: {analysis['top_topics'][:5]}\")\n```\n\n### 8. Batch Lookups\n\n**Use for**: Getting information for multiple DOIs, ORCIDs, or IDs efficiently\n\n```python\ndois = [\n    \"https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41586-021-03819-2\",\n    \"https:\u002F\u002Fdoi.org\u002F10.1126\u002Fscience.abc1234\",\n    # ... up to 50 DOIs\n]\n\nworks = client.batch_lookup(\n    entity_type='works',\n    ids=dois,\n    id_field='doi'\n)\n```\n\n### 9. Random Sampling\n\n**Use for**: Getting representative samples for analysis\n\n```python\n# Small sample\nworks = client.sample_works(\n    sample_size=100,\n    seed=42,  # For reproducibility\n    filter_params={\"publication_year\": \"2023\"}\n)\n\n# Large sample (>10k) - automatically handles multiple requests\nworks = client.sample_works(\n    sample_size=25000,\n    seed=42,\n    filter_params={\"is_oa\": \"true\"}\n)\n```\n\n### 10. Citation Analysis\n\n**Use for**: Finding papers that cite a specific work\n\n```python\n# Get the work\nwork = client.get_entity('works', 'https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41586-021-03819-2')\n\n# Get citing papers using cited_by_api_url\nimport requests\nciting_response = requests.get(\n    work['cited_by_api_url'],\n    params={'mailto': client.email, 'per-page': 200}\n)\nciting_works = citing_response.json()['results']\n```\n\n### 11. Topic and Subject Analysis\n\n**Use for**: Understanding research focus areas\n\n```python\n# Get top topics for an institution\ntopics = client.group_by(\n    entity_type='works',\n    group_field='topics.id',\n    filter_params={\n        \"authorships.institutions.id\": \"I136199984\",  # MIT\n        \"publication_year\": \">2020\"\n    }\n)\n\nfor topic in topics[:10]:\n    print(f\"{topic['key_display_name']}: {topic['count']} works\")\n```\n\n### 12. Large-Scale Data Extraction\n\n**Use for**: Downloading large datasets for analysis\n\n```python\n# Paginate through all results\nall_papers = client.paginate_all(\n    endpoint='\u002Fworks',\n    params={\n        'search': 'synthetic biology',\n        'filter': 'publication_year:2020-2024'\n    },\n    max_results=10000\n)\n\n# Export to CSV\nimport csv\nwith open('papers.csv', 'w', newline='', encoding='utf-8') as f:\n    writer = csv.writer(f)\n    writer.writerow(['Title', 'Year', 'Citations', 'DOI', 'OA Status'])\n\n    for paper in all_papers:\n        writer.writerow([\n            paper.get('title', 'N\u002FA'),\n            paper.get('publication_year', 'N\u002FA'),\n            paper.get('cited_by_count', 0),\n            paper.get('doi', 'N\u002FA'),\n            paper.get('open_access', {}).get('oa_status', 'closed')\n        ])\n```\n\n## Critical Best Practices\n\n### Always Use Email for Polite Pool\nAdd email to get 10x rate limit (1 req\u002Fsec → 10 req\u002Fsec):\n```python\nclient = OpenAlexClient(email=\"your-email@example.edu\")\n```\n\n### Use Two-Step Pattern for Entity Lookups\nNever filter by entity names directly - always get ID first:\n```python\n# ✅ Correct\n# 1. Search for entity → get ID\n# 2. Filter by ID\n\n# ❌ Wrong\n# filter=author_name:Einstein  # This doesn't work!\n```\n\n### Use Maximum Page Size\nAlways use `per-page=200` for efficient data retrieval:\n```python\nresults = client.search_works(search=\"topic\", per_page=200)\n```\n\n### Batch Multiple IDs\nUse batch_lookup() for multiple IDs instead of individual requests:\n```python\n# ✅ Correct - 1 request for 50 DOIs\nworks = client.batch_lookup('works', doi_list, 'doi')\n\n# ❌ Wrong - 50 separate requests\nfor doi in doi_list:\n    work = client.get_entity('works', doi)\n```\n\n### Use Sample Parameter for Random Data\nUse `sample_works()` with seed for reproducible random sampling:\n```python\n# ✅ Correct\nworks = client.sample_works(sample_size=100, seed=42)\n\n# ❌ Wrong - random page numbers bias results\n# Using random page numbers doesn't give true random sample\n```\n\n### Select Only Needed Fields\nReduce response size by selecting specific fields:\n```python\nresults = client.search_works(\n    search=\"topic\",\n    select=['id', 'title', 'publication_year', 'cited_by_count']\n)\n```\n\n## Common Filter Patterns\n\n### Date Ranges\n```python\n# Single year\nfilter_params={\"publication_year\": \"2023\"}\n\n# After year\nfilter_params={\"publication_year\": \">2020\"}\n\n# Range\nfilter_params={\"publication_year\": \"2020-2024\"}\n```\n\n### Multiple Filters (AND)\n```python\n# All conditions must match\nfilter_params={\n    \"publication_year\": \">2020\",\n    \"is_oa\": \"true\",\n    \"cited_by_count\": \">100\"\n}\n```\n\n### Multiple Values (OR)\n```python\n# Any institution matches\nfilter_params={\n    \"authorships.institutions.id\": \"I136199984|I27837315\"  # MIT or Harvard\n}\n```\n\n### Collaboration (AND within attribute)\n```python\n# Papers with authors from BOTH institutions\nfilter_params={\n    \"authorships.institutions.id\": \"I136199984+I27837315\"  # MIT AND Harvard\n}\n```\n\n### Negation\n```python\n# Exclude type\nfilter_params={\n    \"type\": \"!paratext\"\n}\n```\n\n## Entity Types\n\nOpenAlex provides these entity types:\n- **works** - Scholarly documents (articles, books, datasets)\n- **authors** - Researchers with disambiguated identities\n- **institutions** - Universities and research organizations\n- **sources** - Journals, repositories, conferences\n- **topics** - Subject classifications\n- **publishers** - Publishing organizations\n- **funders** - Funding agencies\n\nAccess any entity type using consistent patterns:\n```python\nclient.search_works(...)\nclient.get_entity('authors', author_id)\nclient.group_by('works', 'topics.id', filter_params={...})\n```\n\n## External IDs\n\nUse external identifiers directly:\n```python\n# DOI for works\nwork = client.get_entity('works', 'https:\u002F\u002Fdoi.org\u002F10.7717\u002Fpeerj.4375')\n\n# ORCID for authors\nauthor = client.get_entity('authors', 'https:\u002F\u002Forcid.org\u002F0000-0003-1613-5981')\n\n# ROR for institutions\ninstitution = client.get_entity('institutions', 'https:\u002F\u002Fror.org\u002F02y3ad647')\n\n# ISSN for sources\nsource = client.get_entity('sources', 'issn:0028-0836')\n```\n\n## Reference Documentation\n\n### Detailed API Reference\nSee `references\u002Fapi_guide.md` for:\n- Complete filter syntax\n- All available endpoints\n- Response structures\n- Error handling\n- Performance optimization\n- Rate limiting details\n\n### Common Query Examples\nSee `references\u002Fcommon_queries.md` for:\n- Complete working examples\n- Real-world use cases\n- Complex query patterns\n- Data export workflows\n- Multi-step analysis procedures\n\n## Scripts\n\n### openalex_client.py\nMain API client with:\n- Automatic rate limiting\n- Exponential backoff retry logic\n- Pagination support\n- Batch operations\n- Error handling\n\nUse for direct API access with full control.\n\n### query_helpers.py\nHigh-level helper functions for common operations:\n- `find_author_works()` - Get papers by author\n- `find_institution_works()` - Get papers from institution\n- `find_highly_cited_recent_papers()` - Get influential papers\n- `get_open_access_papers()` - Find OA publications\n- `get_publication_trends()` - Analyze trends over time\n- `analyze_research_output()` - Comprehensive analysis\n\nUse for common research queries with simplified interfaces.\n\n## Troubleshooting\n\n### Rate Limiting\nIf encountering 403 errors:\n1. Ensure email is added to requests\n2. Verify not exceeding 10 req\u002Fsec\n3. Client automatically implements exponential backoff\n\n### Empty Results\nIf searches return no results:\n1. Check filter syntax (see `references\u002Fapi_guide.md`)\n2. Use two-step pattern for entity lookups (don't filter by names)\n3. Verify entity IDs are correct format\n\n### Timeout Errors\nFor large queries:\n1. Use pagination with `per-page=200`\n2. Use `select=` to limit returned fields\n3. Break into smaller queries if needed\n\n## Rate Limits\n\n- **Default**: 1 request\u002Fsecond, 100k requests\u002Fday\n- **Polite pool (with email)**: 10 requests\u002Fsecond, 100k requests\u002Fday\n\nAlways use polite pool for production workflows by providing email to client.\n\n## Notes\n\n- No authentication required\n- All data is open and free\n- Rate limits apply globally, not per IP\n- Use LitLLM with OpenRouter if LLM-based analysis is needed (don't use Perplexity API directly)\n- Client handles pagination, retries, and rate limiting automatically\n","# OpenAlex Database\n\n## Overview\n\nOpenAlex is a comprehensive open catalog of 240M+ scholarly works, authors, institutions, topics, sources, publishers, and funders. This skill provides tools and workflows for querying the OpenAlex API to search literature, analyze research output, track citations, and conduct bibliometric studies.\n\n## Quick Start\n\n### Basic Setup\n\nAlways initialize the client with an email address to access the polite pool (10x rate limit boost):\n\n```python\nfrom scripts.openalex_client import OpenAlexClient\n\nclient = OpenAlexClient(email=\"your-email@example.edu\")\n```\n\n### Installation Requirements\n\nInstall required package using uv:\n\n```bash\nuv pip install requests\n```\n\nNo API key required - OpenAlex is completely open.\n\n## Core Capabilities\n\n### 1. Search for Papers\n\n**Use for**: Finding papers by title, abstract, or topic\n\n```python\n# Simple search\nresults = client.search_works(\n    search=\"machine learning\",\n    per_page=100\n)\n\n# Search with filters\nresults = client.search_works(\n    search=\"CRISPR gene editing\",\n    filter_params={\n        \"publication_year\": \">2020\",\n        \"is_oa\": \"true\"\n    },\n    sort=\"cited_by_count:desc\"\n)\n```\n\n### 2. Find Works by Author\n\n**Use for**: Getting all publications by a specific researcher\n\nUse the two-step pattern (entity name → ID → works):\n\n```python\nfrom scripts.query_helpers import find_author_works\n\nworks = find_author_works(\n    author_name=\"Jennifer Doudna\",\n    client=client,\n    limit=100\n)\n```\n\n**Manual two-step approach**:\n```python\n# Step 1: Get author ID\nauthor_response = client._make_request(\n    '\u002Fauthors',\n    params={'search': 'Jennifer Doudna', 'per-page': 1}\n)\nauthor_id = author_response['results'][0]['id'].split('\u002F')[-1]\n\n# Step 2: Get works\nworks = client.search_works(\n    filter_params={\"authorships.author.id\": author_id}\n)\n```\n\n### 3. Find Works from Institution\n\n**Use for**: Analyzing research output from universities or organizations\n\n```python\nfrom scripts.query_helpers import find_institution_works\n\nworks = find_institution_works(\n    institution_name=\"Stanford University\",\n    client=client,\n    limit=200\n)\n```\n\n### 4. Highly Cited Papers\n\n**Use for**: Finding influential papers in a field\n\n```python\nfrom scripts.query_helpers import find_highly_cited_recent_papers\n\npapers = find_highly_cited_recent_papers(\n    topic=\"quantum computing\",\n    years=\">2020\",\n    client=client,\n    limit=100\n)\n```\n\n### 5. Open Access Papers\n\n**Use for**: Finding freely available research\n\n```python\nfrom scripts.query_helpers import get_open_access_papers\n\npapers = get_open_access_papers(\n    search_term=\"climate change\",\n    client=client,\n    oa_status=\"any\",  # or \"gold\", \"green\", \"hybrid\", \"bronze\"\n    limit=200\n)\n```\n\n### 6. Publication Trends Analysis\n\n**Use for**: Tracking research output over time\n\n```python\nfrom scripts.query_helpers import get_publication_trends\n\ntrends = get_publication_trends(\n    search_term=\"artificial intelligence\",\n    filter_params={\"is_oa\": \"true\"},\n    client=client\n)\n\n# Sort and display\nfor trend in sorted(trends, key=lambda x: x['key'])[-10:]:\n    print(f\"{trend['key']}: {trend['count']} publications\")\n```\n\n### 7. Research Output Analysis\n\n**Use for**: Comprehensive analysis of author or institution research\n\n```python\nfrom scripts.query_helpers import analyze_research_output\n\nanalysis = analyze_research_output(\n    entity_type='institution',  # or 'author'\n    entity_name='MIT',\n    client=client,\n    years='>2020'\n)\n\nprint(f\"Total works: {analysis['total_works']}\")\nprint(f\"Open access: {analysis['open_access_percentage']}%\")\nprint(f\"Top topics: {analysis['top_topics'][:5]}\")\n```\n\n### 8. Batch Lookups\n\n**Use for**: Getting information for multiple DOIs, ORCIDs, or IDs efficiently\n\n```python\ndois = [\n    \"https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41586-021-03819-2\",\n    \"https:\u002F\u002Fdoi.org\u002F10.1126\u002Fscience.abc1234\",\n    # ... up to 50 DOIs\n]\n\nworks = client.batch_lookup(\n    entity_type='works',\n    ids=dois,\n    id_field='doi'\n)\n```\n\n### 9. Random Sampling\n\n**Use for**: Getting representative samples for analysis\n\n```python\n# Small sample\nworks = client.sample_works(\n    sample_size=100,\n    seed=42,  # For reproducibility\n    filter_params={\"publication_year\": \"2023\"}\n)\n\n# Large sample (>10k) - automatically handles multiple requests\nworks = client.sample_works(\n    sample_size=25000,\n    seed=42,\n    filter_params={\"is_oa\": \"true\"}\n)\n```\n\n### 10. Citation Analysis\n\n**Use for**: Finding papers that cite a specific work\n\n```python\n# Get the work\nwork = client.get_entity('works', 'https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41586-021-03819-2')\n\n# Get citing papers using cited_by_api_url\nimport requests\nciting_response = requests.get(\n    work['cited_by_api_url'],\n    params={'mailto': client.email, 'per-page': 200}\n)\nciting_works = citing_response.json()['results']\n```\n\n### 11. Topic and Subject Analysis\n\n**Use for**: Understanding research focus areas\n\n```python\n# Get top topics for an institution\ntopics = client.group_by(\n    entity_type='works',\n    group_field='topics.id',\n    filter_params={\n        \"authorships.institutions.id\": \"I136199984\",  # MIT\n        \"publication_year\": \">2020\"\n    }\n)\n\nfor topic in topics[:10]:\n    print(f\"{topic['key_display_name']}: {topic['count']} works\")\n```\n\n### 12. Large-Scale Data Extraction\n\n**Use for**: Downloading large datasets for analysis\n\n```python\n# Paginate through all results\nall_papers = client.paginate_all(\n    endpoint='\u002Fworks',\n    params={\n        'search': 'synthetic biology',\n        'filter': 'publication_year:2020-2024'\n    },\n    max_results=10000\n)\n\n# Export to CSV\nimport csv\nwith open('papers.csv', 'w', newline='', encoding='utf-8') as f:\n    writer = csv.writer(f)\n    writer.writerow(['Title', 'Year', 'Citations', 'DOI', 'OA Status'])\n\n    for paper in all_papers:\n        writer.writerow([\n            paper.get('title', 'N\u002FA'),\n            paper.get('publication_year', 'N\u002FA'),\n            paper.get('cited_by_count', 0),\n            paper.get('doi', 'N\u002FA'),\n            paper.get('open_access', {}).get('oa_status', 'closed')\n        ])\n```\n\n## Critical Best Practices\n\n### Always Use Email for Polite Pool\nAdd email to get 10x rate limit (1 req\u002Fsec → 10 req\u002Fsec):\n```python\nclient = OpenAlexClient(email=\"your-email@example.edu\")\n```\n\n### Use Two-Step Pattern for Entity Lookups\nNever filter by entity names directly - always get ID first:\n```python\n# ✅ Correct\n# 1. Search for entity → get ID\n# 2. Filter by ID\n\n# ❌ Wrong\n# filter=author_name:Einstein  # This doesn't work!\n```\n\n### Use Maximum Page Size\nAlways use `per-page=200` for efficient data retrieval:\n```python\nresults = client.search_works(search=\"topic\", per_page=200)\n```\n\n### Batch Multiple IDs\nUse batch_lookup() for multiple IDs instead of individual requests:\n```python\n# ✅ Correct - 1 request for 50 DOIs\nworks = client.batch_lookup('works', doi_list, 'doi')\n\n# ❌ Wrong - 50 separate requests\nfor doi in doi_list:\n    work = client.get_entity('works', doi)\n```\n\n### Use Sample Parameter for Random Data\nUse `sample_works()` with seed for reproducible random sampling:\n```python\n# ✅ Correct\nworks = client.sample_works(sample_size=100, seed=42)\n\n# ❌ Wrong - random page numbers bias results\n# Using random page numbers doesn't give true random sample\n```\n\n### Select Only Needed Fields\nReduce response size by selecting specific fields:\n```python\nresults = client.search_works(\n    search=\"topic\",\n    select=['id', 'title', 'publication_year', 'cited_by_count']\n)\n```\n\n## Common Filter Patterns\n\n### Date Ranges\n```python\n# Single year\nfilter_params={\"publication_year\": \"2023\"}\n\n# After year\nfilter_params={\"publication_year\": \">2020\"}\n\n# Range\nfilter_params={\"publication_year\": \"2020-2024\"}\n```\n\n### Multiple Filters (AND)\n```python\n# All conditions must match\nfilter_params={\n    \"publication_year\": \">2020\",\n    \"is_oa\": \"true\",\n    \"cited_by_count\": \">100\"\n}\n```\n\n### Multiple Values (OR)\n```python\n# Any institution matches\nfilter_params={\n    \"authorships.institutions.id\": \"I136199984|I27837315\"  # MIT or Harvard\n}\n```\n\n### Collaboration (AND within attribute)\n```python\n# Papers with authors from BOTH institutions\nfilter_params={\n    \"authorships.institutions.id\": \"I136199984+I27837315\"  # MIT AND Harvard\n}\n```\n\n### Negation\n```python\n# Exclude type\nfilter_params={\n    \"type\": \"!paratext\"\n}\n```\n\n## Entity Types\n\nOpenAlex provides these entity types:\n- **works** - Scholarly documents (articles, books, datasets)\n- **authors** - Researchers with disambiguated identities\n- **institutions** - Universities and research organizations\n- **sources** - Journals, repositories, conferences\n- **topics** - Subject classifications\n- **publishers** - Publishing organizations\n- **funders** - Funding agencies\n\nAccess any entity type using consistent patterns:\n```python\nclient.search_works(...)\nclient.get_entity('authors', author_id)\nclient.group_by('works', 'topics.id', filter_params={...})\n```\n\n## External IDs\n\nUse external identifiers directly:\n```python\n# DOI for works\nwork = client.get_entity('works', 'https:\u002F\u002Fdoi.org\u002F10.7717\u002Fpeerj.4375')\n\n# ORCID for authors\nauthor = client.get_entity('authors', 'https:\u002F\u002Forcid.org\u002F0000-0003-1613-5981')\n\n# ROR for institutions\ninstitution = client.get_entity('institutions', 'https:\u002F\u002Fror.org\u002F02y3ad647')\n\n# ISSN for sources\nsource = client.get_entity('sources', 'issn:0028-0836')\n```\n\n## Reference Documentation\n\n### Detailed API Reference\nSee `references\u002Fapi_guide.md` for:\n- Complete filter syntax\n- All available endpoints\n- Response structures\n- Error handling\n- Performance optimization\n- Rate limiting details\n\n### Common Query Examples\nSee `references\u002Fcommon_queries.md` for:\n- Complete working examples\n- Real-world use cases\n- Complex query patterns\n- Data export workflows\n- Multi-step analysis procedures\n\n## Scripts\n\n### openalex_client.py\nMain API client with:\n- Automatic rate limiting\n- Exponential backoff retry logic\n- Pagination support\n- Batch operations\n- Error handling\n\nUse for direct API access with full control.\n\n### query_helpers.py\nHigh-level helper functions for common operations:\n- `find_author_works()` - Get papers by author\n- `find_institution_works()` - Get papers from institution\n- `find_highly_cited_recent_papers()` - Get influential papers\n- `get_open_access_papers()` - Find OA publications\n- `get_publication_trends()` - Analyze trends over time\n- `analyze_research_output()` - Comprehensive analysis\n\nUse for common research queries with simplified interfaces.\n\n## Troubleshooting\n\n### Rate Limiting\nIf encountering 403 errors:\n1. Ensure email is added to requests\n2. Verify not exceeding 10 req\u002Fsec\n3. Client automatically implements exponential backoff\n\n### Empty Results\nIf searches return no results:\n1. Check filter syntax (see `references\u002Fapi_guide.md`)\n2. Use two-step pattern for entity lookups (don't filter by names)\n3. Verify entity IDs are correct format\n\n### Timeout Errors\nFor large queries:\n1. Use pagination with `per-page=200`\n2. Use `select=` to limit returned fields\n3. Break into smaller queries if needed\n\n## Rate Limits\n\n- **Default**: 1 request\u002Fsecond, 100k requests\u002Fday\n- **Polite pool (with email)**: 10 requests\u002Fsecond, 100k requests\u002Fday\n\nAlways use polite pool for production workflows by providing email to client.\n\n## Notes\n\n- No authentication required\n- All data is open and free\n- Rate limits apply globally, not per IP\n- Use LitLLM with OpenRouter if LLM-based analysis is needed (don't use Perplexity API directly)\n- Client handles pagination, retries, and rate limiting automatically\n",{"name":5,"description":7},"main","2b749c82b5d11fac39d9a6e021ce3f5b8a541bd1","cli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fopenalex-database",3931,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates","https:\u002F\u002Faitmpl.com","https:\u002F\u002Fgithub.com\u002Fdavila7","https:\u002F\u002Fdanielavila.me","Building AI dev tools with LLMs","2026-11-14 06:14:46",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add davila7\u002Fclaude-code-templates --skill openalex-database",{"tool":71,"command":72},"bunx","bunx skills add davila7\u002Fclaude-code-templates --skill openalex-database",{"tool":74,"command":75},"pnpm","pnpm dlx skills add davila7\u002Fclaude-code-templates --skill openalex-database","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fopenalex-database\u002FSKILL.md",true,[79,85,89,93,99],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"examples\u002Fcommon-patterns.md","REFERENCE","参考文档",8354,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002Frsmdt-the-startup\u002Fplugins\u002Fteam\u002Fskills\u002Fcross-cutting\u002Fpattern-detection\u002Fexamples\u002Fcommon-patterns.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fapi_guide.md",10185,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fopenalex-database\u002Freferences\u002Fapi_guide.md",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fcommon_queries.md",9587,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fopenalex-database\u002Freferences\u002Fcommon_queries.md",{"path":94,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Fopenalex_client.py","SCRIPT","脚本",10148,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fopenalex-database\u002Fscripts\u002Fopenalex_client.py",{"path":100,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":101,"sourceHtmlUrl":102},"scripts\u002Fquery_helpers.py",8443,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fopenalex-database\u002Fscripts\u002Fquery_helpers.py",[104,129,156,184,219,243],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":111,"publishedAt":50},"01M70NHBTQ8BV0A2SCAZXEPHCX","wealthville-pool-scoring","Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter\u002FHold\u002FExit\u002FReduce\u002FAvoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fweb-data\u002Fwealthville-pool-scoring\u002FSKILL.md",[110],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[112,113,114,115,116,34,117,118,43,32,119,120,121,122,123,124,125,126,127,128],"scoring","pool","wealthville pool scoring","liquidity","which","exit","now","reduce","with","record","track","verdict","evm","solana","how","public","look",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":136,"publishedAt":50},"01M70MB6VR8ERJ4EM8D5KHBMEV","technical-debt-auditor","Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO\u002FFIXME\u002FHACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like \"where should I focus refactoring\", \"find code smells\", \"audit my codebase\", \"what technical debt do we have\", \"prioritize cleanup work\", or asks about code quality metrics. Also trigger when the user mentions \"code rot\", \"legacy cleanup\", \"refactoring priorities\", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say \"technical debt\" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftechnical-debt-auditor\u002FSKILL.md",[135],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[137,138,139,140,141,142,143,144,145,146,147,32,148,149,150,151,152,153,154,155],"technical debt","debt","technical","technical debt auditor","auditor","coverage","complexity","markers","project","cleanup","unused","code","todo","work","plan","focus","signals","audit","dependency",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":169,"publishedAt":50},"01M70KPYH9QNHCNME5GJQGE22K","readonly-sql-guard","Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production\u002FERP\u002Fanalytics database (a \"query\" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write\u002FDDL\u002Fside-effect\u002Ftransaction-escape risks. Checks what a statement CALLS, not just its shape.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdatabase\u002Freadonly-sql-guard\u002FSKILL.md",[162,163,164],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":165,"categoryName":166,"taxonomyType":167,"taxonomyTypeDesc":168},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[170,171,172,173,174,175,176,34,177,178,179,180,181,182,183,43,45,30,32,41],"readonly","guard","sql guard","sql","readonly sql guard","erp","effect","read-only","db","just","tool","calls","only","MCP",{"skillNo":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":188,"licenseFileUrl":189,"sourceHtmlUrl":190,"categories":191,"keywords":195,"publishedAt":50},"01M6AFY6F7CC2BBZP1QD6VTNVC","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[192],{"categoryNo":193,"categoryName":194,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,34,218],"artifacts builder","web","web artifacts builder","artifacts","builder","state","routing","state management","component","css","frontend","ui","Tools","file","components","shadcn","react","Tailwind","suite","jsx","html","single-file","ui components",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":188,"licenseFileUrl":223,"sourceHtmlUrl":224,"categories":225,"keywords":230,"publishedAt":50},"01M6AFWF33SFV9Z3SF4PEEE4BF","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[226,229],{"categoryNo":227,"categoryName":228,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":193,"categoryName":194,"taxonomyType":21,"taxonomyTypeDesc":22},[231,232,233,234,235,197,236,206,207,237,238,239,240,34,241,120,242],"webapp testing","testing","webapp","browser","playwright","applications","debugging","toolkit","logs","screenshots","local","behavior",{"skillNo":244,"name":245,"nameZh":6,"description":246,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":188,"licenseFileUrl":247,"sourceHtmlUrl":248,"categories":249,"keywords":257,"publishedAt":50},"01M6AF67Q67JJJ5V51JR2P52KA","discernment-nudge","After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FSKILL.md",[250,253,254],{"categoryNo":251,"categoryName":252,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":255,"categoryName":256,"taxonomyType":167,"taxonomyTypeDesc":168},"01JBSEEDCAT000000000000036","内容创作者",[258,259,260,261,262,263,264,265,199,266,209,148,267,268,269,270,271,182,272,32,273,47,274,275,276,126,277],"discernment nudge","nudge","interpretation","help","run","reasoning","data","writing","lookup","content","review","conversation","short","up","invoke","you","claims","argument","assemble","recommendations"]