gleaner: Instructions file for Codex

AGENTS.md

gleaner AGENTS.md is an instructions file for Codex, OpenCode from liuqiaodongdong/gleaner. It costs 2,395 tokens per session, scanned A, original, MIT.

Repository instructions for Gleaner, a command-line tool that collects academic papers from sources such as CNKI, Elsevier, and international open-access collections. They describe how to configure the repository and which commands to use.

In plain words
What is it for?
Use them to check setup, prepare searches, log in where needed, collect papers, and review collection results and logs.
Why use it?
They help prevent collection jobs from starting without required credentials or access, and avoid using an older, less suitable interface.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: reads ~/.codex or $CODEX_HOME, but also the file is AGENTS.md. Also seen: mentions Codex.

This is liuqiaodongdong/gleaner's own configuration. It tells Codex and OpenCode how to work on gleaner itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gleaner configures →

Reuse

Borrowing it

Nothing to install: this file belongs to liuqiaodongdong/gleaner. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/liuqiaodongdong/gleaner/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/liuqiaodongdong/gleaner

Made for: Codex, OpenCode.

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 gleaner AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/liuqiaodongdong/gleaner/agents-md/github.svg)](https://agentmods.dev/instructions/liuqiaodongdong/gleaner/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/liuqiaodongdong/gleaner/agents-md"><img src="https://agentmods.dev/badge/instructions/liuqiaodongdong/gleaner/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gleaner AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/liuqiaodongdong/gleaner/agents-md"><img src="https://agentmods.dev/badge/instructions/liuqiaodongdong/gleaner/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,395 This file is loaded in full into every session.
When invoked 2,395 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02395 $0.02395
Opus 5 $0.01197 $0.01197
Sonnet 5 $0.00479 $0.00479
Haiku 4.5 $0.00239 $0.00239

Measured 5d ago against content hash 82c342c1cb9f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

gleaner AGENTS.md 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 5d 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.

AGENTS.md · 128 lines

How it starts

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

Agent 使用约定(Gleaner Skill + CLI)

你正在使用 gleaner 学术文献采集能力。入口是 Skill + gleaner_cli.py

装机(仓库 ↔ Skill,必须成对)

用户说「安装项目 / clone」或「安装 skill / 注册 skill / 安装这个 skill」时,没有 gleaner_cli.py 就必须先 clone。只拷 SKILL.md 不算装完

  1. 本机没有 gleaner_cli.py(安装 skill 也走这一步):
    git clone https://github.com/liuqiaodongdong/gleaner.gitpip install -r requirements.txt
  2. 在仓库根:python gleaner_cli.py install-skill
    会拷到 ~/.grok/skills/gleaner~/.cursor/skills/gleaner~/.codex/skills/gleaner,并写入 .gleaner_root
  3. 当前会话设 GLEANER_ROOT 为仓库绝对路径。
  4. status;知网无 cookie 则 Agent 自己login.py(脚本内超级鹰自动过滑块)。仅首次加 ACQ_ALLOW_COLD_LOGIN=1。不要只跑 login-hint,不要让用户手拖。

根目录与 Skill

说明
默认仓库根 GLEANER_ROOT;未设时用 gleaner_cli.py 所在仓库根或 CLI --root
环境变量 GLEANER_ROOT 指向本仓库根(含 gleaner_cli.py
用户 Skill 仓库 skill/gleaner/;用 install-skill 注册到 ~/.grok / ~/.cursor / ~/.codex
凭据 优先进程环境 / GLEANER_ROOT/.env;Elsevier 也可 acq/data/.elsevier_key
$env:GLEANER_ROOT = "<本仓库绝对路径>"
python "$env:GLEANER_ROOT\gleaner_cli.py" status
# 或
pwsh "$env:USERPROFILE\.grok\skills\gleaner\scripts\gleaner.ps1" status

首次 / 采集前:必须做部署引导

  1. 先跑 python gleaner_cli.py status(不要先假设用户已配好密钥)。
  2. 阅读返回的 lines.*.readyblockersnext_steps_for_user
  3. 若用户要用的线 ready=false
    • 用清晰清单展示给用户(申请网址、要填哪些环境变量、本地命令)。
    • 协助用户完成配置(写 GLEANER_ROOT/.env、写 acq/data/.elsevier_key)。
    • 知网必须先有 cookies.json:没有则 Agent 自己启动 login.py(有头 Edge,脚本内超级鹰自动过滑块并写盘)。禁止只打印 login-hint、禁止让用户手拖或复制 cookie。仅首次加 ACQ_ALLOW_COLD_LOGIN=1禁止无 cookie 就跑 cnki / cnki-list(冷启动下不了全文,只会空烧超级鹰)。
    • 不要在未就绪时强行跑 cnki / els / intl(CLI 会返回 setup_incomplete)。
  4. 用户表示已配置后,再跑一次 status 确认,再开始采集。

各线需要什么

线 CLI 子命令 硬门槛 推荐
CNKI 全文 cnki 机构代理 + 超级鹰 + cookies.json 首次 ACQ_ALLOW_COLD_LOGIN=1 录 cookie;之后热启动
CNKI 题录 cnki-list 机构代理 + cookies.json 同上,无 cookie 不准开浏览器
CNKI 分级建式 prepare 无(纯本地、不启浏览器) Agent 先做关键词拓展
Elsevier els 官方 ELSEVIER_API_KEYacq/data/.elsevier_key 见下方官方申请流程
国际 intl 公网(一般无需密钥) CARSI cookie 可选
注册 Skill install-skill 仓库内有 skill/gleaner/SKILL.md clone + pip 之后立刻跑
就绪检查 status 每次采集前
源摘要 sources 可选
超级鹰积分 score CJY_* 排障
登录提示 login-hint 首次装机必做;之后 cookie 过期再跑

Read the full file on GitHub · 128 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. 5d ago Changed · +14 lines · +451 tokens per session 82c342c1cb9f
  2. 8d ago First seen · 114 lines · 1,944 tokens per session scan A fc9b44927cff

Subscribe to this mod's changes

gleaner AGENTS.md is an instructions file published in the GitHub repository liuqiaodongdong/gleaner (3 stars, last pushed 8d ago), licensed MIT. It adds 2,395 tokens to every session, about $0.0120 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-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,737 tokens