arXiv to Skill Research Workflow
Lightweight end-to-end workflow for researching arXiv papers, extracting valuable insights, generating skills, and documenting findings in Obsidian.
Overview
This workflow provides a streamlined alternative to knowledge graph-based research:
- No KG database setup required
- Direct arXiv API access
- Manual paper selection based on value criteria
- Direct skill creation from paper analysis
- Multi-format documentation (skills + Obsidian wiki)
Trigger Conditions
- Scheduled cron job for neuroscience paper monitoring
- User requests arXiv paper research and skill creation
- Keywords: arxiv, paper search, skill generation, research automation, obsidian wiki update
Workflow Steps
Step 1: Search arXiv
PRIMARY METHOD: Browser-based extraction (Recommended for API rate limits)
When arXiv API returns HTTP 429 (rate limit) or fails, use browser navigation to access category listing pages directly:
from hermes_tools import browser_navigate, browser_click, browser_snapshot
# Navigate to category recent submissions page
browser_navigate(url="https://arxiv.org/list/q-bio.NC/recent")
# Get structured paper list from snapshot
snapshot = browser_snapshot(full=True)
# Parse entries from DescriptionList elements
# Each entry contains: arXiv ID, title, authors, subjects
# Click specific paper for details
browser_navigate(url="https://arxiv.org/abs/XXXX.XXXXX")
detailed_snapshot = browser_snapshot(full=True)
# Extract abstract, metadata from full page
CRITICAL (2026-05-05): browser_navigate to arxiv.org URLs now fails with net::ERR_CONNECTION_CLOSED. arXiv.org direct navigation is unreliable. Discovery strategy: (1) web_search for Google-indexed arXiv links, (2) GitHub SNN-Daily-Arxiv (https://github.com/SpikingChen/SNN-Daily-Arxiv/) for SNN papers via table JS extraction, (3) Individual browser_navigate to https://arxiv.org/abs/XXXX.XXXXX for abstracts (single-paper pages work when category listings fail).
Category pages to use:
https://arxiv.org/list/q-bio.NC/new - Neurons and Cognition (shows FULL abstracts in snapshot — preferred over /recent)
Category pages to use:
https://arxiv.org/list/q-bio.NC/recent - Neurons and Cognition
https://arxiv.org/list/cs.NE/recent - Neural and Evolutionary Computing
https://arxiv.org/list/cs.LG/recent - Machine Learning (broad)
https://arxiv.org/list/quant-ph/recent - Quantum Physics
https://arxiv.org/list/stat.ML/recent - Statistics ML (emerging methods)
WARNING: Cross-category keyword search via /search/?query=... is broken (HTTP 400) as of 2026-05-05. Only use category listing pages.
IMPORTANT: /new vs /recent: The /new pages show complete abstracts directly in the browser_snapshot text (as <paragraph> elements under each entry), while /recent pages only show titles/authors/subjects. Use /new for paper assessment without needing to navigate to individual /abs/ pages.
Multiple sessions per day: arXiv only updates once daily (new papers appear at ~14:00 ET / ~02:00 UTC). Running multiple cron sessions on the same calendar day yields diminishing returns — afternoon/evening sessions will find the same papers as morning sessions. Consider skipping evening sessions unless monitoring for rapid cross-lists or replacements.
WARNING (2026-05-04): arXiv /search/?query=... URLs with multi-term queries (using + separators) now return HTTP 400 "Bad Request". The cross-category keyword search URL pattern is broken. Use category listing pages exclusively — they remain fully functional.
Advantage: Pre-structured, chronological listings with direct links to PDF and HTML versions — more reliable than API when rate-limited.
CRITICAL (2026-05-03): arXiv /search/?query=... browser pages now return 400 Bad Request even for simple queries. Combined with HTTP 429 rate limits on the API, browser-based search is ALSO unreliable. The ONLY reliable discovery method is direct category page browsing (/list/{category}/recent). Do NOT waste time on /search/?query=... pages or API queries — go straight to category listing pages.
CRITICAL (2026-05-05): arXiv search forms are BROKEN — /search/?query=... returns HTTP 400 Bad Request and /search/advanced returns "Whoops! Something went wrong" even with valid parameters. Do NOT waste time on arXiv search pages. Only category listing pages work reliably: /list/{category}/recent (e.g., /list/q-bio.NC/recent, /list/cs.NE/recent).
CRITICAL (2026-05-07): JS extraction on category listing pages (/list/{category}/recent) with dt/dd selectors returns empty strings for titles and authors — the dd.childNodes[0].textContent is empty in the DOM. Do NOT use JS extraction on category pages at all. Use browser_snapshot(full=True) which correctly captures all paper titles, IDs, authors, and subjects as structured text. JS extraction is ONLY reliable on /search/?query=... pages (li.arxiv-result elements), but even that can be intermittent — always verify results.
CRITICAL (2026-05-06): JS extraction on search result pages (/search/?query=...) is INTERMITTENTLY UNRELIABLE. The li.arxiv-result DOM sometimes produces incorrect titles or empty fields. When it works, the improved recipe below extracts IDs, titles, authors, AND abstracts — but fallback to browser_snapshot(full=True) if results look garbled. Category pages (/list/{category}/recent) remain the most reliable method.
Improved JS extraction recipe (verified working 2026-05-06 on search result pages — use if snapshot parsing is insufficient):
(() => {
const results = document.querySelectorAll('li.arxiv-result');
const papers = [];
results.forEach(li => {
const idEl = li.querySelector('a[href*="abs/"]');
const id = idEl ? idEl.href.split('/').pop() : '';
const allP = li.querySelectorAll('p');
let title = '', authors = '', abstract = '';
allP.forEach(p => {
const t = p.textContent.trim().replace(/\s+/g, ' ');
if (!t.startsWith('Authors:') && !t.startsWith('Submitted') && !t.startsWith('Abstract:') && !title) { title = t; }
if (t.startsWith('Authors:')) { authors = t.replace('Authors:', '').trim().substring(0, 150); }
if (t.startsWith('Abstract:')) { abstract = t.substring(9).trim().substring(0, 300); }
});
papers.push({ id, title, authors, abstract });
});
return JSON.stringify(papers);
})()
NOTE: This improved recipe extracts abstracts in addition to IDs/titles/authors, which is critical for coverage analysis. The older recipe only extracted titles/authors.
Search URL format: Use ?query=term1+term2&start=0&order=-announced_date_first. Avoid searchtype=all and size=20 params — these cause 400 Bad Request errors.
FALLBACK METHOD: Python urllib — Only if browser navigation fails (rare):
CRITICAL: Use execute_code with Python urllib.request — web_extract was historically unreliable for arXiv /abs/ URLs but now works reliably (verified 2026-05-06). Use web_extract first; fall back to urllib only if it returns empty/blocked content.
from hermes_tools import terminal
import urllib.request, urllib.parse, ssl, xml.etree.ElementTree as ET, json, time
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
def search_arxiv(query, max_results=30):
params = urllib.parse.urlencode({
"search_query": query,
"sortBy": "submittedDate",
"sortOrder": "descending",
"max_results": max_results
})
url = f"https://export.arxiv.org/api/query?{params}"
req = urllib.request.Request(url)
resp = urllib.request.urlopen(req, context=ctx, timeout=30)
return resp.read().decode("utf-8")
IMPORTANT: Use urllib.parse.urlencode() — manual URL construction with spaces causes "Malformed or illegal URL" errors. XML namespaces: {"atom": "http://www.w3.org/2005/Atom", "arxiv": "http://arxiv.org/schemas/atom"}.
Multiple keyword searches recommended — run 2-3 queries with different term combinations:
all:"neuroscience" AND all:"brain network"
all:"spiking neural network" AND all:"computational"
all:"neural dynamics" AND all:"brain"
Important: Add time.sleep(3) between requests to respect arXiv API rate limits.
Step 1b: Pre-Flight Same-Day Dedup (CRITICAL 2026-05)
Before running the full workflow, check if today's papers were already scanned in an earlier cron session. At 738+ skills with multiple daily cron runs, same-day paper batches are frequently rescanned, producing zero-new-skills sessions that waste resources.
import os, re
from datetime import datetime
today = datetime.now().strftime("%Y-%m-%d")
vault = os.environ.get("OBSIDIAN_VAULT_PATH", "/Users/hiyenwong/Documents/Obsidian Vault")
ai_notes = os.path.join(vault, "ai_collection")
# Find all today's research notes
today_notes = [f for f in os.listdir(ai_notes) if f.endswith('.md') and today in f.lower() and 'research' in f.lower()]
if today_notes:
# Collect all arXiv IDs already documented today
documented_ids = set()
for note in today_notes:
with open(os.path.join(ai_notes, note)) as fh:
content = fh.read()
ids = re.findall(r'26\d{2}\.\d{5}', content)
documented_ids.update(ids)
print(f"Existing same-day sessions: {len(today_notes)}")
print(f"arXiv IDs already documented today: {len(documented_ids)}")
# After scraping, compare:
# new_ids = scraped_ids - documented_ids
# if not new_ids:
# print("[SILENT] — all papers already covered in earlier session")
# # Skip the rest of the workflow
Decision rule: If len(new_ids) == 0 after comparing scraped papers against same-day notes, respond with [SILENT] and skip skill creation, Obsidian updates, and report generation entirely.
Step 2: Filter and Select Papers
From the search results:
- Deduplicate by arXiv ID (papers appear across multiple queries)
- Deduplicate against same-day session notes (Step 1b above) — if all papers already documented today, output
[SILENT] and stop
- Cross-reference paper titles against existing skill directory names in
~/.hermes/skills/ai_collection/ — list directories, normalize names (lowercase, strip hyphens), check for substring matches. This catches papers already covered under different naming conventions.
- Filter to target date range (e.g., papers from the last 24-48 hours)
Coverage Analysis** — Calculate coverage metrics:
CRITICAL (2026-05-05): The word-overlap matching alone misses exact-match skills. Use a two-tier approach:
def normalize_for_matching(text):
stop_words = {'the', 'a', 'an', 'and', 'or', 'but', 'in', 'on', 'at', 'to', 'for', 'of', 'with', 'by', 'using', 'based'}
words = [w for w in text.lower().replace('-', ' ').replace('_', ' ').split() if w not in stop_words]
return set(words)
# TIER 1: Direct substring / acronym matching (highest priority)
# Check if paper title contains skill name tokens or vice versa
def direct_match(title, skill_name):
title_lower = title.lower()
skill_lower = skill_name.lower().replace('-', ' ').replace('_', ' ')
# Check for key acronyms or exact phrases
for token in skill_lower.split():
if len(token) > 3 and token in title_lower:
# Also check reverse: title key terms in skill name
return True
# Check for known acronyms (e.g., "UniBCI" in skill name "unibci-invasive-foundation-model")
import re
title_acronyms = re.findall(r'\b[A-Z]{2,}\b', title)
for acronym in title_acronyms:
if acronym.lower() in skill_lower:
return True
return False
# TIER 2: Word overlap (for when direct match fails)
for paper in papers:
title_words = normalize_for_matching(paper['title'])
matched_skill = None
# Try direct match first
for skill in existing_skills:
if direct_match(paper['title'], skill):
matched_skill = skill
break
# Fall back to word overlap
if not matched_skill:
for skill in existing_skills:
skill_words = normalize_for_matching(skill)
# Weight key neuroscience terms higher
key_terms = {'spiking','brain','neural','network','hopfield','attractor',
'reservoir','free','energy','criticality','quantum','modality','bci'}
common = title_words & skill_words
key_matches = common & key_terms
if len(key_matches) >= 2 or len(common) >= 3:
matched_skill = skill
break
coverage_rate = already_covered / len(papers) * 100
# >90% = high maturity, >98% = extreme maturity
Observed misses from word-overlap-only matching (2026-05-05):
- "UniBCI: Towards a Unified Pretrained Model for Invasive BCI" → missed
unibci-invasive-foundation-model (acronym mismatch)
- "Geometric analysis of attractor boundaries in kernel Hopfield networks" → missed
kernel-hopfield-associative-memory (word order differs)
- "Attractor FCM" → missed
attractor-fcm-gradient-descent (too short for 2-word overlap)
elif best_overlap >= 2:
# Verify with manual substring check
covered = any(kw in paper['title'].lower() for kw in matched_skill.replace('-', ' ').split() if len(kw) > 3)
coverage_rate = already_covered / len(papers) * 100>90% = high maturity, >95% = extreme maturity, >98% = near-saturation
- Value-Based Prioritization — For uncovered papers, implement scoring:
value_factors = []
if 'brain' in paper['title'].lower(): value_factors.append("Brain focus")
if 'spiking' in paper['abstract'].lower(): value_factors.append("Neural dynamics")
if 'digital twin' in paper['title'].lower(): value_factors.append("Digital twins")
score = len(value_factors) * 10
# Bonus for interdisciplinary/high-impact topics
if 'digital twin' in paper['title'].lower(): score += 30
if 'active inference' in paper['abstract'].lower(): score += 25
# Priority: HIGH (>=50), MEDIUM (30-49), LOW (<30)
- Select top 8-12 papers based on priority score and coverage analysis
Step 3: Extract Paper Content
For each selected paper:
- Use
web_extract with the arXiv abstract page (https://arxiv.org/abs/XXXX.XXXXX)
- Also try the PDF if abstract is insufficient:
https://arxiv.org/pdf/XXXX.XXXXX
- Extract: title, authors, key methodology, core contribution, practical applications
Step 4: Check for Existing Skills
Before creating, check if a skill already exists:
- Search
~/.hermes/skills/ai_collection/ for similar topics
- Use
skills_list to check registered skills
- Skip papers that map to existing skills (note them in the report)
Step 5: Create Hermes Skills
Decide skill placement before creating:
- ai_collection domain: Neuroscience, SNN, brain networks, computational neuroscience →
~/.hermes/skills/ai_collection/<skill-name>/
- Standalone domain: Quantum computing, control systems, systems engineering, or other distinct fields →
~/.hermes/skills/<skill-name>/ (top-level)
Step 5: Create Hermes Skills
PREFERRED: skill_manage(action="create") — auto-creates directories, validates structure.
ALTERNATIVE: write_file directly at /Users/hiyenwong/.openclaw/workspace/ai_collection/<skill-name>/SKILL.md — reliable, direct. The ai_collection is at .openclaw/workspace/ai_collection/, NOT ~/.hermes/skills/ai_collection/.
ALTERNATIVE: delegate_task — works for parallel skill creation when multiple skills needed simultaneously (confirmed working 2026-05-05). Provide the target skill path and full SKILL.md content in the task context.
For each new skill, create a SKILL.md with this structure:
YAML frontmatter MUST include description:
---
name: skill-name
description: "Short description of what the skill does."
version: 1.0.0
---
Paper-based skills MUST include **arXiv ID:** format (not **arXiv:**):
**arXiv ID:** 2604.20209 | **Code:** https://github.com/...
Paper-based skills MUST have ## Abstract and ## Key Contributions sections
No line exceeding 120 characters — break long lines
Location: ai_collection/collection/skills/<skill-name>/SKILL.md (note: collection/skills/ not just skills/)
- The root
skills/ directory exists but the validator checks collection/skills/
- After creating in
skills/, copy to collection/skills/ for validation
For each new skill, create a SKILL.md with this structure:
---
name: skill-name
description: "Short description of the methodology. Activation triggers: keyword1, keyword2, keyword3."
---
# Skill Title
> One-line summary of the paper's contribution and methodology.
## Metadata
- **Source**: arXiv:XXXX.XXXXX
- **Authors**: Author names
- **Published**: YYYY-MM-DD
## Core Methodology
### Key Innovation
Description of what's novel.
### Technical Framework
Step-by-step technical description.
## Implementation Guide
### Prerequisites
- Required tools/libraries
### Step-by-Step
1. Concrete implementation steps
### Code Example
\`\`\`python
# Minimal working example
\`\`\`
## Applications
- Use case 1
- Use case 2
## Pitfalls
- Known limitations
## Related Skills
- related-skill-1
- related-skill-2
Naming convention: Use lowercase, hyphenated names: topic-method-detail
Location: ~/.hermes/skills/ai_collection/<skill-name>/SKILL.md
Step 6: Update Obsidian Wiki
Vault paths to check (in priority order):
/Users/hiyenwong/obsidian_notes/neuroscience/ — neuroscience weekly reports (Chinese format)
OBSIDIAN_VAULT_PATH env var
/Users/hiyenwong/Documents/Obsidian Vault — default fallback
/Users/hiyenwong/Workspace/obsidian/ — alternative workspace
Weekly Chinese Report Format (established pattern at /Users/hiyenwong/obsidian_notes/neuroscience/神经科学研究周报-YYYY-MM-DD.md):
- YAML frontmatter:
date, type: weekly-report, area: neuroscience, source: arxiv
- Sections: 概览 (overview with stats), 精选论文 (detailed paper analysis, 6-7 papers), 其他值得关注论文 (3-4 shorter summaries), 本周技能更新汇总 (table), 趋势观察 (6 numbered trends)
- Each paper entry: arXiv ID, date, category, authors, 研究问题, 核心贡献, 关键发现/方法学, 对应技能
- Language: Chinese for report content, English for technical terms, code, and equations
Quantum Computing Research/Quantum Computing Index.md — domain index
Skills/Quantum/<skill-name>.md — domain-specific skill notes
Research Logs/Quantum Computing Research - YYYY-MM-DD.md — daily logs
This keeps the vault organized by research domain. The ai_collection folder remains neuroscience-focused.
Vault path: Check OBSIDIAN_VAULT_PATH env var. Also check these common locations in order: /Users/hiyenwong/obsidian_notes/ (actual vault, 2026-05 confirmed), /Users/hiyenwong/obsidian-vault/, /Users/hiyenwong/Workspace/obsidian/, /Users/hiyenwong/ai_github/obsidian_wiki/, then default /Users/hiyenwong/Documents/Obsidian Vault. Verify by checking for .obsidian/ directory inside.
Use execute_code with Python for vault file operations — cleaner string handling than terminal commands.
6a: Create Daily Research Note
- Path:
ai_collection/neuroscience-research-YYYY-MM-DD[-session].md
- Content: Date, scan summary, paper list with links, key findings, trends
- Use
-late or -morning suffix if multiple sessions per day
- Include coverage analysis: Papers scanned, recent papers count, coverage rate, new skills created, covered papers list, research trends
6b: Create Individual Skill Notes
- Path:
ai_collection/<skill-name>.md
- Content: Skill metadata, methodology summary, links to arXiv and SKILL.md
- Structure: Include YAML frontmatter with tags, source arXiv link, core methodology summary, applications list, implementation link, and related skills wikilinks
- Purpose: Quick reference notes that link to full skill implementation and daily research notes
Example Skill Note Structure:
---
tags: [brain-digital-twins, execution-semantics, arxiv-XXXX.XXXXX]
---
# Skill Title
> One-line summary
## Source
- **arXiv**: [XXXX.XXXXX](https://arxiv.org/abs/XXXX.XXXXX)
- **Published**: YYYY-MM-DD
## Core Methodology
Brief description...
## Applications
- App 1
- App 2
## Implementation
See full guide in: `~/.hermes/skills/ai_collection/<skill-name>/SKILL.md`
## Related
- [[related-skill-1]]
- [[Neuroscience Research - YYYY-MM-DD - Cron Job Update]]
6c: Update INDEX.md
- Increment total skill count
- Update timestamp
- Add new entries to the skills list
6d: Update Neuroscience Research MOC
- Add session row to the session history table
- Add new papers to relevant thematic sections
- Create new thematic sections if needed (e.g., "Neuromorphic Hardware & Devices")
- Update trend analysis
MOC Update Pattern (3 separate patches required):
- Daily table row: Insert
| [[daily-note-name|YYYY-MM-DD]] | N | N | themes | into the Research Sessions table (NOT the Research Statistics table). The MOC has TWO tables — the Statistics table (lines ~10-17) has a different column structure. The Sessions table has columns | Date | Papers | New Skills | Key Themes |. Find the |------|--------|------------|------------| separator and insert the new row immediately after it.
- Thematic section: Add bullet entry under the matching
### Theme Name section with wikilink to daily note
- Latest Skills section: Add
#### skill-name header + summary entry at the end of the file
MOC structure (800+ line file as of 2026-05, ~56KB):
- Lines 1-5: Frontmatter
- Lines 7-17: Title + Research Statistics table (2-column: Metric | Count)
- Lines 19-43: Research Sessions table (4-column: Date | Papers | New Skills | Key Themes)
- Lines 45-800+: Research Themes sections by topic
- Final section: Latest Skills
CRITICAL: Do NOT insert daily rows into the Statistics table (2-column) — it will corrupt the MOC layout. Always target the Sessions table (4-column with | Date | Papers | New Skills | Key Themes | header).
Support Files
- references/arxiv-browser-parsing-patterns.md — Confirmed parsing patterns for arXiv browser_snapshot output on category and search pages (updated 2026-05-06)
Key Learnings (from production runs)
ai_collection CI Validation (2026-05-04)
The CI pipeline (validate.yml) enforces strict validation on new skills. See references/ai-collection-ci-validation.md for full details. Key requirements:
description in YAML frontmatter (required, causes failure if missing)
**arXiv ID:** format in body (not **arXiv:**)
## Abstract and ## Key Contributions sections for paper skills
- Line length < 120 characters
- File must be in
collection/skills/ (not root skills/)
Note: CI has pre-existing lint failures in older Python scripts — new markdown-only skills don't cause these. If CI fails on Lint Python Scripts, it's likely a pre-existing issue, not your change.
Tool Selection
Tool Selection
- write_file for skill creation at
~/.hermes/skills/<skill-name>/SKILL.md — reliable, direct
- execute_code for Obsidian vault manipulation — Python's string operations handle markdown cleanly
- terminal for file discovery, reading existing content, and git operations
- web_search for initial paper discovery — NOTE: Increasingly returns empty results for academic queries (e.g., "arxiv neuroscience brain network" returned 0 results on 2026-05-04). Still worth trying as first-pass, but do NOT rely on it. Browser category page scraping (
/list/{category}/recent) remains the most reliable discovery method
- web_extract for arXiv content — NOTE: Returns "Blocked: URL targets a private or internal network" for many arXiv URLs (new failure mode observed 2026-05). Also returns empty content for
/abs/ URLs. When web_extract fails, fall back to browser navigation
- browser_navigate + browser_snapshot for arXiv scraping —
browser_snapshot(full=True) is the ONLY reliable method for arXiv content. Returns structured text with arXiv IDs, titles, authors, and subjects. JS extraction via browser_console is UNRELIABLE on both category pages AND search result pages (confirmed 2026-05-06) — do NOT use it. Parallel browser_navigate: Launch for multiple category pages (q-bio.NC + cs.NE) simultaneously before snapshotting — both load concurrently, cutting discovery time in half.
- Parallel browser_navigate: Launch
browser_navigate for multiple category pages (e.g., q-bio.NC + cs.NE) simultaneously before snapshotting — both pages load concurrently, cutting discovery time in half
- cp -r with mkdir -p for syncing skills to ai_collection — cp -r silently fails on some directories; always
mkdir -p target first
- See
references/arxiv-access-failure-modes.md for comprehensive list of all documented arXiv access failure modes (429, Blocked, 400 Bad Request, empty httpx responses)
Common Pitfalls
- delegate_task for skill creation: Does NOT work reliably — use
skill_manage(action="create") (preferred, auto-creates directories) or write_file directly
- arXiv rate limits: Worsened significantly (2026-04+). Minimum 15-second delay between sequential API queries is required — 5-second delays produce consistent 429 errors. For cron/bulk scans: use
time.sleep(15) between queries. If using Python httpx in execute_code, add 15s delay AND timeout=30. If rate-limited, switch to browser-based scraping (see Step 1 browser method). Some query patterns may permanently fail during high-traffic periods — implement 3 retries with 30s backoff, then fall back to broader queries or browser navigation.. 2026-05 update: All 5 queries in a single batch can hit 429 simultaneously. Use wait = 4 * (attempt + 1) (4s, 8s, 12s) between retries. When ALL queries are rate-limited, wait 60+ seconds before retrying the entire batch.
- web_extract "Blocked" error:
web_extract consistently returns "Blocked: URL targets a private or internal network" for arXiv URLs since 2026-05. This is a new failure mode beyond rate limits. When this happens, use browser_navigate + browser_snapshot + browser_console (JS extraction) instead — this is the most reliable method for arXiv content
httpx in execute_code returns empty responses INTERMITTENTLY: httpx.get() against arXiv API from within execute_code sandbox sometimes returns 0-byte responses (no error, just empty) — but it ALSO works reliably on many sessions (2026-05-05: full data for 11 papers). Always try httpx first (fastest when it works), but have web_search → terminal + curl + HTTPS fallback ready. If httpx response length < 100, immediately switch to fallback.
- curl requires HTTPS for arXiv API: Terminal
curl to http://export.arxiv.org/api/query triggers security scan approval prompt. Always use https://export.arxiv.org/api/query to avoid interactive approval blocking cron jobs.
- arXiv search URL 400 errors: The
/search/?query=... endpoint frequently returns "400 Bad Request" for complex multi-term queries. Category listing pages (/list/{category}/recent) are always more reliable — use them as the primary discovery method. Only use search pages for targeted keyword exploration when category pages don't surface relevant papers.
- Deduplication: Papers appear in multiple keyword searches; dedupe by arXiv ID
- execute_code state persistence: State does NOT persist between
execute_code calls. Save intermediate data to /tmp/ files (e.g., papers_data.json, paper_details.json) and reload in subsequent calls. Without this, accumulated search results will be lost between steps.
- Vault path: Always check env var first; don't hardcode
- Session naming: Use time-of-day suffix when running multiple sessions per day
- Existing skills: Always check before creating — some papers were already covered. Use
ls ~/.hermes/skills/ai_collection/ and normalize names for coverage detection
- INDEX.md corruption: INDEX.md can silently corrupt during writes — skill count can drift by 200+ from actual (observed: INDEX.md said 477, actual was 697). Always verify count with Python before reporting. See
references/index-rebuild-utility.py for automated rebuild script.
read_file unreliability: Hermes read_file returns double-numbered lines ( 1| 1|content) — unreliable for parsing. Use Python open() directly for file content manipulation
- Cron execution pattern: When running as scheduled job, use
execute_code with Python (not terminal+curl) for better reliability. Save state to /tmp/ between steps. Handle partial failures gracefully — if some queries fail, continue with successful ones.
- MOC patching requires 3 separate operations: (1) Daily table row insertion, (2) Thematic section bullet addition, (3) Latest Skills section header+summary append. Each requires reading current content and precise positioning.
- Mature collection adaptation: When >90% papers have existing skills (typical after 90+ skills), expand keyword scope or add new domains rather than expecting many new skills per session.
- Date filtering: Papers returned may have dates in the future relative to system time. Use flexible date ranges (30 days) and sort by published date to get truly recent papers.
- Empty search results: If queries return 0 papers in target date range, expand search to all recent papers regardless of date and filter post-hoc.
- Standalone neuroscience skills fully synced (2026-05-05): All neuroscience standalone skills have been synced to ai_collection (0 remaining). Earlier notes about "~130 pending neuroscience skills" are obsolete. The 142 remaining standalone skills are non-neuroscience (devops, quantum, control systems, web dev, etc.).
- Leverage cached search results: Previous cron runs may have saved papers to
/tmp/ files (e.g., /tmp/arxiv_papers.json, /tmp/neuro_papers_v3.json). If arXiv API is rate-limited or failing, scan /tmp/*.json for existing paper data before attempting new queries — this can save significant time and avoid API blocks.
- Coverage detection via title normalization: When checking if papers are already covered, normalize both paper titles AND skill names by removing punctuation, lowercasing, and splitting into word sets. Check for intersection of 2+ common words between title and skill name for robust matching across naming conventions. CRITICAL FIX (2026-05-06): At 700+ skills, word-overlap alone returns FALSE 0% coverage because paper titles use natural language while skill names use abbreviated hyphenated identifiers. MUST implement a second tier: regex keyword mapping (paper title patterns → skill names) to catch these mismatches. Without Tier 2, coverage check reports 0% even when 100% of papers are covered. CAUTION at 700+ skills: Word-overlap matching produces false positives (e.g., ShiftLIF paper matched to
neuron-photonic-spiking-laser because both share 'spiking' + 'neural' keywords). Always do a second pass with exact keyword matching (e.g., shiftlif in skill name → shiftlif-power-of-two-quantization). Priority order: (1) exact arXiv ID match in existing skill, (2) exact keyword match (unique term from title present in skill name), (3) word-overlap matching.
- Paper scoring for selection: Implement relevance scoring based on keyword frequency weighted by importance. Example scoring for neuroscience:
keywords = {'spiking neural network': 5, 'brain network': 4, 'neural dynamics': 4}
score = sum(text.count(kw) * weight for kw, weight in keywords.items())
This helps prioritize high-value papers when collection is mature.
- Standalone-to-ai_collection sync: Skills may exist as standalone directories in
~/.hermes/skills/ but not yet in ai_collection/. Check both locations. Use shutil.copytree() to sync. The INDEX.md entry may reference a standalone skill that hasn't been copied to ai_collection yet.
- Standalone duplicate detection pattern: When standalone skills have names very similar to existing ai_collection skills (e.g.,
fc-guided-band-selection-bci vs fc-guided-band-selection-mi-bci, or saliency-aware-eeg-decoding vs simon-saliency-neural-decoding), they are almost always near-identical duplicates covering the same paper. Check the first 3 lines of both SKILL.md files to confirm. If confirmed, skip the sync — no value in duplicating. At 714+ skills in ai_collection, most remaining standalone neuroscience skills are either duplicates or very tangential topics.
Dual-directory sync (ai-collection vs ai_collection): There are TWO parallel directories:
~/.hermes/skills/ai-collection/ (hyphen) — curated subset (~27 skills)
~/.hermes/skills/ai_collection/ (underscore) — full collection (700+ skills)
Skills created in one don't appear in the other. skill_manage(action='create') targets the MAIN skills dir only. Use shutil.copytree() for cross-directory sync. Check both directories when determining if a skill already exists.
skill_manage path limitations: skill_manage(action='create') creates skills in ~/.hermes/skills/ (main dir), NOT in ai_collection/. When creating skills for the ai_collection, use write_file to write directly to ~/.hermes/skills/ai_collection/<name>/SKILL.md.
- Skip evaluation criteria: At high coverage rates (85%+), not every uncovered paper warrants a skill. Skip papers that are: (a) too narrow/specific (e.g., single-dataset validation, specific neuroanatomy like hippocampal place cells or cerebellar motor learning), (b) conceptually overlapping with existing skills (e.g., new Hamiltonian method when energy-based/physics-guided skills exist), (c) review/perspective papers with no extractable methodology, (d) empirical/observational studies reporting neural correlates without computational methodology (e.g., "ACC-Insula connectivity correlates with anxiety severity" — reports findings but introduces no reusable algorithm, framework, or analytical method), (e) HCI/eye-tracking focused papers when the collection targets computational neuroscience methodology (e.g., confidence-based line assignment in reading gaze data), (f) non-neuroscience optimization/multi-agent papers (e.g., distributed black-box consensus optimization), (h) incremental robustness fixes to existing frameworks (e.g., HGF Lambert W function fix to avoid negative posterior precision - a bug fix, not a new methodology), (i) theoretical/conceptual papers without concrete methodology (e.g., AGI papers on measuring understanding that propose philosophical frameworks without extractable algorithms), (j) toy/demo environment papers — papers demonstrating methodologies in game-like or toy environments (e.g., Minecraft navigation, simple simulations) where the underlying methodology is already covered by existing skills. Document skip reasons in the daily research note.
Skip taxonomy (from 2026-05-05 session at 729 skills):
too_narrow: Application-specific with no generalizable method (Minecraft navigation)
incremental_fix: Bug fix or robustness patch to existing framework (HGF volatility fix)
review_paper: Literature review without new methodology (EEG/EMG neural regeneration review)
theoretical: Philosophical/conceptual without extractable algorithms (AGI understanding measurement)
too_generic: Insufficient abstract + generic title, likely covered (generic EEG/ML+neuro papers)
- Extreme maturity skip patterns (700+ skills): At this scale, the skip-to-create ratio approaches 1:1 or higher. In a 57-paper session, expect ~4-8 skippable papers among uncovered ones. Common skip categories: theoretical neurobiology without computational methodology (murburn-thermodynamic), HCI applications (gaze tracking), non-neuroscience optimization (distributed consensus), narrow neuroanatomy without generalizable methodology, and integration/benchmark papers where ablation shows simpler is better (MPCS: 11 mechanisms → removing 2 yields best Perf at 4.7x lower compute). When the collection reaches 700+ skills, the workflow should prioritize skip evaluation quality over creation volume. New skills at 700+ skills primarily come from mathematical formalism papers (e.g., RG theory, universal approximation theorems) applied to neuroscience rather than domain-specific methodology papers — these cross-domain formalism transfers are the remaining gap.
- Same-day category scan coverage: Scanning q-bio.NC or cs.NE category pages on the day of submission (or within 1-2 days) produces much lower coverage rates (
40-50%) compared to delayed scans (80-100%). This is expected — same-day scans catch papers before any previous session has filtered them. A low coverage rate on a same-day scan does NOT indicate collection regression; it indicates the scan is catching genuinely fresh papers.
- Large file timeouts (2026-05-05):
execute_code times out at 300s on large Obsidian files (>50KB, 800+ lines). read_file with limit/offset pagination is slow on large files. Solution: Use patch for targeted updates — read only the relevant section via read_file with small limit (10-30 lines), then patch. For statistics updates, read just the frontmatter and first 20 lines. Never load the entire MOC or INDEX.md in a single execute_code call.
- Browser timeout on arXiv search URL (2026-05-05):
browser_navigate to https://arxiv.org/search/?query=... can timeout at 60s. Solution: Prefer category listing pages (/list/{category}/recent) which are faster and more reliable. If search page is needed, reduce size=25 and retry once on timeout.
- Skip evaluation criteria: At high coverage rates (85%+), not every uncovered paper warrants a skill. Skip papers that are: (a) too narrow/specific (e.g., single-dataset validation), (b) conceptually overlapping with existing skills (e.g., new Hamiltonian method when energy-based/physics-guided skills exist), (c) review/perspective papers with no extractable methodology. Document skip reasons in the daily research note.
- cs.NE domain drift (2026-05 observed): cs.NE category increasingly publishes LLM-related papers (evolutionary optimization, jailbreak generation, explainability) rather than neuroscience-focused work. When scanning cs.NE, filter aggressively — only papers with SNN, neural dynamics, brain-inspired, or neuroscience keywords warrant analysis. Expect 30-50% of cs.NE papers to be non-neuroscience at scale. See
references/cs-ne-domain-drift.md for detailed analysis and filtering code.
- Standalone sync via SKILL.md keyword scanning: At 700+ skills, name-based matching alone misses standalone skills. Scan
~/.hermes/skills/<skill>/SKILL.md content for neuroscience-related keywords (neural, brain, spiking, eeg, fmri, synaptic, neuromorphic, oscillation, attractor, hebbian, plasticity, astrocyte, memristive) to find skills that should be synced to ai_collection. Name matching found 0 candidates; keyword scanning found 2 (equation-free-digital-twins, quantum-medical-ai).
- Coverage sweet spot at 700-800 skills: At this scale, coverage typically runs 80-95%. New skills still emerge from interdisciplinary boundaries (math.DS → neuroscience, cs.NE → computer vision, quantum → medical). The standalone sync pipeline (checking for neuroscience keywords in standalone SKILL.md files) becomes as valuable as new paper monitoring.
Cron Execution Output Format
When runnin
…(truncated)
1---2name: arxiv-to-skill-research-workflow3description: "Lightweight research workflow: search arXiv papers, select valuable ones, generate skills, sync to ai_collection, and update Obsidian wiki. No knowledge graph required. Use for: automated paper research, skill generation from academic papers, research note management, lightweight literature review. Keywords: arxiv research, paper to skill, research automation, skill generation, obsidian research notes, ai_collection sync."4metadata:5 source: https://skillmd.com/skills/hiyenwong/arxiv-to-skill-research-workflow6---78# arXiv to Skill Research Workflow910Lightweight end-to-end workflow for researching arXiv papers, extracting valuable insights, generating skills, and documenting findings in Obsidian.1112## Overview1314This workflow provides a streamlined alternative to knowledge graph-based research:15- No KG database setup required16- Direct arXiv API access17- Manual paper selection based on value criteria18- Direct skill creation from paper analysis19- Multi-format documentation (skills + Obsidian wiki)2021## Trigger Conditions2223- Scheduled cron job for neuroscience paper monitoring24- User requests arXiv paper research and skill creation25- Keywords: arxiv, paper search, skill generation, research automation, obsidian wiki update2627## Workflow Steps2829### Step 1: Search arXiv3031**PRIMARY METHOD: Browser-based extraction (Recommended for API rate limits)**3233When arXiv API returns HTTP 429 (rate limit) or fails, use browser navigation to access category listing pages directly:3435```python36from hermes_tools import browser_navigate, browser_click, browser_snapshot3738# Navigate to category recent submissions page39browser_navigate(url="https://arxiv.org/list/q-bio.NC/recent")4041# Get structured paper list from snapshot42snapshot = browser_snapshot(full=True)43# Parse entries from DescriptionList elements44# Each entry contains: arXiv ID, title, authors, subjects4546# Click specific paper for details47browser_navigate(url="https://arxiv.org/abs/XXXX.XXXXX")48detailed_snapshot = browser_snapshot(full=True)49# Extract abstract, metadata from full page50```5152**CRITICAL (2026-05-05)**: `browser_navigate` to arxiv.org URLs now fails with `net::ERR_CONNECTION_CLOSED`. arXiv.org direct navigation is unreliable. **Discovery strategy**: (1) `web_search` for Google-indexed arXiv links, (2) GitHub SNN-Daily-Arxiv (`https://github.com/SpikingChen/SNN-Daily-Arxiv/`) for SNN papers via table JS extraction, (3) Individual `browser_navigate` to `https://arxiv.org/abs/XXXX.XXXXX` for abstracts (single-paper pages work when category listings fail).5354**Category pages to use:**55- `https://arxiv.org/list/q-bio.NC/new` - Neurons and Cognition (shows FULL abstracts in snapshot — preferred over `/recent`)56**Category pages to use:**57- `https://arxiv.org/list/q-bio.NC/recent` - Neurons and Cognition58- `https://arxiv.org/list/cs.NE/recent` - Neural and Evolutionary Computing59- `https://arxiv.org/list/cs.LG/recent` - Machine Learning (broad)60- `https://arxiv.org/list/quant-ph/recent` - Quantum Physics61- `https://arxiv.org/list/stat.ML/recent` - Statistics ML (emerging methods)6263**WARNING**: Cross-category keyword search via `/search/?query=...` is broken (HTTP 400) as of 2026-05-05. Only use category listing pages.6465**IMPORTANT: `/new` vs `/recent`**: The `/new` pages show complete abstracts directly in the `browser_snapshot` text (as `<paragraph>` elements under each entry), while `/recent` pages only show titles/authors/subjects. Use `/new` for paper assessment without needing to navigate to individual `/abs/` pages.6667**Multiple sessions per day**: arXiv only updates once daily (new papers appear at ~14:00 ET / ~02:00 UTC). Running multiple cron sessions on the same calendar day yields diminishing returns — afternoon/evening sessions will find the same papers as morning sessions. Consider skipping evening sessions unless monitoring for rapid cross-lists or replacements.68**WARNING (2026-05-04)**: arXiv `/search/?query=...` URLs with multi-term queries (using `+` separators) now return HTTP 400 "Bad Request". The cross-category keyword search URL pattern is **broken**. Use category listing pages exclusively — they remain fully functional.6970**Advantage**: Pre-structured, chronological listings with direct links to PDF and HTML versions — more reliable than API when rate-limited.7172**CRITICAL (2026-05-03)**: arXiv `/search/?query=...` browser pages now return **400 Bad Request** even for simple queries. Combined with HTTP 429 rate limits on the API, browser-based search is ALSO unreliable. The ONLY reliable discovery method is direct category page browsing (`/list/{category}/recent`). Do NOT waste time on `/search/?query=...` pages or API queries — go straight to category listing pages.7374**CRITICAL (2026-05-05)**: arXiv search forms are BROKEN — `/search/?query=...` returns HTTP 400 Bad Request and `/search/advanced` returns "Whoops! Something went wrong" even with valid parameters. Do NOT waste time on arXiv search pages. **Only category listing pages work reliably**: `/list/{category}/recent` (e.g., `/list/q-bio.NC/recent`, `/list/cs.NE/recent`).7576**CRITICAL (2026-05-07)**: JS extraction on category listing pages (`/list/{category}/recent`) with dt/dd selectors returns **empty strings** for titles and authors — the `dd.childNodes[0].textContent` is empty in the DOM. Do NOT use JS extraction on category pages at all. Use `browser_snapshot(full=True)` which correctly captures all paper titles, IDs, authors, and subjects as structured text. JS extraction is ONLY reliable on `/search/?query=...` pages (li.arxiv-result elements), but even that can be intermittent — always verify results.7778**CRITICAL (2026-05-06)**: JS extraction on search result pages (`/search/?query=...`) is **INTERMITTENTLY UNRELIABLE**. The `li.arxiv-result` DOM sometimes produces incorrect titles or empty fields. When it works, the improved recipe below extracts IDs, titles, authors, AND abstracts — but fallback to `browser_snapshot(full=True)` if results look garbled. Category pages (`/list/{category}/recent`) remain the most reliable method.7980**Improved JS extraction recipe** (verified working 2026-05-06 on search result pages — use if snapshot parsing is insufficient):81```javascript82(() => {83 const results = document.querySelectorAll('li.arxiv-result');84 const papers = [];85 results.forEach(li => {86 const idEl = li.querySelector('a[href*="abs/"]');87 const id = idEl ? idEl.href.split('/').pop() : '';88 const allP = li.querySelectorAll('p');89 let title = '', authors = '', abstract = '';90 allP.forEach(p => {91 const t = p.textContent.trim().replace(/\s+/g, ' ');92 if (!t.startsWith('Authors:') && !t.startsWith('Submitted') && !t.startsWith('Abstract:') && !title) { title = t; }93 if (t.startsWith('Authors:')) { authors = t.replace('Authors:', '').trim().substring(0, 150); }94 if (t.startsWith('Abstract:')) { abstract = t.substring(9).trim().substring(0, 300); }95 });96 papers.push({ id, title, authors, abstract });97 });98 return JSON.stringify(papers);99})()100```101**NOTE**: This improved recipe extracts abstracts in addition to IDs/titles/authors, which is critical for coverage analysis. The older recipe only extracted titles/authors.102103**Search URL format**: Use `?query=term1+term2&start=0&order=-announced_date_first`. Avoid `searchtype=all` and `size=20` params — these cause 400 Bad Request errors.104105**FALLBACK METHOD: Python urllib** — Only if browser navigation fails (rare):106107**CRITICAL: Use `execute_code` with Python `urllib.request` — `web_extract` was historically unreliable for arXiv `/abs/` URLs but **now works reliably** (verified 2026-05-06). Use `web_extract` first; fall back to `urllib` only if it returns empty/blocked content.**108109```python110from hermes_tools import terminal111import urllib.request, urllib.parse, ssl, xml.etree.ElementTree as ET, json, time112113ctx = ssl.create_default_context()114ctx.check_hostname = False115ctx.verify_mode = ssl.CERT_NONE116117def search_arxiv(query, max_results=30):118 params = urllib.parse.urlencode({119 "search_query": query,120 "sortBy": "submittedDate",121 "sortOrder": "descending",122 "max_results": max_results123 })124 url = f"https://export.arxiv.org/api/query?{params}"125 req = urllib.request.Request(url)126 resp = urllib.request.urlopen(req, context=ctx, timeout=30)127 return resp.read().decode("utf-8")128```129130**IMPORTANT**: Use `urllib.parse.urlencode()` — manual URL construction with spaces causes "Malformed or illegal URL" errors. XML namespaces: `{"atom": "http://www.w3.org/2005/Atom", "arxiv": "http://arxiv.org/schemas/atom"}`.131132**Multiple keyword searches recommended** — run 2-3 queries with different term combinations:133- `all:"neuroscience" AND all:"brain network"`134- `all:"spiking neural network" AND all:"computational"`135- `all:"neural dynamics" AND all:"brain"`136137**Important**: Add `time.sleep(3)` between requests to respect arXiv API rate limits.138139### Step 1b: Pre-Flight Same-Day Dedup (CRITICAL 2026-05)140141**Before running the full workflow, check if today's papers were already scanned in an earlier cron session.** At 738+ skills with multiple daily cron runs, same-day paper batches are frequently rescanned, producing zero-new-skills sessions that waste resources.142143```python144import os, re145from datetime import datetime146147today = datetime.now().strftime("%Y-%m-%d")148vault = os.environ.get("OBSIDIAN_VAULT_PATH", "/Users/hiyenwong/Documents/Obsidian Vault")149ai_notes = os.path.join(vault, "ai_collection")150151# Find all today's research notes152today_notes = [f for f in os.listdir(ai_notes) if f.endswith('.md') and today in f.lower() and 'research' in f.lower()]153if today_notes:154 # Collect all arXiv IDs already documented today155 documented_ids = set()156 for note in today_notes:157 with open(os.path.join(ai_notes, note)) as fh:158 content = fh.read()159 ids = re.findall(r'26\d{2}\.\d{5}', content)160 documented_ids.update(ids)161 162 print(f"Existing same-day sessions: {len(today_notes)}")163 print(f"arXiv IDs already documented today: {len(documented_ids)}")164 165 # After scraping, compare:166 # new_ids = scraped_ids - documented_ids167 # if not new_ids:168 # print("[SILENT] — all papers already covered in earlier session")169 # # Skip the rest of the workflow170```171172**Decision rule**: If `len(new_ids) == 0` after comparing scraped papers against same-day notes, respond with `[SILENT]` and skip skill creation, Obsidian updates, and report generation entirely.173174### Step 2: Filter and Select Papers175176From the search results:1771. Deduplicate by arXiv ID (papers appear across multiple queries)1782. **Deduplicate against same-day session notes** (Step 1b above) — if all papers already documented today, output `[SILENT]` and stop1793. Cross-reference paper titles against existing skill directory names in `~/.hermes/skills/ai_collection/` — list directories, normalize names (lowercase, strip hyphens), check for substring matches. This catches papers already covered under different naming conventions.1803. Filter to target date range (e.g., papers from the last 24-48 hours)181### Coverage Analysis** — Calculate coverage metrics:182183**CRITICAL (2026-05-05)**: The word-overlap matching alone misses exact-match skills. Use a two-tier approach:184185```python186def normalize_for_matching(text):187 stop_words = {'the', 'a', 'an', 'and', 'or', 'but', 'in', 'on', 'at', 'to', 'for', 'of', 'with', 'by', 'using', 'based'}188 words = [w for w in text.lower().replace('-', ' ').replace('_', ' ').split() if w not in stop_words]189 return set(words)190191# TIER 1: Direct substring / acronym matching (highest priority)192# Check if paper title contains skill name tokens or vice versa193def direct_match(title, skill_name):194 title_lower = title.lower()195 skill_lower = skill_name.lower().replace('-', ' ').replace('_', ' ')196 # Check for key acronyms or exact phrases197 for token in skill_lower.split():198 if len(token) > 3 and token in title_lower:199 # Also check reverse: title key terms in skill name200 return True201 # Check for known acronyms (e.g., "UniBCI" in skill name "unibci-invasive-foundation-model")202 import re203 title_acronyms = re.findall(r'\b[A-Z]{2,}\b', title)204 for acronym in title_acronyms:205 if acronym.lower() in skill_lower:206 return True207 return False208209# TIER 2: Word overlap (for when direct match fails)210for paper in papers:211 title_words = normalize_for_matching(paper['title'])212 matched_skill = None213 214 # Try direct match first215 for skill in existing_skills:216 if direct_match(paper['title'], skill):217 matched_skill = skill218 break219 220 # Fall back to word overlap221 if not matched_skill:222 for skill in existing_skills:223 skill_words = normalize_for_matching(skill)224 # Weight key neuroscience terms higher225 key_terms = {'spiking','brain','neural','network','hopfield','attractor',226 'reservoir','free','energy','criticality','quantum','modality','bci'}227 common = title_words & skill_words228 key_matches = common & key_terms229 if len(key_matches) >= 2 or len(common) >= 3:230 matched_skill = skill231 break232233coverage_rate = already_covered / len(papers) * 100234# >90% = high maturity, >98% = extreme maturity235```236237**Observed misses from word-overlap-only matching** (2026-05-05):238- "UniBCI: Towards a Unified Pretrained Model for Invasive BCI" → missed `unibci-invasive-foundation-model` (acronym mismatch)239- "Geometric analysis of attractor boundaries in kernel Hopfield networks" → missed `kernel-hopfield-associative-memory` (word order differs)240- "Attractor FCM" → missed `attractor-fcm-gradient-descent` (too short for 2-word overlap)241 elif best_overlap >= 2:242 # Verify with manual substring check243 covered = any(kw in paper['title'].lower() for kw in matched_skill.replace('-', ' ').split() if len(kw) > 3)244 245 coverage_rate = already_covered / len(papers) * 100246 # >90% = high maturity, >95% = extreme maturity, >98% = near-saturation247 ```2485. **Value-Based Prioritization** — For uncovered papers, implement scoring:249 ```python250 value_factors = []251 if 'brain' in paper['title'].lower(): value_factors.append("Brain focus")252 if 'spiking' in paper['abstract'].lower(): value_factors.append("Neural dynamics")253 if 'digital twin' in paper['title'].lower(): value_factors.append("Digital twins")254 255 score = len(value_factors) * 10256 # Bonus for interdisciplinary/high-impact topics257 if 'digital twin' in paper['title'].lower(): score += 30258 if 'active inference' in paper['abstract'].lower(): score += 25259 260 # Priority: HIGH (>=50), MEDIUM (30-49), LOW (<30)261 ```2626. Select top 8-12 papers based on priority score and coverage analysis263264### Step 3: Extract Paper Content265266For each selected paper:2671. Use `web_extract` with the arXiv abstract page (`https://arxiv.org/abs/XXXX.XXXXX`)2682. Also try the PDF if abstract is insufficient: `https://arxiv.org/pdf/XXXX.XXXXX`2693. Extract: title, authors, key methodology, core contribution, practical applications270271### Step 4: Check for Existing Skills272273Before creating, check if a skill already exists:274- Search `~/.hermes/skills/ai_collection/` for similar topics275- Use `skills_list` to check registered skills276- Skip papers that map to existing skills (note them in the report)277278### Step 5: Create Hermes Skills279280**Decide skill placement** before creating:281- **ai_collection domain**: Neuroscience, SNN, brain networks, computational neuroscience → `~/.hermes/skills/ai_collection/<skill-name>/`282- **Standalone domain**: Quantum computing, control systems, systems engineering, or other distinct fields → `~/.hermes/skills/<skill-name>/` (top-level)283### Step 5: Create Hermes Skills284285**PREFERRED: `skill_manage(action="create")`** — auto-creates directories, validates structure.286**ALTERNATIVE: `write_file`** directly at `/Users/hiyenwong/.openclaw/workspace/ai_collection/<skill-name>/SKILL.md` — reliable, direct. The ai_collection is at `.openclaw/workspace/ai_collection/`, NOT `~/.hermes/skills/ai_collection/`.287**ALTERNATIVE: `delegate_task`** — works for parallel skill creation when multiple skills needed simultaneously (confirmed working 2026-05-05). Provide the target skill path and full SKILL.md content in the task context.288289For each new skill, create a SKILL.md with this structure:2902911. **YAML frontmatter MUST include `description`**:292 ```yaml293 ---294 name: skill-name295 description: "Short description of what the skill does."296 version: 1.0.0297 ---298 ```2993002. **Paper-based skills MUST include `**arXiv ID:**` format** (not `**arXiv:**`):301 ```markdown302 **arXiv ID:** 2604.20209 | **Code:** https://github.com/...303 ```3043053. **Paper-based skills MUST have `## Abstract` and `## Key Contributions` sections**3063074. **No line exceeding 120 characters** — break long lines3083095. **Location**: `ai_collection/collection/skills/<skill-name>/SKILL.md` (note: `collection/skills/` not just `skills/`)310 - The root `skills/` directory exists but the validator checks `collection/skills/`311 - After creating in `skills/`, copy to `collection/skills/` for validation312313For each new skill, create a SKILL.md with this structure:314315```markdown316---317name: skill-name318description: "Short description of the methodology. Activation triggers: keyword1, keyword2, keyword3."319---320321# Skill Title322323> One-line summary of the paper's contribution and methodology.324325## Metadata326- **Source**: arXiv:XXXX.XXXXX327- **Authors**: Author names328- **Published**: YYYY-MM-DD329330## Core Methodology331332### Key Innovation333Description of what's novel.334335### Technical Framework336Step-by-step technical description.337338## Implementation Guide339340### Prerequisites341- Required tools/libraries342343### Step-by-Step3441. Concrete implementation steps345346### Code Example347\`\`\`python348# Minimal working example349\`\`\`350351## Applications352- Use case 1353- Use case 2354355## Pitfalls356- Known limitations357358## Related Skills359- related-skill-1360- related-skill-2361```362363**Naming convention**: Use lowercase, hyphenated names: `topic-method-detail`364**Location**: `~/.hermes/skills/ai_collection/<skill-name>/SKILL.md`365366### Step 6: Update Obsidian Wiki367368**Vault paths to check** (in priority order):3691. `/Users/hiyenwong/obsidian_notes/neuroscience/` — neuroscience weekly reports (Chinese format)3702. `OBSIDIAN_VAULT_PATH` env var3713. `/Users/hiyenwong/Documents/Obsidian Vault` — default fallback3724. `/Users/hiyenwong/Workspace/obsidian/` — alternative workspace373374**Weekly Chinese Report Format** (established pattern at `/Users/hiyenwong/obsidian_notes/neuroscience/神经科学研究周报-YYYY-MM-DD.md`):375- YAML frontmatter: `date`, `type: weekly-report`, `area: neuroscience`, `source: arxiv`376- Sections: 概览 (overview with stats), 精选论文 (detailed paper analysis, 6-7 papers), 其他值得关注论文 (3-4 shorter summaries), 本周技能更新汇总 (table), 趋势观察 (6 numbered trends)377- Each paper entry: arXiv ID, date, category, authors, 研究问题, 核心贡献, 关键发现/方法学, 对应技能378- Language: Chinese for report content, English for technical terms, code, and equations379- `Quantum Computing Research/Quantum Computing Index.md` — domain index380- `Skills/Quantum/<skill-name>.md` — domain-specific skill notes381- `Research Logs/Quantum Computing Research - YYYY-MM-DD.md` — daily logs382383This keeps the vault organized by research domain. The ai_collection folder remains neuroscience-focused.384385**Vault path**: Check `OBSIDIAN_VAULT_PATH` env var. Also check these common locations in order: `/Users/hiyenwong/obsidian_notes/` (actual vault, 2026-05 confirmed), `/Users/hiyenwong/obsidian-vault/`, `/Users/hiyenwong/Workspace/obsidian/`, `/Users/hiyenwong/ai_github/obsidian_wiki/`, then default `/Users/hiyenwong/Documents/Obsidian Vault`. Verify by checking for `.obsidian/` directory inside.386387**Use `execute_code` with Python** for vault file operations — cleaner string handling than terminal commands.388389#### 6a: Create Daily Research Note390- Path: `ai_collection/neuroscience-research-YYYY-MM-DD[-session].md`391- Content: Date, scan summary, paper list with links, key findings, trends392- Use `-late` or `-morning` suffix if multiple sessions per day393- **Include coverage analysis**: Papers scanned, recent papers count, coverage rate, new skills created, covered papers list, research trends394395#### 6b: Create Individual Skill Notes396- Path: `ai_collection/<skill-name>.md`397- Content: Skill metadata, methodology summary, links to arXiv and SKILL.md398- **Structure**: Include YAML frontmatter with tags, source arXiv link, core methodology summary, applications list, implementation link, and related skills wikilinks399- **Purpose**: Quick reference notes that link to full skill implementation and daily research notes400401**Example Skill Note Structure**:402```markdown403---404tags: [brain-digital-twins, execution-semantics, arxiv-XXXX.XXXXX]405---406407# Skill Title408409> One-line summary410411## Source412- **arXiv**: [XXXX.XXXXX](https://arxiv.org/abs/XXXX.XXXXX)413- **Published**: YYYY-MM-DD414415## Core Methodology416Brief description...417418## Applications419- App 1420- App 2421422## Implementation423See full guide in: `~/.hermes/skills/ai_collection/<skill-name>/SKILL.md`424425## Related426- [[related-skill-1]]427- [[Neuroscience Research - YYYY-MM-DD - Cron Job Update]]428```429430#### 6c: Update INDEX.md431- Increment total skill count432- Update timestamp433- Add new entries to the skills list434435#### 6d: Update Neuroscience Research MOC436- Add session row to the session history table437- Add new papers to relevant thematic sections438- Create new thematic sections if needed (e.g., "Neuromorphic Hardware & Devices")439- Update trend analysis440441**MOC Update Pattern (3 separate patches required):**4421. Daily table row: Insert `| [[daily-note-name|YYYY-MM-DD]] | N | N | themes |` into the **Research Sessions** table (NOT the Research Statistics table). The MOC has TWO tables — the Statistics table (lines ~10-17) has a different column structure. The Sessions table has columns `| Date | Papers | New Skills | Key Themes |`. Find the `|------|--------|------------|------------|` separator and insert the new row immediately after it.4432. Thematic section: Add bullet entry under the matching `### Theme Name` section with wikilink to daily note4443. Latest Skills section: Add `#### skill-name` header + summary entry at the end of the file445446**MOC structure** (800+ line file as of 2026-05, ~56KB):447- Lines 1-5: Frontmatter448- Lines 7-17: Title + Research Statistics table (2-column: Metric | Count)449- Lines 19-43: Research Sessions table (4-column: Date | Papers | New Skills | Key Themes)450- Lines 45-800+: Research Themes sections by topic451- Final section: Latest Skills452453**CRITICAL**: Do NOT insert daily rows into the Statistics table (2-column) — it will corrupt the MOC layout. Always target the Sessions table (4-column with `| Date | Papers | New Skills | Key Themes |` header).454455## Support Files456457- **references/arxiv-browser-parsing-patterns.md** — Confirmed parsing patterns for arXiv browser_snapshot output on category and search pages (updated 2026-05-06)458459## Key Learnings (from production runs)460461### ai_collection CI Validation (2026-05-04)462The CI pipeline (`validate.yml`) enforces strict validation on new skills. See `references/ai-collection-ci-validation.md` for full details. Key requirements:463- `description` in YAML frontmatter (required, causes failure if missing)464- `**arXiv ID:**` format in body (not `**arXiv:**`)465- `## Abstract` and `## Key Contributions` sections for paper skills466- Line length < 120 characters467- File must be in `collection/skills/` (not root `skills/`)468469**Note**: CI has pre-existing lint failures in older Python scripts — new markdown-only skills don't cause these. If CI fails on `Lint Python Scripts`, it's likely a pre-existing issue, not your change.470471### Tool Selection472### Tool Selection473- **write_file** for skill creation at `~/.hermes/skills/<skill-name>/SKILL.md` — reliable, direct474- **execute_code** for Obsidian vault manipulation — Python's string operations handle markdown cleanly475- **terminal** for file discovery, reading existing content, and git operations476- **web_search** for initial paper discovery — NOTE: Increasingly returns empty results for academic queries (e.g., "arxiv neuroscience brain network" returned 0 results on 2026-05-04). Still worth trying as first-pass, but do NOT rely on it. Browser category page scraping (`/list/{category}/recent`) remains the most reliable discovery method477- **web_extract** for arXiv content — NOTE: Returns "Blocked: URL targets a private or internal network" for many arXiv URLs (new failure mode observed 2026-05). Also returns empty content for `/abs/` URLs. When web_extract fails, fall back to browser navigation478- **browser_navigate + browser_snapshot** for arXiv scraping — `browser_snapshot(full=True)` is the ONLY reliable method for arXiv content. Returns structured text with arXiv IDs, titles, authors, and subjects. JS extraction via `browser_console` is UNRELIABLE on both category pages AND search result pages (confirmed 2026-05-06) — do NOT use it. **Parallel browser_navigate**: Launch for multiple category pages (q-bio.NC + cs.NE) simultaneously before snapshotting — both load concurrently, cutting discovery time in half.479- **Parallel browser_navigate**: Launch `browser_navigate` for multiple category pages (e.g., q-bio.NC + cs.NE) simultaneously before snapshotting — both pages load concurrently, cutting discovery time in half480- **cp -r with mkdir -p** for syncing skills to ai_collection — cp -r silently fails on some directories; always `mkdir -p` target first481- See `references/arxiv-access-failure-modes.md` for comprehensive list of all documented arXiv access failure modes (429, Blocked, 400 Bad Request, empty httpx responses)482483### Common Pitfalls4841. **delegate_task for skill creation**: Does NOT work reliably — use `skill_manage(action="create")` (preferred, auto-creates directories) or `write_file` directly4852. **arXiv rate limits**: Worsened significantly (2026-04+). **Minimum 15-second delay** between sequential API queries is required — 5-second delays produce consistent 429 errors. For cron/bulk scans: use `time.sleep(15)` between queries. If using Python `httpx` in `execute_code`, add 15s delay AND `timeout=30`. If rate-limited, switch to browser-based scraping (see Step 1 browser method). Some query patterns may permanently fail during high-traffic periods — implement 3 retries with 30s backoff, then fall back to broader queries or browser navigation.. **2026-05 update**: All 5 queries in a single batch can hit 429 simultaneously. Use `wait = 4 * (attempt + 1)` (4s, 8s, 12s) between retries. When ALL queries are rate-limited, wait 60+ seconds before retrying the entire batch.4863. **web_extract "Blocked" error**: `web_extract` consistently returns "Blocked: URL targets a private or internal network" for arXiv URLs since 2026-05. This is a new failure mode beyond rate limits. When this happens, use `browser_navigate` + `browser_snapshot` + `browser_console` (JS extraction) instead — this is the most reliable method for arXiv content4874. **`httpx` in `execute_code` returns empty responses INTERMITTENTLY**: `httpx.get()` against arXiv API from within `execute_code` sandbox sometimes returns 0-byte responses (no error, just empty) — but it ALSO works reliably on many sessions (2026-05-05: full data for 11 papers). Always try `httpx` first (fastest when it works), but have `web_search` → `terminal` + `curl` + HTTPS fallback ready. If `httpx` response length < 100, immediately switch to fallback.4884. **curl requires HTTPS for arXiv API**: Terminal `curl` to `http://export.arxiv.org/api/query` triggers security scan approval prompt. Always use `https://export.arxiv.org/api/query` to avoid interactive approval blocking cron jobs.4893. **arXiv search URL 400 errors**: The `/search/?query=...` endpoint frequently returns "400 Bad Request" for complex multi-term queries. Category listing pages (`/list/{category}/recent`) are **always more reliable** — use them as the primary discovery method. Only use search pages for targeted keyword exploration when category pages don't surface relevant papers.4903. **Deduplication**: Papers appear in multiple keyword searches; dedupe by arXiv ID4914. **execute_code state persistence**: State does NOT persist between `execute_code` calls. Save intermediate data to `/tmp/` files (e.g., `papers_data.json`, `paper_details.json`) and reload in subsequent calls. Without this, accumulated search results will be lost between steps.4924. **Vault path**: Always check env var first; don't hardcode4935. **Session naming**: Use time-of-day suffix when running multiple sessions per day4946. **Existing skills**: Always check before creating — some papers were already covered. Use `ls ~/.hermes/skills/ai_collection/` and normalize names for coverage detection4957. **INDEX.md corruption**: INDEX.md can silently corrupt during writes — skill count can drift by 200+ from actual (observed: INDEX.md said 477, actual was 697). Always verify count with Python before reporting. See `references/index-rebuild-utility.py` for automated rebuild script.4968. **`read_file` unreliability**: Hermes `read_file` returns double-numbered lines (` 1| 1|content`) — unreliable for parsing. Use Python `open()` directly for file content manipulation4979. **Cron execution pattern**: When running as scheduled job, use `execute_code` with Python (not terminal+curl) for better reliability. Save state to `/tmp/` between steps. Handle partial failures gracefully — if some queries fail, continue with successful ones.49810. **MOC patching requires 3 separate operations**: (1) Daily table row insertion, (2) Thematic section bullet addition, (3) Latest Skills section header+summary append. Each requires reading current content and precise positioning.49911. **Mature collection adaptation**: When >90% papers have existing skills (typical after 90+ skills), expand keyword scope or add new domains rather than expecting many new skills per session.50012. **Date filtering**: Papers returned may have dates in the future relative to system time. Use flexible date ranges (30 days) and sort by published date to get truly recent papers.50113. **Empty search results**: If queries return 0 papers in target date range, expand search to all recent papers regardless of date and filter post-hoc.502- **Standalone neuroscience skills fully synced** (2026-05-05): All neuroscience standalone skills have been synced to ai_collection (0 remaining). Earlier notes about "~130 pending neuroscience skills" are obsolete. The 142 remaining standalone skills are non-neuroscience (devops, quantum, control systems, web dev, etc.).503- **Leverage cached search results**: Previous cron runs may have saved papers to `/tmp/` files (e.g., `/tmp/arxiv_papers.json`, `/tmp/neuro_papers_v3.json`). If arXiv API is rate-limited or failing, scan `/tmp/*.json` for existing paper data before attempting new queries — this can save significant time and avoid API blocks.50415. **Coverage detection via title normalization**: When checking if papers are already covered, normalize both paper titles AND skill names by removing punctuation, lowercasing, and splitting into word sets. Check for intersection of 2+ common words between title and skill name for robust matching across naming conventions. **CRITICAL FIX (2026-05-06)**: At 700+ skills, word-overlap alone returns FALSE 0% coverage because paper titles use natural language while skill names use abbreviated hyphenated identifiers. MUST implement a second tier: regex keyword mapping (paper title patterns → skill names) to catch these mismatches. Without Tier 2, coverage check reports 0% even when 100% of papers are covered. **CAUTION at 700+ skills**: Word-overlap matching produces false positives (e.g., ShiftLIF paper matched to `neuron-photonic-spiking-laser` because both share 'spiking' + 'neural' keywords). Always do a second pass with exact keyword matching (e.g., `shiftlif` in skill name → `shiftlif-power-of-two-quantization`). Priority order: (1) exact arXiv ID match in existing skill, (2) exact keyword match (unique term from title present in skill name), (3) word-overlap matching.50516. **Paper scoring for selection**: Implement relevance scoring based on keyword frequency weighted by importance. Example scoring for neuroscience:506 ```python507 keywords = {'spiking neural network': 5, 'brain network': 4, 'neural dynamics': 4}508 score = sum(text.count(kw) * weight for kw, weight in keywords.items())509 ```510 This helps prioritize high-value papers when collection is mature.51117. **Standalone-to-ai_collection sync**: Skills may exist as standalone directories in `~/.hermes/skills/` but not yet in `ai_collection/`. Check both locations. Use `shutil.copytree()` to sync. The INDEX.md entry may reference a standalone skill that hasn't been copied to ai_collection yet.51218. **Standalone duplicate detection pattern**: When standalone skills have names very similar to existing ai_collection skills (e.g., `fc-guided-band-selection-bci` vs `fc-guided-band-selection-mi-bci`, or `saliency-aware-eeg-decoding` vs `simon-saliency-neural-decoding`), they are almost always near-identical duplicates covering the same paper. Check the first 3 lines of both SKILL.md files to confirm. If confirmed, skip the sync — no value in duplicating. At 714+ skills in ai_collection, most remaining standalone neuroscience skills are either duplicates or very tangential topics.513514**Dual-directory sync (ai-collection vs ai_collection)**: There are TWO parallel directories:515- `~/.hermes/skills/ai-collection/` (hyphen) — curated subset (~27 skills)516- `~/.hermes/skills/ai_collection/` (underscore) — full collection (700+ skills)517Skills created in one don't appear in the other. `skill_manage(action='create')` targets the MAIN skills dir only. Use `shutil.copytree()` for cross-directory sync. Check both directories when determining if a skill already exists.51851918. **`skill_manage` path limitations**: `skill_manage(action='create')` creates skills in `~/.hermes/skills/` (main dir), NOT in `ai_collection/`. When creating skills for the ai_collection, use `write_file` to write directly to `~/.hermes/skills/ai_collection/<name>/SKILL.md`.52018. **Skip evaluation criteria**: At high coverage rates (85%+), not every uncovered paper warrants a skill. Skip papers that are: (a) too narrow/specific (e.g., single-dataset validation, specific neuroanatomy like hippocampal place cells or cerebellar motor learning), (b) conceptually overlapping with existing skills (e.g., new Hamiltonian method when energy-based/physics-guided skills exist), (c) review/perspective papers with no extractable methodology, **(d) empirical/observational studies reporting neural correlates without computational methodology** (e.g., "ACC-Insula connectivity correlates with anxiety severity" — reports findings but introduces no reusable algorithm, framework, or analytical method), **(e) HCI/eye-tracking focused papers when the collection targets computational neuroscience methodology** (e.g., confidence-based line assignment in reading gaze data), **(f) non-neuroscience optimization/multi-agent papers** (e.g., distributed black-box consensus optimization), **(h) incremental robustness fixes** to existing frameworks (e.g., HGF Lambert W function fix to avoid negative posterior precision - a bug fix, not a new methodology), **(i) theoretical/conceptual papers** without concrete methodology (e.g., AGI papers on measuring understanding that propose philosophical frameworks without extractable algorithms), **(j) toy/demo environment papers** — papers demonstrating methodologies in game-like or toy environments (e.g., Minecraft navigation, simple simulations) where the underlying methodology is already covered by existing skills. Document skip reasons in the daily research note.521522**Skip taxonomy** (from 2026-05-05 session at 729 skills):523- `too_narrow`: Application-specific with no generalizable method (Minecraft navigation)524- `incremental_fix`: Bug fix or robustness patch to existing framework (HGF volatility fix)525- `review_paper`: Literature review without new methodology (EEG/EMG neural regeneration review)526- `theoretical`: Philosophical/conceptual without extractable algorithms (AGI understanding measurement)527- `too_generic`: Insufficient abstract + generic title, likely covered (generic EEG/ML+neuro papers)52819. **Extreme maturity skip patterns** (700+ skills): At this scale, the skip-to-create ratio approaches 1:1 or higher. In a 57-paper session, expect ~4-8 skippable papers among uncovered ones. Common skip categories: theoretical neurobiology without computational methodology (murburn-thermodynamic), HCI applications (gaze tracking), non-neuroscience optimization (distributed consensus), narrow neuroanatomy without generalizable methodology, and **integration/benchmark papers where ablation shows simpler is better** (MPCS: 11 mechanisms → removing 2 yields best Perf at 4.7x lower compute). When the collection reaches 700+ skills, the workflow should prioritize skip evaluation quality over creation volume. **New skills at 700+ skills primarily come from mathematical formalism papers** (e.g., RG theory, universal approximation theorems) applied to neuroscience rather than domain-specific methodology papers — these cross-domain formalism transfers are the remaining gap.52919. **Same-day category scan coverage**: Scanning q-bio.NC or cs.NE category pages on the day of submission (or within 1-2 days) produces much lower coverage rates (~40-50%) compared to delayed scans (~80-100%). This is expected — same-day scans catch papers before any previous session has filtered them. A low coverage rate on a same-day scan does NOT indicate collection regression; it indicates the scan is catching genuinely fresh papers.53020. **Large file timeouts** (2026-05-05): `execute_code` times out at 300s on large Obsidian files (>50KB, 800+ lines). `read_file` with `limit`/`offset` pagination is slow on large files. **Solution**: Use `patch` for targeted updates — read only the relevant section via `read_file` with small `limit` (10-30 lines), then patch. For statistics updates, read just the frontmatter and first 20 lines. Never load the entire MOC or INDEX.md in a single `execute_code` call.53121. **Browser timeout on arXiv search URL** (2026-05-05): `browser_navigate` to `https://arxiv.org/search/?query=...` can timeout at 60s. **Solution**: Prefer category listing pages (`/list/{category}/recent`) which are faster and more reliable. If search page is needed, reduce `size=25` and retry once on timeout.53218. **Skip evaluation criteria**: At high coverage rates (85%+), not every uncovered paper warrants a skill. Skip papers that are: (a) too narrow/specific (e.g., single-dataset validation), (b) conceptually overlapping with existing skills (e.g., new Hamiltonian method when energy-based/physics-guided skills exist), (c) review/perspective papers with no extractable methodology. Document skip reasons in the daily research note.53319. **cs.NE domain drift** (2026-05 observed): cs.NE category increasingly publishes LLM-related papers (evolutionary optimization, jailbreak generation, explainability) rather than neuroscience-focused work. When scanning cs.NE, filter aggressively — only papers with SNN, neural dynamics, brain-inspired, or neuroscience keywords warrant analysis. Expect 30-50% of cs.NE papers to be non-neuroscience at scale. See `references/cs-ne-domain-drift.md` for detailed analysis and filtering code.53419. **Standalone sync via SKILL.md keyword scanning**: At 700+ skills, name-based matching alone misses standalone skills. Scan `~/.hermes/skills/<skill>/SKILL.md` content for neuroscience-related keywords (neural, brain, spiking, eeg, fmri, synaptic, neuromorphic, oscillation, attractor, hebbian, plasticity, astrocyte, memristive) to find skills that should be synced to ai_collection. Name matching found 0 candidates; keyword scanning found 2 (equation-free-digital-twins, quantum-medical-ai).53520. **Coverage sweet spot at 700-800 skills**: At this scale, coverage typically runs 80-95%. New skills still emerge from interdisciplinary boundaries (math.DS → neuroscience, cs.NE → computer vision, quantum → medical). The standalone sync pipeline (checking for neuroscience keywords in standalone SKILL.md files) becomes as valuable as new paper monitoring.536537### Cron Execution Output Format538539When runnin540541…(truncated)