pixiv-cli
AGENTS.md134 starsChanged 2 months agoMITView on GitHub
This repository provides the pixiv CLI, two MCP stdio servers, and the public Go packages sdk, sdk/pixiv, and sdk/fanbox. Read the relevant local skill below before its task. These are checked-in instructions, not dependencies on a contributor's personal configuration, CCS installation, or global skills. When the client cannot discover .agents/skills, open the linked SKILL.md directly. Read only the routes needed for the change. The separately distributed product skill teaches use of an installed binary; it is not a repository development…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository13 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- pixiv-cli-ciSkill
- pixiv-cli-code-commentingSkill
- pixiv-cli-commit-messageSkill
- pixiv-cli-developSkill
- pixiv-cli-docsSkill
- pixiv-cli-mcp-toolSkill
- pixiv-cli-nativeSkill
- pixiv-cli-prSkill
- pixiv-cli-release-notesSkill
- pixiv-cli-reviewSkill
- pixiv-cli-testSkill
- pixiv-cliSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Read the relevant local skill below before its task.
- Very specific: line 27
Keep cmd/pixiv thin. internal/cli/root.go assembles the command tree and production dependencies.
- Distinctive: line 30
Keep shared mechanisms in their existing owners: record, pagination, traversal, lifecycle, configuration, file persistence, and downloader.
- Very specific: line 32
Keep secrets out of logs, errors, fixtures, PRs, and artifacts.
- Very specific: line 41
Use the Go version in go.mod, gofmt, and existing tests/vet/hooks.
- Distinctive: line 44
Keep multi-step progress visible with the client's plan tool when available, otherwise a concise checklist.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
pixiv-cli Agent Contract
This repository provides the pixiv CLI, two MCP stdio servers, and the public Go packages sdk, sdk/pixiv, and sdk/fanbox.
Start here
Read the relevant local skill below before its task. These are checked-in instructions, not dependencies on a contributor's personal configuration, CCS installation, or global skills. When the client cannot discover .agents/skills, open the linked SKILL.md directly. Read only the routes needed for the change.
| Task | Local instructions |
| Implement, debug, refactor, or design Go changes | pixiv-cli-develop |
| Select tests, run Red/Green, or validate a change | pixiv-cli-test |
| Write or review code comments, API docs, or numbered stages | pixiv-cli-code-commenting |
| Add or change an MCP tool | pixiv-cli-mcp-tool |
| Change Rust, cgo, native libraries, or platform evidence | pixiv-cli-native |
| Edit documentation or either kind of skill | pixiv-cli-docs |
| Review code or assess a PR | pixiv-cli-review |
| Prepare, update, or verify a PR | pixiv-cli-pr |
| Diagnose checks or operate an authorized workflow run | pixiv-cli-ci |
| Prepare a release or recover a publisher | pixiv-cli-release-notes |
| Write a commit message from staged changes | pixiv-cli-commit-message |
The separately distributed product skill teaches use of an installed binary; it is not a repository development workflow. Keep maintenance skill names prefixed with pixiv-cli- and the product name pixiv-cli.
Non-negotiable boundaries
- Keep
cmd/pixivthin.internal/cli/root.goassembles the command tree and production dependencies; command owners live underinternal/cli/commands. Do not resurrect a global service locator or the removed bootstrap/resource graph. - CLI/MCP Pixiv and FANBOX operations use the public SDK and owner-local narrow ports, not protocol adapters. MCP tools belong to
internal/mcpserver/{pixiv,fanbox}/tools/<tool>; their stdio runtimes are started by CLI commands. - Reverse search is the explicit exception: only the CLI composition root may import
internal/services/reversesearch/assembly; command and MCP owners may use the top-levelinternal/services/reversesearchcontract, never its provider subpackages. - Keep shared mechanisms in their existing owners: record, pagination, traversal, lifecycle, configuration, file persistence, and downloader. Generic utilities must not acquire product protocol or account semantics. See architecture for detailed ownership.
- Preserve the App-only boundary. Content requires an authenticated local account or an eligible database-managed pool account; errors never select an anonymous Web path. Data commands do not accept
--uidor--refresh-token; the public SDK and MCP retain their own explicit credential contracts. - Keep secrets out of logs, errors, fixtures, PRs, and artifacts. Only an explicitly requested bare
auth export [UID]orauth export --allmay emit secret stdout; otherwise use the documented private-output/transfer path. The SQLite account store is secret-bearing; never inspect real credentials as a debugging shortcut. - Preserve clean CLI machine output and MCP JSON-RPC stdout. MCP runtime failures retain structured output with
isError=true. Report cancellation, transport, authentication, upstream, and persistence failures rather than success-shaped empty data. - Introduce limits, timeouts, retries, truncation, or fallbacks only for a verified requirement, platform constraint, established contract, or reproducible failure. Explain and test the trigger without silently discarding valid data.
Working agreement
- Identify the requested behavior and acceptance evidence before editing. Keep small changes small; clarify consequential unknowns for larger work. Reuse the issue, PR, or conversation for decisions rather than creating process files automatically.
- Inspect the branch and existing changes; preserve unrelated work and use an isolated worktree when none exists. Use only available tools, explicit working directories, and safely quoted inputs. Prefer available semantic navigation for symbols and callers; disclose when only targeted search/compiler checks are available.
- For features and behavior fixes, observe a relevant failing test before implementation, then Green and regression. Reuse or extend existing coverage before adding tests; a new function or file is not a test quota. Pure restructuring uses before/after characterization; obtain an explicit exception if an applicable Red requirement cannot be met. Ordinary comment/document edits need relevant document and tooling checks, not invented runtime tests; consumed directives or examples may require behavioral checks.
- Use the Go version in
go.mod,gofmt, and existing tests/vet/hooks. Follow the develop/test skills for language and ownership rules. Preserve native build requirements; a Linux fixture pass is not all-platform evidence. - Reuse standard-library, platform, and existing project capabilities. Obtain approval before adding dependencies or installing missing tools; explain necessity, alternatives, and material lockfile, license, security, or deployment effects.
- Explain network access and material side effects before execution. Real Pixiv/FANBOX calls, browser credential access, image uploads, and account writes require explicit scope and authorization; they are not routine offline verification.
- Keep multi-step progress visible with the client's plan tool when available, otherwise a concise checklist. Restore actual state on continuation. Delegate only bounded work with clear ownership; integrated verification remains the main agent's responsibility.
- Write
AGENTS.md, maintenance/product skills, their references, and UI metadata in English. Source comments may be English or Chinese: follow the local audience and commenting rules, not the language of this file. Keep public English/Simplified Chinese documentation behaviorally aligned and use the user's requested conversation language. - Review meaningful changes before handoff. Report the actual diff, exact checks and outcomes, remaining risks, and PR/worktree location. A local review is not a GitHub approval, and a pending or skipped check is not a pass.
- Creating a PR does not authorize merging it, moving tags, publishing, changing branch protection, or using production secrets. Release authorization is separate and version-specific.
Authoritative references
Development and test layout, CLI contract, MCP contract, and contributing explain the checked-in behavior. Workflow YAML, ci/platforms.json, and tool manifests own executable configuration. When prose and implementation disagree, verify the disputed behavior and update the affected contract; do not guess or rewrite unrelated history.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

