---
name: oscholar-idea-sync
description: Use when a user asks a local AI agent to inspect, create, upload to, contribute to, fork, discuss, follow, or star an Oscholar Idea repository through the Oscholar Ideas MCP tools.
---

# Oscholar Idea 同步

Use the connected `oscholar` MCP server's Idea tools. The server reads local files only under the directory configured by Oscholar CLI or `OSCHOLAR_WORKSPACE_ROOT` and sends them to the configured Oscholar API. Never ask the user to paste a token, password, or private file contents into chat. CLI installations expose read-only tools by default; if a requested write tool is unavailable, explain that the user must explicitly enable write access on their own machine. Do not try to bypass that setting.

## 上传本地文件

1. Identify the target Idea ID and call `get_idea`. If the ID is ambiguous, list Ideas and ask the user to choose. Inspect existing file paths, the current revision, and the 30-file limit.
2. Call `who_am_i` and compare its `userId` with the Idea `ownerId`: use `owner` only for a match; otherwise use `contribute`. List the local files the user actually selected and ask for the destination directory. Do not infer ownership from a title or directory name.
3. Show the exact mapping `localPath → repositoryPath` and the version message or contribution reason. Confirm before invoking any write tool. Preserve subdirectories when requested. Each file must be a supported PDF, PNG, JPG, WebP, TXT, MD, or CSV, at most 50 MB. Do not upload secrets, unrelated files, or copyrighted third-party PDFs without the user's direction and rights confirmation.
4. Call `upload_file` once per selected file. The server re-reads the current revision before each call. Do not parallelize writes to the same Idea; owner writes change the revision and a stale request fails. Stop on a conflict or authentication failure and report what succeeded. Never silently retry a write after an uncertain network failure, because the upload may already have completed.
5. Call `get_idea` to verify owner writes. For `contribute`, report the proposal IDs and explain that the owner must review before files appear in the repository.

## Other operations

- `put_text_file`: use for a small UTF-8 text result that the user wants stored as a repository file; confirm replacement if the path already exists.
- `create_idea`: confirm title and summary first; create an empty repository, then upload files.
- `fork_idea`: inspect source Ideas and show the exact selected `materialId` values from each source. Confirm the selection before creating the new Idea.
- `review_proposal`: only for a confirmed owner; show candidate, reason and current revision before accepting/rejecting.
- `get_chat`, `list_files`, `read_file`, `list_followed_updates`: read-only; use freely within the user's requested Idea scope.
- `comment_idea`, `set_follow`, `set_star`: obtain the user's intended text or target state before writing; report the result.

If MCP is unavailable, point to the Oscholar `/mcp` setup page for its Node.js 22+ CLI and connection check; existing manual environment-variable setup remains available there. Do not ask for credentials in chat, fabricate successful uploads, or bypass the website's permission checks. This skill covers Ideas only; it does not authorize submission, paper-reading, or posting tools that have not been released.
