agentleFS
FlanChanXwOFlanChanXwO/pixiv-cli/AGENTS.md

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…

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
  1. Distinctive:

    Read the relevant local skill below before its task.

    line 7
  2. Very specific:

    Keep cmd/pixiv thin. internal/cli/root.go assembles the command tree and production dependencies.

    line 27
  3. Distinctive:

    Keep shared mechanisms in their existing owners: record, pagination, traversal, lifecycle, configuration, file persistence, and downloader.

    line 30
  4. Very specific:

    Keep secrets out of logs, errors, fixtures, PRs, and artifacts.

    line 32
  5. Very specific:

    Use the Go version in go.mod, gofmt, and existing tests/vet/hooks.

    line 41
  6. Distinctive:

    Keep multi-step progress visible with the client's plan tool when available, otherwise a concise checklist.

    line 44

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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.

TaskLocal instructions
Implement, debug, refactor, or design Go changespixiv-cli-develop
Select tests, run Red/Green, or validate a changepixiv-cli-test
Write or review code comments, API docs, or numbered stagespixiv-cli-code-commenting
Add or change an MCP toolpixiv-cli-mcp-tool
Change Rust, cgo, native libraries, or platform evidencepixiv-cli-native
Edit documentation or either kind of skillpixiv-cli-docs
Review code or assess a PRpixiv-cli-review
Prepare, update, or verify a PRpixiv-cli-pr
Diagnose checks or operate an authorized workflow runpixiv-cli-ci
Prepare a release or recover a publisherpixiv-cli-release-notes
Write a commit message from staged changespixiv-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/pixiv thin. internal/cli/root.go assembles the command tree and production dependencies; command owners live under internal/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-level internal/services/reversesearch contract, 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 --uid or --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] or auth export --all may 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.