overleaf-sync
它能做什么
这个技能通过 Overleaf 的 Git 桥接,将本地论文文件夹与 Overleaf 项目相连。适合与合作者在 Overleaf 中写作、同时又要对文件进行 AI 检查的作者。
适用场景
- ✓当你希望与合著者在 Overleaf 中编辑,同时仍进行本地检查的时候。
- ✓当合作者在 Overleaf 中修改了论文,你希望拉取这些修改的时候。
- ✓当你希望将本地论文推送到 Overleaf,让合著者可以编辑的时候。
技能链接
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/overleaf-sync/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我希望让本地论文文件夹与我的 Overleaf 项目同步,这样我的合著者可以在那里编辑,而我可以在本地进行检查。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体为 Overleaf 项目设置一份本地副本,并在两个方向上同步修改。你需要在终端提示时自行输入访问令牌,因此智能体不会看到它。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Overleaf Sync
Bridge a local paper directory with an Overleaf project so that:
- You can keep editing in the Overleaf web UI (or share editing access with collaborators)
- ARIS can read your changes, run audits (
/paper-claim-audit,/citation-audit,/auto-paper-improvement-loop), and push fixes back
This uses the official Overleaf Git bridge (Premium feature). The agent never sees your authentication token — you do the one-time auth manually so the token lives in macOS Keychain, not in chat history or .git/config.
When to Use This Skill
- You want to use Overleaf as the editing surface (better collaboration, shared with team) but still run ARIS pipelines locally
- You want to take an existing local ARIS paper and push it to Overleaf for a co-author to edit
- A collaborator made changes in Overleaf and you want to pull + diff them before continuing local work
Constants
- CLONE_DIR_DEFAULT =
paper-overleaf(sibling of existingpaper/, NOT insidepaper/) - CREDENTIAL_HELPER =
osxkeychain(macOS) /manager(Windows) /cache(Linux fallback) - TOKEN_HANDLING = NEVER write token to disk, env var, or chat. User pastes it once into the terminal credential prompt; the OS keychain stores it from then on.
Architecture
┌─────────────────┐ git pull/push ┌─────────────────┐
│ Local paper/ │ ◄─── rsync ──── ► │ paper-overleaf/ │ ◄──► Overleaf web
│ (ARIS audits) │ │ (git bridge) │ (collaborators)
└─────────────────┘ └─────────────────┘
The paper-overleaf/ directory is a git clone of the Overleaf project. The paper/ directory is the working copy where ARIS skills run. They are kept in sync via rsync.
Single-source-of-truth rule: at any given time, treat one of them as authoritative for active editing. Switch directions explicitly with pull or push, and run a status check before either to surface unexpected divergence.
Sub-commands
setup <project-id> — one-time
Sets up the bridge for a new Overleaf project. The user runs this in their own terminal, never through the agent. The skill ships with a hardened setup script that:
- Refuses to run unless stdin/stdout are a TTY (won't run inside an agent harness)
- Reads the token from a hidden prompt (no chat history, no shell history)
- Strips the token from the remote URL immediately after cloning
- Primes the OS keychain so subsequent agent operations are auth-free
- Auto-installs a
pre-commithook inpaper-overleaf/.git/hooks/that refuses to commit any blob containing the token patternolp_[A-Za-z0-9]{20,}— a hard technical block, not a behavioral rule
The agent's only role here is to print the user instruction:
Run this in your own terminal (NOT through me):
bash <ARIS_REPO>/tools/overleaf_setup.sh <project-id-or-url>
When it finishes, tell me "setup done" and I'll verify.
After the user reports "setup done", the agent verifies (token-free):
cd paper-overleaf
git remote -v # must show URL WITHOUT token
git config --get credential.helper
git fetch && git log --oneline -3 # must succeed without prompting
ls .git/hooks/pre-commit # must exist
bash <ARIS_REPO>/tools/overleaf_audit.sh . # must report "Audit clean"
If paper-overleaf/ exists but is empty (new Overleaf project), the agent then mirrors local paper/ into it (see push workflow).
pull — before each editing session
cd paper-overleaf && git pull --ff-only
# Show what changed since last pull
LAST=$(git rev-parse HEAD@{1})
git diff --stat $LAST..HEAD
git diff $LAST..HEAD -- 'sec/*.tex' # detailed view for prose changes
Diff protocol — DO NOT blindly merge into local paper/. Overleaf edits frequently include:
- Half-finished sentences (collaborator clicked save mid-thought)
- Typos that aren't in canonical references (
LrageforLarge) - Commented-out blocks that may be intentional or may be a stash
- Number changes that should re-trigger
/paper-claim-audit - Cite key changes that should re-trigger
/citation-audit
For each diff hunk, decide one of:
| Hunk character | Action |
|---|---|
| Clean editorial improvement | Sync into paper/, no audit needed |
| Numerical / claim change | Sync, then re-run /paper-claim-audit |
New \cite{...} |
Sync, then re-run `/citation-audi |
常见问题
我需要付费的 Overleaf 方案吗?
需要。技能说明官方 Git 桥接是 Premium 功能。
智能体能看到我的令牌吗?
看不到。你只需在凭据提示中粘贴一次,令牌由操作系统的钥匙串保存。
本地副本放在哪里?
默认放在你现有论文文件夹旁边的 paper-overleaf 文件夹中。
详情
作者的原始描述
Two-way sync between a local paper directory and an Overleaf project, so ARIS audit/edit workflows stay on the local copy while collaborators edit in the Overleaf web UI. Use when user says \"同步 overleaf\", \"overleaf sync\", \"推送到 overleaf\", \"connect overleaf\", \"Overleaf 桥接\", \"pull overleaf\", \"push overleaf\", or wants to bridge their ARIS paper directory with an Overleaf project.
热度
- GitHub 星标
- 18k
- 排名
- #10557
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
ablation-planner
18k帮你的智能体为论文规划消融实验,在主要结果看起来不错之后,选出审稿人很可能会要求的测试。
alphaxiv
18k让你的智能体借助 AlphaXiv 摘要快速阅读一篇研究论文,并以完整文本或 LaTeX 源文件作为备用,只需提供 arXiv 链接或编号。
analyze-results
18k帮你的智能体分析机器学习实验结果,将各次运行与基线进行比较,并把数字整理成清晰的发现和后续步骤。
arxiv
18k让你的智能体在 arXiv 上搜索学术论文、阅读论文详情,并把 PDF 保存到你的文库中,用于某个研究主题。