setup

setup is a command for coding agents from LigphiDonk/Oh-my--paper. It costs 18 tokens per session (961 once invoked), scanned A, original, MIT.

A command that creates the initial folder structure for an Oh My Paper research project and checks whether the Codex plugin is ready. Oh My Paper is a research workflow harness for organizing stages such as literature review, idea generation, experiments, and paper writing.

In plain words
What is it for?
Use it when starting a research project and choosing whether to begin with a literature survey, new-idea generation, experiments, or publication work.
Why use it?
It removes the manual setup of project folders and helps identify whether the required Codex plugin is available before initialization.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the omp plugin — 9 commands, 5 agents, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ligphidonk/oh-my--paper/setup
Clone the repo
git clone --depth 1 https://github.com/LigphiDonk/Oh-my--paper

Or install omp, the plugin that ships this one along with the rest of its 9 commands, 5 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/ligphidonk/oh-my--paper/setup.svg)](https://agentmods.dev/commands/ligphidonk/oh-my--paper/setup)
Your own site
<a href="https://agentmods.dev/commands/ligphidonk/oh-my--paper/setup"><img src="https://agentmods.dev/badge/commands/ligphidonk/oh-my--paper/setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 961 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.00961
Opus 5 $0.00009 $0.00481
Sonnet 5 $0.00004 $0.00192
Haiku 4.5 $0.00002 $0.00096

Measured 4d ago against content hash 5372f9f6e657, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/oh-my-paper/commands/setup.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

必须使用 AskUserQuestion 工具进行所有确认步骤,不得用纯文字替代。

你正在为当前目录初始化 Oh My Paper 研究 harness。

第一步:检查 Codex 插件

先确认 Codex 插件已安装。如果 /codex:setup 命令可用,运行它:

node -e "process.exit(0)" 2>/dev/null && echo "Node.js OK"
which codex 2>/dev/null && codex --version 2>/dev/null || echo "Codex not found"

AskUserQuestion 告知状态:

环境检查

  • Node.js:[OK / 未安装]
  • Codex CLI:[版本 / 未安装]

Codex 插件用于执行子任务。如果未安装: /plugin install codex@openai-codex 然后 /reload-plugins

选项:

  • Codex 已就绪,继续初始化
  • 先去安装 Codex,稍后再运行 /omp:setup

第二步:询问研究信息

AskUserQuestion 收集项目基本信息:

请描述你的研究项目:

  • 研究主题是什么?(例:多模态医学影像分割)

然后再问:

从哪个阶段开始?

选项:

  • survey(文献调研)
  • ideation(创新点生成)
  • experiment(实验)
  • publication(论文写作)

第三步:创建目录结构

mkdir -p .pipeline/memory .pipeline/tasks .pipeline/docs .pipeline/.hook-events .claude/skills
cp -rn "${CLAUDE_PLUGIN_ROOT}/skills/." .claude/skills/

注册 SessionStart hook(让每次开启 Claude Code 时自动弹出角色选择):

node -e "
const fs = require('fs');
const path = require('path');
const f = path.join('.claude', 'settings.json');
const s = fs.existsSync(f) ? JSON.parse(fs.readFileSync(f,'utf8')) : {};
if (!s.hooks) s.hooks = {};
if (!s.hooks.SessionStart) s.hooks.SessionStart = [];
const cmd = 'node \"\${CLAUDE_PLUGIN_ROOT}/scripts/on-session-start.mjs\"';
const already = s.hooks.SessionStart.some(h =>
  Array.isArray(h.hooks) && h.hooks.some(hh => (hh.command||'').includes('on-session-start'))
);
if (!already) {
  s.hooks.SessionStart.push({ matcher: '', hooks: [{ type: 'command', command: cmd }] });
  fs.mkdirSync('.claude', { recursive: true });
  fs.writeFileSync(f, JSON.stringify(s, null, 2));
  console.log('hook registered');
} else { console.log('hook already registered'); }
"

第四步:写入初始文件

创建以下文件(已存在则跳过):

.pipeline/docs/research_brief.json

{
  "topic": "[用户填写的主题]",
  "goal": "",
  "currentStage": "[用户选择的阶段]",
  "successThreshold": "需要在此填写成功标准"
}

.pipeline/memory/project_truth.md

# Project Truth

## 研究主题
[主题]

## 已确认决策
(空,随项目推进逐步填充)

Read the full file on GitHub · 124 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 124 lines · 18 tokens per session scan A 5372f9f6e657

Subscribe to this mod's changes

setup is a command published in the GitHub repository LigphiDonk/Oh-my--paper (721 stars, last pushed 4mo ago), licensed MIT. It adds 18 tokens to every session and 961 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.