pixiv-cli AGENTS.md

pixiv-cli AGENTS.md is an instructions file for Codex, OpenCode from FlanChanXwO/pixiv-cli. It costs 1,666 tokens per session, scanned A, original, MIT.

Project instructions for a Go command-line tool and MCP server that work with Pixiv and FANBOX, including search, user data, rankings, downloads, and authentication-related tasks.

In plain words
What is it for?
Use them when modifying the Pixiv CLI, its FANBOX support, SDKs, MCP server, downloads, or related tests.
Why use it?
They give coding agents the project's structure, commands, testing rules, and boundaries so changes fit the existing code and do not invent unsupported interfaces.

Instructions file for CodexOpenCode

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 instructions/flanchanxwo/pixiv-cli/agents-md
Clone the repo
git clone --depth 1 https://github.com/FlanChanXwO/pixiv-cli

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 pixiv-cli AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/flanchanxwo/pixiv-cli/agents-md.svg)](https://agentmods.dev/instructions/flanchanxwo/pixiv-cli/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/flanchanxwo/pixiv-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/flanchanxwo/pixiv-cli/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,666 This file is loaded in full into every session.
When invoked 1,666 The same file — it is already loaded in full.
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.01666 $0.01666
Opus 5 $0.00833 $0.00833
Sonnet 5 $0.00333 $0.00333
Haiku 4.5 $0.00167 $0.00167

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

Security

Grade A, and why

pixiv-cli 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 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.

AGENTS.md · 57 lines

How it starts

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

AGENTS.md

这是一个 Go 版 Pixiv CLI 与 MCP stdio server。它通过 pixiv CLI 和 pixiv mcp 暴露 Pixiv 搜索、详情、排行、推荐、用户、收藏、下载、token refresh 和缩略图能力,通过 pixiv fanbox CLI 与 pixiv fanbox mcp 暴露 FANBOX 能力。公开能力只来自 sdksdk/pixivsdk/fanbox

核心命令

go test ./...
sh scripts/build.sh

真实 SDK e2e 默认跳过;需要本机凭据时显式运行(Pixiv 读本地 pixiv-cli.db 选中账号,FANBOX 读 macOS Keychain 授权 session):

PIXIV_SDK_E2E=1 go test ./e2e -run TestRealPixivSDKRead -count=1 -v
FANBOX_E2E_CREATOR_ID=<non-secret-creator-id> FANBOX_E2E_TAG=<non-secret-tag> \
FANBOX_E2E_POST_ID=<non-secret-post-id> FANBOX_E2E_POST_URL=<non-secret-post-url> \
FANBOX_SDK_E2E=1 go test ./e2e -run TestRealFanboxSDKRead -count=1 -v

FANBOX E2E target variables are explicit non-secret test targets; the session remains in the macOS Keychain.

TestRealFanboxSDKRead 是唯一可以记为「完整 FANBOX read」的测试,它强制要求 post 目标带 first-party file attachment。TestRealFanboxSDKPostInfo(额外需要 FANBOX_E2E_POST_ONLY=1)只覆盖 Post/body/ResolveURL,通过时记为 partial-pass,不得替代完整 read 的状态。

边界规则

各包职责描述见 docs/zh-CN/maintainers/architecture.md;以下是不可违反的规则:

  • cmd/pixiv 只委托 internal/cliinternal/cli/root.go 负责命令树、全局生命周期与生产组装,具体命令位于 internal/cli/commands 及其 Pixiv/FANBOX owner 子目录,不恢复旧 resource graph/requirements 层。
  • CLI/MCP 的 Pixiv/FANBOX 能力只经公开 sdk/pixivsdk/fanbox 及 owner-local 窄端口调用;不得直连 internal/services/{pixiv,fanbox} 协议适配包。
  • reverse-search is the only cross-boundary exception:生产组装仅允许 internal/cli/root.go 依赖 internal/services/reversesearch/assemblyinternal/cli/commandsinternal/mcpserver 只能依赖 internal/services/reversesearch 顶层契约,不得导入 internal/services/reversesearch/saucenaointernal/services/reversesearch/ascii2d 或其他其子包。provider 协议构造、HTTP client、凭据与代理只由 composition root/assembly 持有。
  • MCP 聚合与输入/输出适配在 internal/mcpserver/{pixiv,fanbox},具体 tool 位于各自 tools/<tool>;stdio runtime 由 CLI MCP 命令启动。
  • internal/shared/* 承载跨命令共享机制,internal/utils/{parse,text,uri} 保持协议无关;配置 schema/snapshot 在 internal/config/settings,本地路径和权限在 internal/config/paths,文件机制在 internal/storage/file/*
  • 测试文件遵循 docs/zh-CN/maintainers/development.md 测试文件布局的 same-stem、平台后缀和 same-package 例外规则;该节是唯一 canonical test-layout 规则。

Read the full file on GitHub · 57 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 · 57 lines · 1,666 tokens per session scan A 5532cb64fb55

Subscribe to this mod's changes

pixiv-cli AGENTS.md is an instructions file published in the GitHub repository FlanChanXwO/pixiv-cli (130 stars, last pushed yesterday), licensed MIT. It adds 1,666 tokens to every session, about $0.0083 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.