$npx -y skills add tuan3w/obsidian-vault-agent --skill paper-discoverUse when searching for academic papers related to a topic, finding papers similar to one already in the vault, or discovering research gaps. Triggers on "find papers", "related papers", "paper search", "literature", "what papers should I read about X".
| 1 | <Purpose> |
| 2 | Search academic databases (Semantic Scholar) for papers relevant to a topic |
| 3 | or related to an existing vault note. Returns ranked results with relevance |
| 4 | assessment against vault content. Optionally creates formatted paper notes |
| 5 | in the vault's inbox for processing. |
| 6 | </Purpose> |
| 7 | |
| 8 | <Use_When> |
| 9 | - User asks to find papers on a topic ("find papers about scaling laws") |
| 10 | - User wants papers related to an existing note ("what papers connect to this?") |
| 11 | - User is /processing a paper and wants to find related work |
| 12 | - User asks "what should I read about X?" |
| 13 | - User provides a DOI or paper title and wants similar papers |
| 14 | - User wants to fill gaps in a knowledge domain |
| 15 | </Use_When> |
| 16 | |
| 17 | <Do_Not_Use_When> |
| 18 | - User has a paper file to analyze (use /paper or /book-analyzer) |
| 19 | - User wants to process an existing vault note (use /process) |
| 20 | - User wants general web research, not academic papers (use /research) |
| 21 | </Do_Not_Use_When> |
| 22 | |
| 23 | <Execution_Policy> |
| 24 | - Search first, present results, then create notes only if user approves |
| 25 | - Always check vault for existing paper notes before creating duplicates |
| 26 | - Rank by vault relevance, not just citation count |
| 27 | - Cap at 10 results per search — quality over quantity |
| 28 | - Respect Semantic Scholar rate limits (100 req/5min) |
| 29 | </Execution_Policy> |
| 30 | |
| 31 | <Steps> |
| 32 | |
| 33 | ## Stage 1: PARSE QUERY AND CONTEXT |
| 34 | |
| 35 | Determine the search mode from user input: |
| 36 | |
| 37 | **Mode A — Topic search** (default): |
| 38 | User provides a topic or question. Extract search terms. |
| 39 | ``` |
| 40 | "find papers about scaling laws for LLMs" → query: "scaling laws large language models" |
| 41 | ``` |
| 42 | |
| 43 | **Mode B — Similar papers**: |
| 44 | User references an existing vault note or provides a paper ID/DOI. |
| 45 | 1. Read the referenced note to extract title, key concepts |
| 46 | 2. Use the paper's Semantic Scholar ID or DOI for recommendations |
| 47 | 3. Fall back to keyword search if no ID available |
| 48 | |
| 49 | **Mode C — Gap filling**: |
| 50 | User asks about a domain. Search vault first to identify what's covered, |
| 51 | then search for papers on uncovered subtopics. |
| 52 | |
| 53 | ## Stage 2: SEARCH |
| 54 | |
| 55 | Run the search script: |
| 56 | |
| 57 | ```bash |
| 58 | SKILL_DIR="${CLAUDE_SKILL_DIR}" |
| 59 | |
| 60 | # Topic search |
| 61 | python3 "$SKILL_DIR/scripts/search_papers.py" "QUERY" --limit 20 --min-citations 5 |
| 62 | |
| 63 | # With year filter |
| 64 | python3 "$SKILL_DIR/scripts/search_papers.py" "QUERY" --limit 20 --year-from 2020 |
| 65 | |
| 66 | # Get recommendations from a paper |
| 67 | python3 "$SKILL_DIR/scripts/search_papers.py" "" --recommend-from "DOI:10.xxxx/xxxxx" |
| 68 | |
| 69 | # Look up specific paper |
| 70 | python3 "$SKILL_DIR/scripts/search_papers.py" "" --paper-id "DOI:10.xxxx/xxxxx" |
| 71 | ``` |
| 72 | |
| 73 | Script returns JSON array of papers with: title, authors, year, abstract, |
| 74 | tldr, citation_count, influential_citations, url, doi, arxiv_id, fields_of_study. |
| 75 | |
| 76 | ## Stage 3: RANK AND PRESENT |
| 77 | |
| 78 | Read the agent definition from `agents/paper-writer.md` in the skill directory. |
| 79 | |
| 80 | Search the vault for existing paper notes on this topic using the MCP tool: |
| 81 | ``` |
| 82 | search_notes(query="KEYWORD", limit=20) |
| 83 | ``` |
| 84 | Or fall back to Grep if MCP is unavailable: |
| 85 | ``` |
| 86 | Grep(pattern="KEYWORD", path="notes/", glob="*.md", head_limit=20) |
| 87 | ``` |
| 88 | |
| 89 | Launch the paper-writer agent to rank and present: |
| 90 | |
| 91 | ``` |
| 92 | Agent( |
| 93 | subagent_type="general-purpose", |
| 94 | model="sonnet", |
| 95 | run_in_background=false, |
| 96 | prompt="You are Paper Writer. Follow these instructions exactly: |
| 97 | |
| 98 | [INSERT FULL CONTENT OF agents/paper-writer.md HERE] |
| 99 | |
| 100 | SEARCH CONTEXT: |
| 101 | - User query: [original query] |
| 102 | - Search mode: [topic/similar/gap] |
| 103 | - Vault topics: [detected from search/tags] |
| 104 | |
| 105 | EXISTING VAULT PAPERS: |
| 106 | [List any matching paper notes already in the vault] |
| 107 | |
| 108 | SEARCH RESULTS: |
| 109 | [INSERT JSON FROM STAGE 2 HERE] |
| 110 | |
| 111 | Rank these papers by relevance to the vault's existing knowledge. |
| 112 | Present the top 10 with your assessment. Do NOT create notes yet — |
| 113 | just present the ranked list for user triage." |
| 114 | ) |
| 115 | ``` |
| 116 | |
| 117 | ## Stage 4: CREATE NOTES (on user approval) |
| 118 | |
| 119 | After user selects which papers to add: |
| 120 | |
| 121 | For each selected paper, create a vault note: |
| 122 | 1. Generate timestamp ID: `date +%Y%m%d%H%M%S` |
| 123 | 2. Create the note file with proper frontmatter and body |
| 124 | 3. Check for duplicate titles before creating |
| 125 | |
| 126 | Note template: |
| 127 | ```markdown |
| 128 | --- |
| 129 | id: YYYYMMDDHHMMSS |
| 130 | created_date: YYYY-MM-DD |
| 131 | updated_date: YYYY-MM-DD |
| 132 | type: paper |
| 133 | category: |
| 134 | link: [paper URL] |
| 135 | processing_status: inbox |
| 136 | --- |
| 137 | |
| 138 | # Title |
| 139 | - **🏷️Tags** : #paper #topic-tag #MM-YYYY |
| 140 | |
| 141 | [ ](#anki-card) |
| 142 | |
| 143 | ## Abstract |
| 144 | - [Synthesized abstract bullets] |
| 145 | |
| 146 | ## Notes |
| 147 | |
| 148 | ## Questions |
| 149 | |
| 150 | ## Related links |
| 151 | - [Paper URL](url) |
| 152 | - [[(Type) Related Vault Note]] |
| 153 | ``` |
| 154 | |
| 155 | Place the note in `notes/paper/` (or appropriate topic folder). |
| 156 | |
| 157 | </Steps> |
| 158 | |
| 159 | <Tool_Usage> |
| 160 | - **Bash**: Run search_papers.py script, generate timestamps |
| 161 | - **Read**: Read agent definition, read existing vault notes for context |
| 162 | - **Write/Edit**: |