gitpic AGENTS.md

Repository-specific instructions for gitpic, a Rust command-line program for uploading and managing images with GitHub. They describe its files, setup, commands, coding style, and testing expectations.

In plain words
What is it for?
Use them when developing, testing, or reviewing changes in the gitpic codebase.
Why use it?
They give coding agents the project context needed to make changes that fit the repository and follow its conventions.

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/tarnish233/gitpic/agents-md
Clone the repo
git clone --depth 1 https://github.com/tarnish233/gitpic

Made for: Codex, OpenCode.

Per session 5,654 This file is loaded in full into every session.
When invoked 5,654 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.05654 $0.05654
Opus 5 $0.02827 $0.02827
Sonnet 5 $0.01131 $0.01131
Haiku 4.5 $0.00565 $0.00565

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

Security

Grade A, and why

gitpic 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 2d 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 · 303 lines

How it starts

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

Repository Guidelines

Project Structure & Module Organization

gitpic is a Rust CLI. Source lives in src/:

  • main.rs — entry point, subcommand dispatch, exit codes.
  • cli.rs — clap argument/subcommand definitions.
  • config.rs — config model + XDG path resolution (~/.config/gitpic/config.toml).
  • auth.rs — the credential: reads/writes the 0600 auth.toml that gitpic auth login produces, and is the only source there is. No secret is held in Config.
  • oauth.rs — GitHub device flow: the wire protocol behind gitpic auth login.
  • github.rs — GitHub Contents API client (upload, dedup, health checks).
  • naming.rs, link.rs, imageproc.rs, output.rs, error.rs — path/hash, URL/markdown, compression, human/JSON output, error types.
  • history.rs — the upload log the app's 历史 pane reads.
  • release.rs — the update check behind gitpic update check, and the tap lookup behind gitpic update cask: version parsing and comparison, the releases/latest fetch, the release's assets (name, size, download URL, GitHub's digest) that the app installs an update from, and a Contents-API read of the tap's Casks/gitpic.rb answering what brew upgrade --cask gitpic would install. Both origins are compile-time constants on purpose, pinned by a test — their text is rendered inside GitPic's own window, so nothing configurable may choose them, and download URLs come from the API rather than a template for the same reason.
  • install_source.rs — which of the five ways this binary was installed (cask app, hand-installed app, gitpic_cli formula, cargo install, or unknown), so gitpic update prints the one upgrade command that install actually wants instead of two to choose between. Canonicalises current_exe() first: the cask links bin/gitpic into the app bundle, and on Apple platforms the un-canonicalised path is the symlink, which classifies the commonest install of all as neither an app nor a formula. Distinct from GitPicCore's CaskOwnership, which asks whether the bundle is cask-managed rather than where this binary came from.
  • testutil.rs#[cfg(test)] only: the loopback stub server, a canned response, and the request reader shared by github's and release's tests. One sock.read is not a whole request; the module says what that cost twice.
  • commands/ — one module per action (upload, auth_cmd, repos, branches, doctor, list, config_cmd, completion, skill, update).

Read the full file on GitHub · 303 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. 2d ago First seen · 303 lines · 5,654 tokens per session scan A c53a8ac0ea29

Subscribe to this mod's changes

gitpic AGENTS.md is an instructions file published in the GitHub repository tarnish233/gitpic (23 stars, last pushed 4d ago), licensed MIT. It adds 5,654 tokens to every session, about $0.0283 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.

Related

Other instructions, from other repositories

github-mcp-server copilot-instructions.md

Copilot instructions for github/github-mcp-server, covering github mcp server - copilot instructions, project overview, critical build & validation steps, required commands (run before committing) and when modifying mcp tools/endpoints.

github/github-mcp-server · 3,217 tokens

cs CLAUDE.md

Instructions for boyter/cs, covering claude.md, project overview, build & test commands, architecture and query pipeline (pkg/search/).

boyter/cs · 1,022 tokens

av CLAUDE.md

Instructions for aviator-co/av, covering claude.md, project overview, documentation sources, command structure philosophy and development workflow.

aviator-co/av · 1,531 tokens

hana-developer-cli-tool-example command-documentation.instructions.md

Use when creating or updating CLI command documentation in docs/02-commands/. Generates comprehensive markdown files with Mermaid diagrams showing command flow, detailed parameter tables organized by category, syntax examples, and related commands.

SAP-samples/hana-developer-cli-tool-example · 9,187 tokens

hana-developer-cli-tool-example mcp-server-development.instructions.md

Use when creating or updating MCP (Model Context Protocol) server components. Enforces TypeScript patterns, JSON-RPC communication rules, tool/resource/prompt registration, and integration with CLI command metadata. Ensures MCP server follows protocol requirements and maintains consistency with the CLI infrastructure.

SAP-samples/hana-developer-cli-tool-example · 4,811 tokens

hana-developer-cli-tool-example route-development.instructions.md

Use when creating or updating route files in routes/. Enforces consistent structure, error handling, database connection management, internationalization, and integration with the Express server and CLI command infrastructure. Ensures routes follow established patterns for endpoint registration, response formatting…

SAP-samples/hana-developer-cli-tool-example · 5,092 tokens