Skill177 estrellas del repoactualizado 12d ago
asta-skill
The asta-skill provides intent-to-tool routing and workflow guidance for agents using Ai2's Asta MCP server to query the Semantic Scholar academic corpus. Use this skill when deploying agents that need to search papers by relevance or title, look up papers by identifier, traverse citations, discover authors, or find passages mentioning specific topics, ensuring agents select appropriate tools and avoid context-window pitfalls like requesting full citation lists.
Instalar en Claude Code
Copiargit clone --depth 1 https://github.com/Agents365-ai/asta-skill /tmp/asta-skill && cp -r /tmp/asta-skill/skills/asta-skill ~/.claude/skills/asta-skillDespués abre una sesión nueva de Claude Code; el skill carga automáticamente.
Definición
SKILL.md
# Asta MCP — Academic Paper Search
Asta is Ai2's Scientific Corpus Tool, exposing the Semantic Scholar academic graph over MCP (streamable HTTP transport). This skill tells agents **which Asta tool to call for which intent**, and how to compose them into useful workflows.
- **MCP endpoint:** `https://asta-tools.allen.ai/mcp/v1`
- **Auth:** `x-api-key` header (request key at https://share.hsforms.com/1L4hUh20oT3mu8iXJQMV77w3ioxm)
- **Transport:** streamable HTTP
## Prerequisite Check
Before invoking any tool, verify the Asta MCP server is registered in the host agent. Tool names will be prefixed by the MCP server name chosen at install time (commonly `asta__<tool>` or `mcp__asta__<tool>`). If no Asta tools are visible, direct the user to the **Installation** section below.
## Tool Map — Intent → Asta Tool
| User intent | Asta tool | Notes |
|---|---|---|
| Broad topic search | `search_papers_by_relevance` | Supports venue + date filters |
| Known paper title | `search_paper_by_title` | Optional venue restriction |
| Known DOI / arXiv / PMID / CorpusId / MAG / ACL / SHA / URL | `get_paper` | Single-paper lookup |
| Multiple known IDs at once | `get_paper_batch` | Batch lookup — prefer over N sequential `get_paper` calls; unresolvable IDs are silently dropped (no null/error), so reconcile returned `paperId`s against your input |
| Who cited paper X | `get_citations` | Forward citations, paginated; accepts `publication_date_range` but **not** `venues`; `limit` defaults to 100 |
| Find author by name | `search_authors_by_name` | Returns profile info |
| An author's publications | `get_author_papers` | Pass author id; field param is **`paper_fields`** (not `fields`); `limit` defaults to **1000** — set it explicitly |
| Find passages mentioning X | `snippet_search` | ~500-word excerpts (title/abstract/body, excludes captions & bibliography); see snippet-specific params below |
Most search/citation tools accept **`publication_date_range`** (format `YYYY-MM-DD:YYYY-MM-DD`; year shorthand like `"2021:"`, `":2015-01"`, `"2015:2020"` is also accepted), **`venues`** (comma-separated), and **`fields`** for field selection — pass them whenever the user's intent constrains scope (e.g., "recent", "since 2022", "at NeurIPS").
**Per-tool parameter exceptions** (verified against the live server — getting these wrong yields a malformed or silently-ignored argument):
- `get_author_papers` names its field-selection param **`paper_fields`**, not `fields`. Passing `fields=` is silently ignored and you get titles only.
- `get_citations` accepts `publication_date_range` but **not** `venues`.
- `snippet_search` accepts **neither** `fields` nor `publication_date_range`. Instead it has: **`inserted_before`** (date filter, `YYYY-MM-DD`/`YYYY-MM`/`YYYY`), **`paper_ids`** (comma-separated list of ≤100 IDs to restrict snippets to specific papers), and `venues`.
### ⚠️ `fields` parameter — avoid context blowups
`get_paper` / `get_paper_batch` accept a `fields` string. **Never request `citations` or `references`** via `fields` — a single highly-cited paper (e.g. *Attention Is All You Need*) returns 200k+ characters and will overflow the agent's context window. Use the dedicated `get_citations` tool for forward citations (it paginates). Asta does not provide a dedicated `get_references` tool — to retrieve a paper's reference list, use `get_paper` with `fields=references` only for papers you know have a small reference list (typically < 100).
**Watch row counts too**, not just per-row size: default `limit`s are large — `get_author_papers` returns up to **1000** papers and `get_citations` up to **100**. For prolific authors or highly-cited papers, pass an explicit small `limit` (e.g. 20–50) unless the user asked for the full list.
Safe default `fields` for `get_paper`:
```
title,year,authors,venue,tldr,url,abstract
```
Add `journal`, `publicationDate`, `fieldsOfStudy`, `isOpenAccess` only when needed.
### Retrieving DOI / external IDs (undocumented but supported)
Asta's official `fields` list does **not** include `externalIds`, but the field is transparently passed through to the underlying Semantic Scholar API and works in practice. Add `externalIds` to `fields` to retrieve `DOI`, `PubMed`, `PubMedCentral`, `ArXiv`, `MAG`, `DBLP`, `CorpusId`. The same pass-through applies to **`citationCount`** and **`influentialCitationCount`** (also absent from the official list but verified to return) — request them when ranking results by citations. Caveats:
- Not all papers have a DOI — pure arXiv preprints often only return `ArXiv` + `CorpusId`.
- `get_paper("DOI:...")` lookup is not 100% reliable; some valid DOIs return `not found`. Prefer searching by title first, then reading `externalIds` off the result.
- Since this is undocumented, treat it as best-effort and degrade gracefully if a future Asta release drops it.
## Workflow Patterns
### Pattern 1 — Topic Discovery
1. `search_papers_by_relevance(keyword, publication_date_range="<current_year-5>:", venues=?)` → initial hits (compute the lower bound from today's date — e.g., in 2026 pass `publication_date_range="2021:"`; adjust or drop the filter if the user asks for older work)
2. Rank/present top N by citationCount + recency
3. Offer follow-ups: `get_citations` on the most influential, or `snippet_search` for specific claims
### Pattern 2 — Seed-Paper Expansion
1. `get_paper(DOI|arXiv|...)` → verify seed
2. `get_citations(paperId)` → forward expansion
3. Optionally `search_papers_by_relevance` with seed title terms for sideways discovery
4. Deduplicate by paperId before presenting
### Pattern 3 — Author Deep-Dive
1. `search_authors_by_name(name)` → pick correct profile (`affiliations` is often returned empty in practice — disambiguate primarily by `paperCount`/`citationCount`/`hIndex`, using affiliation only when present)
2. `get_author_papers(authorId)` → full publication list
3. Filter client-side by topic keywords or date
### Pattern 4 — Evidence Retrieval
1