Skip to content

odinfree/storm-ecdsa-harness / skills/arxiv-portable-research

arxiv-portable-research

Verified

Mine arXiv papers, original LaTeX and citation trails for mechanisms that can transfer into a real implementation; maintain topic watches and source-bound experiment proposals. Use for arXiv research, paper monitoring or portable research gains.

FileKindSize
SKILL.mdskill md4.7 KB
references/providers.mdmarkdown3.6 KB
scripts/arxiv_tool.pyscript2.9 KB
scripts/poll_feed.pyscript3.7 KB

scripts/arxiv_tool.py

View on GitHub
#!/usr/bin/env python3
"""Call the pinned local arXiv MCP over stdio, including from older live sessions."""
import argparse
import asyncio
import json
import os
from pathlib import Path
import sys


def tool_failed(result):
    if result.get('isError'):
        return True
    for part in result.get('content', []):
        if part.get('type') != 'text':
            continue
        try:
            payload = json.loads(part.get('text', ''))
        except (TypeError, ValueError):
            continue
        if isinstance(payload, dict) and (payload.get('error') or payload.get('status') in ['error', 'failed', 'rate_limited']):
            return True
    return False


async def run(args):
    from mcp import ClientSession, StdioServerParameters
    from mcp.client.stdio import stdio_client
    root = Path.home() / '.local/share/arxiv-research'
    envdir = root / 'arxiv-mcp-0.8.2'
    command = envdir / ('Scripts/arxiv-mcp-server.exe' if os.name == 'nt' else 'bin/arxiv-mcp-server')
    if not command.is_file():
        raise RuntimeError(f'Missing pinned server: {command}')
    calls = json.loads(Path(args.calls).read_text(encoding='utf-8')) if args.calls else [{'tool': args.tool, 'arguments': json.loads(args.json)}]
    if not isinstance(calls, list) or not calls:
        raise ValueError('Expected a nonempty array of tool calls')
    params = StdioServerParameters(command=str(command), args=['--storage-path', str(root / 'arxiv-library/papers')])
    results = []
    async with stdio_client(params) as (reader, writer):
        async with ClientSession(reader, writer) as session:
            await session.initialize()
            for call in calls:
                name = call['tool']
                result = await asyncio.wait_for(session.list_tools() if name == 'list_tools' else session.call_tool(name, call.get('arguments', {})), timeout=args.timeout)
                results.append({'tool': name, 'result': result.model_dump(mode='json')})
    return results


def main():
    p = argparse.ArgumentParser(description=__doc__)
    p.add_argument('tool', nargs='?')
    p.add_argument('--json', default='{}')
    p.add_argument('--calls')
    p.add_argument('--out')
    p.add_argument('--timeout', type=int, default=120)
    args = p.parse_args()
    if not args.tool and not args.calls:
        p.error('Provide a tool name or --calls FILE')
    result = asyncio.run(run(args))
    data = json.dumps(result, ensure_ascii=False, indent=2) + '\n'
    if args.out:
        target = Path(args.out)
        target.parent.mkdir(parents=True, exist_ok=True)
        temp = target.with_suffix(target.suffix + '.tmp')
        temp.write_text(data, encoding='utf-8')
        temp.replace(target)
        print(json.dumps({'saved': str(target), 'tools': [x['tool'] for x in result], 'errors': sum(tool_failed(x['result']) for x in result)}))
    else:
        print(data)
    return int(any(tool_failed(x['result']) for x in result))


if __name__ == '__main__':
    sys.exit(main())
add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks.Stars: 115kUpdated Claude CodeCodexVerifiedInstall