Latex paper collab depth

From FOURTEEN1416/academic-agent-toolkit · View interactive version

Latex paper collab depth is an AI agent skill from the GitHub repository FOURTEEN1416/academic-agent-toolkit. Use an external CLI agent as a depth-analysis co-pilot for paper-from-zero. Primary role: claim tree compression and deep evidence analysis (depth over breadth). 只用于逐点深挖/论证收敛;方向发散与选题扩展场景改用 latex-paper-collab-breadth. Optional collaborator, skips when CLI absent.

How to use this skill

Skill file

<!--ACAT-ADAPTED: 资产补齐自 yunshenwuchuxun/latex-paper-skills@d0f106108cb0(collaborating-with-claude + _shared),正文未改。溯源见 references/UPSTREAM.md。2026-09-09 专项治理。2026-10-27 宿主叙事中性化(B′ 批遗留):宿主/产品叙事改写为「外部协作者 CLI(当前示例实现为 claude,可替换)」口径;功能逻辑与参数未动。-->

Collaborating with an External CLI (Depth Mode)

Use an external CLI collaborator as a depth-analysis collaborator for

paper-from-zero, or as a generic code collaborator in fallback mode.

(当前示例实现以 Anthropic claude CLI 为例;可按需替换为任意同类协作者 CLI。)

协作者定位:本技能把 claude CLI 当作外部评审桥协作者调用(可选增强),不预设执行环境;claude 不在 PATH 时跳过该协作者、由当前 Agent 自审降级,不阻断流程。

This skill provides a lightweight bridge script (scripts/claude_bridge.py)

that returns structured JSON and supports multi-turn sessions via SESSION_ID.

Shared rules: This skill inherits all shared rules from

../../_shared/collaboration-base.md (core rules, candidates-only

constraint, fallback code-collaboration mode, safety guardrails, and

collaboration state capsule format). Only collaborator-CLI-specific

additions (for the current claude example) are listed below.

<!--ACAT-GOVERNANCE: ../../_shared/collaboration-base.md 未随本仓库集成(资产缺口已登记于 latex-paper-collab-breadth/ASSET-GAP.md),共享基线文件缺失。降级执行口径:无共享基线时按本页要点执行——候选产出仅作输入不直写工件(Candidates-Only)、协作者不可用即跳过并由当前 Agent 自审降级、不生成/不覆写 ref.bib、协作输出须经验证后方可采纳。-->

When to Use

When NOT to Use

Collaborator CLI Rules (Current Example: `claude`)

Use --add-dir when the collaborator needs access to additional directories.

exclusive: choose one of --SESSION_ID, --continue, or --session-id.

(for the claude example: run claude and /login once if needed).

Model Selection

The claude CLI (current example) supports model aliases, so you can use --model sonnet / --model opus instead of hard-coding versioned model IDs.

Quick Start (shell-safe)

If your prompt contains Markdown backticks, use a heredoc; see references/shell-quoting.md.

PROMPT="$(cat <<'EOF'
Review src/auth.py around login() and propose fixes.
OUTPUT: Unified Diff Patch ONLY.
EOF
)"
python3 scripts/claude_bridge.py --cd "." --model sonnet --PROMPT "$PROMPT" --output-format stream-json

Output: JSON with success, SESSION_ID, agent_messages, and optional error / all_messages.

Multi-turn Sessions

# Start a session
PROMPT="$(cat <<'EOF'
Analyze the bug in foo(). Keep it short.
EOF
)"
python3 scripts/claude_bridge.py --cd "." --PROMPT "$PROMPT" --output-format stream-json

# Continue the same session
PROMPT="$(cat <<'EOF'
Now propose a minimal fix as Unified Diff Patch ONLY.
EOF
)"
python3 scripts/claude_bridge.py --cd "." --SESSION_ID "<SESSION_ID>" --PROMPT "$PROMPT" --output-format stream-json

Prompting Patterns (Paper Mode)

Use assets/prompt-template.md as a starter when crafting --PROMPT.

Paper-mode templates (top of the file):

Each template specifies its input sources, output artifact mappings, and constraints.

Verification

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.