overleaf-sync
Skill này làm gì
Skill này liên kết một thư mục bài báo cục bộ với một dự án Overleaf qua cầu Git của Overleaf. Dành cho tác giả viết trên Overleaf với đồng tác giả nhưng cũng chạy kiểm tra AI trên tệp của họ.
Khi nào nên dùng
- ✓Khi bạn muốn sửa trên Overleaf cùng đồng tác giả nhưng vẫn chạy kiểm tra cục bộ.
- ✓Khi một cộng tác viên thay đổi bài báo trên Overleaf và bạn muốn kéo các thay đổi đó về.
- ✓Khi bạn muốn đẩy bài báo cục bộ lên Overleaf để đồng tác giả chỉnh sửa.
Liên kết skill
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/overleaf-sync/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn thư mục bài báo cục bộ của mình được đồng bộ với dự án Overleaf, để đồng tác giả sửa ở đó và tôi chạy kiểm tra trên máy.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent thiết lập một bản sao cục bộ của dự án Overleaf và đồng bộ thay đổi theo cả hai chiều. Bạn tự nhập mã truy cập tại dòng nhắc lệnh, nên agent không bao giờ thấy nó.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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 |
Câu hỏi thường gặp
Tôi có cần gói Overleaf trả phí không?
Có. Skill nói cầu Git chính thức là tính năng Premium.
Agent có thấy mã truy cập của tôi không?
Không. Bạn dán nó một lần vào hộp nhắc thông tin xác thực, và chuỗi khóa của hệ điều hành lưu lại.
Bản sao cục bộ được đặt ở đâu?
Mặc định nó nằm trong thư mục paper-overleaf cạnh thư mục bài báo hiện có của bạn.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 18k
- Vị trí xếp hạng
- #10557
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
ablation-planner
18kGiúp agent của bạn lên kế hoạch thí nghiệm ablation cho một bài báo, chọn các thí nghiệm mà người phản biện có khả năng yêu cầu khi kết quả chính đã ổn.
alphaxiv
18kCho phép agent của bạn đọc nhanh một bài báo nghiên cứu bằng các bản tóm tắt AlphaXiv, với toàn văn hoặc mã LaTeX dự phòng, từ liên kết arXiv hoặc ID.
analyze-results
18kGiúp agent của bạn phân tích kết quả thí nghiệm học máy, so sánh các lần chạy với một baseline, và biến các con số thành phát hiện rõ ràng và bước tiếp theo.
arxiv
18kCho phép agent của bạn tìm bài báo trên arXiv, đọc chi tiết của chúng và lưu PDF vào thư viện của bạn theo một chủ đề nghiên cứu.
Skill tương tự
obsidian-vault-maintainer
394kGiúp agent của bạn giữ gọn kho ghi nhớ kiểu Obsidian, với liên kết wiki hoạt động tốt, thuộc tính nhất quán và các phần tự tạo an toàn.
wiki-maintainer
394kGiúp agent của bạn duy trì wiki bộ nhớ OpenClaw với các trang có thể lặp lại, khối được quản lý an toàn và kiểm tra mâu thuẫn hoặc thiếu sót.
obsidian
394kCho phép agent của bạn đọc, tìm, tạo và sửa ghi chú, công việc, liên kết và thuộc tính trong Obsidian bằng dòng lệnh Obsidian chính thức.