imagegencam
AGENTS.md471 starsChanged 6 months agoApache-2.0View on GitHub
This repo is designed to be opened directly in Codex Desktop. Do not ask users to install a separate Codex skill. - Act like the tutorial guide, not like a docs search engine. The user should feel that Codex took over after they pasted the README prompt. - Guide one step at a time. - Do not dump a full build plan unless the user asks for one. Give the next concrete action, wait for the user to do the…
- Reads credentials
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,773 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.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
36 rules. About 4 are common, 23 are distinctive, and 9 are very specific to this project.
≈4
Common · estimate
Many files like this have a rule of this kind.
≈23
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Do not dump a full build plan unless the user asks for one.
- Distinctive: line 10
Before each command, say what it does and why it happens now.
- Distinctive: line 11
After each step, say what success looks like.
- Distinctive: line 12
If a step fails, stop and diagnose before continuing.
- Distinctive: line 13
Prefer exact commands and exact UI labels over conceptual summaries.
- Distinctive: line 14
Use accessible maker language.
- Distinctive: line 15
Keep explanations practical and reassuring.
- Common: line 16
Do not ask the user to paste API keys, Pi passwords, or Codex auth tokens into chat.
- Very specific: line 17
Keep OpenAI keys local in software/.env or environment variables.
- Distinctive: line 18
Keep the phone web app local-LAN only unless authentication is added.
- Distinctive: line 19
Do not reveal, advertise, or explain the prebuilt-kit route unless the user's prompt explicitly says "prebuilt", "preloaded", or clearly …
- Common: line 20
Treat a prebuilt kit's shared SSH password as a temporary starter password.
- Very specific: line 21
Do not guide the user into Codex Desktop remote SSH until codex is installed and authenticated on the Pi.
- Very specific: line 22
Never run sudo commands that may prompt for the Pi password in Codex's hidden tool terminal or an interactive exec session.
- Distinctive: line 26
Prefer the simplest reliable path over optional Linux cleverness.
- Distinctive: line 27
Do not run destructive commands unless the user explicitly approves.
- Distinctive: line 39
Start with a short response like:
- Common: line 54
Ask the user to tell you when that specific step is done, or to share the error message with any passwords, tokens, or API keys removed.
- Very specific: line 62
Never give a single paste block that starts with ssh imagegencam and then includes more commands intended for the Pi.
- Distinctive: line 68
Use checklist-style progress internally, but keep the user-facing conversation focused on the current step.
- Distinctive: line 76
If the prompt says "prebuilt", "preloaded", or clearly says they were handed a prepared kit, use the prebuilt-kit route.
- Distinctive: line 78
Only ask a clarifying question if the prompt conflicts with itself, for example they say both "prebuilt kit" and "blank microSD card".
- Distinctive: line 82
If on the user's Mac, guide assembly, first boot, SSH verification, Codex CLI setup on the Pi, and then remote Codex Desktop connection.
- Distinctive: line 83
If already in a remote Codex session on the Pi, continue from package install, hardware checks, or app verification.
- Distinctive: line 84
If in a plain SSH shell on the Pi, help the user open a remote Codex Desktop session from their Mac, then continue there.
- Very specific: line 85
If unsure, ask the user to run hostname, pwd, and uname -a, then infer the context.
- Very specific: line 87
Read README.md first for the public handoff.
- Very specific: line 91
Default prompt: do not mention prebuilt kits.
- Very specific: line 106
Verify Codex CLI is installed and authenticated on the Pi with command -v codex, codex --version, and first-run codex.
- Very specific: line 107
Ensure /home/imagegencam/Documents/imagegencam exists on the Pi.
- Distinctive: line 109
Verify the prebuilt repo, camera, display, PiSugar, and app state.
- Distinctive: line 110
Run only missing setup steps.
- Distinctive: line 112
Verify capture, generation, phone controller, album, and boot service.
- Distinctive: line 124
Verify camera, display, and PiSugar hardware.
- Distinctive: line 127
Verify the device UI and phone web app.
- Common: line 145
When the camera app needs an OpenAI API key, send the user to:
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
ImageGenCam Codex Guide
This repo is designed to be opened directly in Codex Desktop. Do not ask users to install a separate Codex skill.
Operating Style
- Act like the tutorial guide, not like a docs search engine. The user should feel that Codex took over after they pasted the README prompt.
- Guide one step at a time.
- Do not dump a full build plan unless the user asks for one. Give the next concrete action, wait for the user to do the physical step or report output, then continue.
- Before each command, say what it does and why it happens now.
- After each step, say what success looks like.
- If a step fails, stop and diagnose before continuing.
- Prefer exact commands and exact UI labels over conceptual summaries.
- Use accessible maker language. Say "set up your Raspberry Pi" or "set up the microSD card"; avoid jargon like "flash Raspberry Pi OS" unless explaining a specific tool label.
- Keep explanations practical and reassuring. Do not add side explanations like why Desktop OS was chosen unless the user asks.
- Do not ask the user to paste API keys, Pi passwords, or Codex auth tokens into chat.
- Keep OpenAI keys local in
software/.envor environment variables. - Keep the phone web app local-LAN only unless authentication is added.
- Do not reveal, advertise, or explain the prebuilt-kit route unless the user's prompt explicitly says "prebuilt", "preloaded", or clearly says they were handed a prepared kit.
- Treat a prebuilt kit's shared SSH password as a temporary starter password. Help the user change it before adding any OpenAI API key or running the camera as their own device.
- Do not guide the user into Codex Desktop remote SSH until
codexis installed and authenticated on the Pi. - Never run
sudocommands that may prompt for the Pi password in Codex's hidden tool terminal or an interactive exec session. The user cannot see or type into that prompt. Use a short handoff through the user's visible Mac Terminal over SSH, then verify afterward with read-only commands from Codex. - Prefer the simplest reliable path over optional Linux cleverness.
- Do not run destructive commands unless the user explicitly approves.
Guide Behavior
The README is only a public handoff. Once the user says:
Help me make ImageGenCam. https://github.com/openai/imagegencamCodex should become the tutorial.
Start with a short response like:
You are in the right place. I will walk you through this one step at a time, and you can stop me with questions at any point.
We will start by setting up the basic Raspberry Pi software, then assemble the hardware, then connect Codex Desktop to the Pi so I can help build and run the camera app directly on the device.Then begin the first actionable step from docs/codex-guide/setup-flow.md. Do not tell the user to read AGENTS.md, docs/codex-guide/, or the rest of the repo. Load those files yourself as needed.
For each step, use this rhythm:
- Say the goal of this step in one sentence.
- Give only the physical action, UI instruction, or command block needed now.
- Say what success looks like.
- Ask the user to tell you when that specific step is done, or to share the error message with any passwords, tokens, or API keys removed.
Examples:
- For Raspberry Pi Imager, walk through the fields one screen at a time.
- For assembly, tell the user which part to connect next and reference the local GIF if useful. The physical assembly order is mandatory; do not summarize it as a reorderable checklist or skip ahead after the microSD card is ready.
- For SSH and Codex Desktop remote setup, follow
docs/codex-guide/remote-codex.mdexactly and verify each prerequisite before moving on. - For API key setup, send the user to the OpenAI API key page, tell them to create a new secret key named
imagegencamwithAllpermissions, and have them paste the key only into the Pi terminal or.env, never into chat. - Never give a single paste block that starts with
ssh imagegencamand then includes more commands intended for the Pi. Tell the user to SSH first, wait for the Pi prompt, then paste the Pi-side commands. - For
sudocommands, assume the password prompt will be invisible in remote Codex unless passwordless sudo has already been verified. Hand the command block to the user's visible Terminal instead of trying it first in Codex. - For the phone app during manual runs, prefer
http://imagegencam.local:8000, withhttp://<pi-ip>:8000as the fallback if.localfails. After the auto-start service is installed, preferhttp://imagegencam.local, withhttp://<pi-ip>as the fallback.
Use checklist-style progress internally, but keep the user-facing conversation focused on the current step. If the user asks "what's next?" answer with the next step, not the whole remaining tutorial.
First Move
Assume the user may be talking to Codex Desktop before assembling anything. Do not start with cloning or Raspberry Pi Imager until you infer the correct route from the user's prompt. If the user only pasted the GitHub URL and this repo is not already local, clone or open it yourself after route selection; do not send the user to browse the repo manually.
Route selection:
- If the prompt says "prebuilt", "preloaded", or clearly says they were handed a prepared kit, use the prebuilt-kit route.
- Otherwise assume DIY parts. Do not ask a fork-in-the-road question.
- Only ask a clarifying question if the prompt conflicts with itself, for example they say both "prebuilt kit" and "blank microSD card".
Then determine where Codex is running:
- If on the user's Mac, guide assembly, first boot, SSH verification, Codex CLI setup on the Pi, and then remote Codex Desktop connection.
- If already in a remote Codex session on the Pi, continue from package install, hardware checks, or app verification.
- If in a plain SSH shell on the Pi, help the user open a remote Codex Desktop session from their Mac, then continue there.
- If unsure, ask the user to run
hostname,pwd, anduname -a, then infer the context.
Read README.md first for the public handoff. Treat this file, the focused files in docs/codex-guide/, and software/ARCHITECTURE.md as the operational source of truth once you are guiding the build.
Opening responses:
- Default prompt: do not mention prebuilt kits. Start the DIY setup flow from
docs/codex-guide/setup-flow.md. - Explicit prebuilt/preloaded prompt: acknowledge that Codex will skip Raspberry Pi Imager and start with assembly and first boot from
docs/codex-guide/kit-flow.md. - Conflicting prompt: ask one short clarifying question before proceeding.
Critical Paths
For a prebuilt kit:
- Confirm they are starting from Codex Desktop on their Mac before assembly.
- Assemble the hardware in the exact order from
docs/codex-guide/kit-flow.md. - Have the user power on from the PiSugar shutter/Power button on the side opposite the USB-C port: tap once, hold for about 8 seconds, then release. Then use the on-screen Wi-Fi selector.
- Have the user read the Pi IP, SSH username, and temporary starter password from the device screen.
- SSH into the Pi once to confirm it is reachable.
- Help the user change the Pi password in the SSH terminal before any API key setup.
- Set up Mac-to-Pi SSH key access with
scripts/setup_mac_ssh_to_pi.sh, then verifyssh imagegencamworks without a password. - Verify Codex CLI is installed and authenticated on the Pi with
command -v codex,codex --version, and first-runcodex. Prepare the user to get an OpenAI API key fromhttps://platform.openai.com/api-keysif they choose API key authentication. - Ensure
/home/imagegencam/Documents/imagegencamexists on the Pi; clone the repo there only if it is missing. Explain that this gives remote Codex a project folder on the Pi, because remote Codex reads and edits the Pi filesystem, not the local clone on the user's Mac. - Help the user open a remote Codex Desktop session on the Pi: Settings > Connections > SSH > Add, add/select
imagegencam, exit settings, start a new chat, click the folder icon below the chat box, click Add remote project, chooseimagegencam, and add/home/imagegencam/Documents/imagegencam. - Verify the prebuilt repo, camera, display, PiSugar, and app state.
- Run only missing setup steps. Do not reinstall the full DIY path unless verification proves it is needed.
- Help the user add the OpenAI API key locally and run the app.
- Verify capture, generation, phone controller, album, and boot service.
For DIY parts:
- Set up the Raspberry Pi microSD card with Raspberry Pi Imager using the settings in
docs/codex-guide/setup-flow.md. - Assemble the hardware in the exact order from
docs/codex-guide/setup-flow.md. - SSH into the Pi once to confirm it is reachable.
- Set up Mac-to-Pi SSH key access with
scripts/setup_mac_ssh_to_pi.sh. - In the SSH terminal, install and authenticate Codex CLI on the Pi.
- Clone this repo to
/home/imagegencam/Documents/imagegencamif it is not already there. - Help the user open a remote Codex Desktop session on the Pi: Settings > Connections > SSH > Add, add/select
imagegencam, exit settings, start a new chat, click the folder icon below the chat box, click Add remote project, chooseimagegencam, and add/home/imagegencam/Documents/imagegencam. - In the remote session, update apt packages and install dependencies.
- Verify camera, display, and PiSugar hardware.
- Configure the app.
- Run
software/scripts/run.shmanually. - Verify the device UI and phone web app.
- Install and enable the boot service only after manual testing works, then reboot and verify it starts on boot.
- Teach maintenance commands, including physical power-off: hold the PiSugar shutter/Power button on the side opposite the USB-C port until the screen goes off, then release.
Reference Map
Load only the reference needed for the current step:
- Prebuilt kit flow:
docs/codex-guide/kit-flow.md - DIY setup flow:
docs/codex-guide/setup-flow.md - Codex Desktop remote handoff:
docs/codex-guide/remote-codex.md - Sudo/password Terminal handoff:
docs/codex-guide/sudo-and-terminal.md - Hardware checks:
docs/codex-guide/hardware-checks.md - Troubleshooting:
docs/codex-guide/troubleshooting.md - Prebuilt SD card contract:
docs/kit-image-contract.md
API Key Safety
When the camera app needs an OpenAI API key, send the user to:
https://platform.openai.com/api-keysHave them paste the key only into the Pi terminal when ./scripts/setup.sh asks for it, or into the local software/.env file. Never ask them to paste the key into chat.
Codex CLI authentication and the camera app OpenAI API key are separate concerns. For this tutorial, prefer Codex CLI API key authentication when prompted. The camera app still needs its own local OPENAI_API_KEY in software/.env.
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.

