agentleFS
OpenAIKnown publisheropenai/imagegencam/AGENTS.md

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

    Do not dump a full build plan unless the user asks for one.

    line 9
  2. Distinctive:

    Before each command, say what it does and why it happens now.

    line 10
  3. Distinctive:

    After each step, say what success looks like.

    line 11
  4. Distinctive:

    If a step fails, stop and diagnose before continuing.

    line 12
  5. Distinctive:

    Prefer exact commands and exact UI labels over conceptual summaries.

    line 13
  6. Distinctive:

    Use accessible maker language.

    line 14
  7. Distinctive:

    Keep explanations practical and reassuring.

    line 15
  8. Common:

    Do not ask the user to paste API keys, Pi passwords, or Codex auth tokens into chat.

    line 16
  9. Very specific:

    Keep OpenAI keys local in software/.env or environment variables.

    line 17
  10. Distinctive:

    Keep the phone web app local-LAN only unless authentication is added.

    line 18
  11. Distinctive:

    Do not reveal, advertise, or explain the prebuilt-kit route unless the user's prompt explicitly says "prebuilt", "preloaded", or clearly …

    line 19
  12. Common:

    Treat a prebuilt kit's shared SSH password as a temporary starter password.

    line 20
  13. Very specific:

    Do not guide the user into Codex Desktop remote SSH until codex is installed and authenticated on the Pi.

    line 21
  14. Very specific:

    Never run sudo commands that may prompt for the Pi password in Codex's hidden tool terminal or an interactive exec session.

    line 22
  15. Distinctive:

    Prefer the simplest reliable path over optional Linux cleverness.

    line 26
  16. Distinctive:

    Do not run destructive commands unless the user explicitly approves.

    line 27
  17. Distinctive:

    Start with a short response like:

    line 39
  18. Common:

    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.

    line 54
  19. Very specific:

    Never give a single paste block that starts with ssh imagegencam and then includes more commands intended for the Pi.

    line 62
  20. Distinctive:

    Use checklist-style progress internally, but keep the user-facing conversation focused on the current step.

    line 68
  21. Distinctive:

    If the prompt says "prebuilt", "preloaded", or clearly says they were handed a prepared kit, use the prebuilt-kit route.

    line 76
  22. Distinctive:

    Only ask a clarifying question if the prompt conflicts with itself, for example they say both "prebuilt kit" and "blank microSD card".

    line 78
  23. Distinctive:

    If on the user's Mac, guide assembly, first boot, SSH verification, Codex CLI setup on the Pi, and then remote Codex Desktop connection.

    line 82
  24. Distinctive:

    If already in a remote Codex session on the Pi, continue from package install, hardware checks, or app verification.

    line 83
  25. Distinctive:

    If in a plain SSH shell on the Pi, help the user open a remote Codex Desktop session from their Mac, then continue there.

    line 84
  26. Very specific:

    If unsure, ask the user to run hostname, pwd, and uname -a, then infer the context.

    line 85
  27. Very specific:

    Read README.md first for the public handoff.

    line 87
  28. Very specific:

    Default prompt: do not mention prebuilt kits.

    line 91
  29. Very specific:

    Verify Codex CLI is installed and authenticated on the Pi with command -v codex, codex --version, and first-run codex.

    line 106
  30. Very specific:

    Ensure /home/imagegencam/Documents/imagegencam exists on the Pi.

    line 107
  31. Distinctive:

    Verify the prebuilt repo, camera, display, PiSugar, and app state.

    line 109
  32. Distinctive:

    Run only missing setup steps.

    line 110
  33. Distinctive:

    Verify capture, generation, phone controller, album, and boot service.

    line 112
  34. Distinctive:

    Verify camera, display, and PiSugar hardware.

    line 124
  35. Distinctive:

    Verify the device UI and phone web app.

    line 127
  36. Common:

    When the camera app needs an OpenAI API key, send the user to:

    line 145

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

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

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/.env or 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 codex is installed and authenticated on the Pi.
  • Never run sudo commands 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/imagegencam

Codex 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:

  1. Say the goal of this step in one sentence.
  2. Give only the physical action, UI instruction, or command block needed now.
  3. Say what success looks like.
  4. 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.md exactly 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 imagegencam with All permissions, 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 imagegencam and 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 sudo commands, 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, with http://<pi-ip>:8000 as the fallback if .local fails. After the auto-start service is installed, prefer http://imagegencam.local, with http://<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, and uname -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:

  1. Confirm they are starting from Codex Desktop on their Mac before assembly.
  2. Assemble the hardware in the exact order from docs/codex-guide/kit-flow.md.
  3. 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.
  4. Have the user read the Pi IP, SSH username, and temporary starter password from the device screen.
  5. SSH into the Pi once to confirm it is reachable.
  6. Help the user change the Pi password in the SSH terminal before any API key setup.
  7. Set up Mac-to-Pi SSH key access with scripts/setup_mac_ssh_to_pi.sh, then verify ssh imagegencam works without a password.
  8. Verify Codex CLI is installed and authenticated on the Pi with command -v codex, codex --version, and first-run codex. Prepare the user to get an OpenAI API key from https://platform.openai.com/api-keys if they choose API key authentication.
  9. Ensure /home/imagegencam/Documents/imagegencam exists 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.
  10. 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, choose imagegencam, and add /home/imagegencam/Documents/imagegencam.
  11. Verify the prebuilt repo, camera, display, PiSugar, and app state.
  12. Run only missing setup steps. Do not reinstall the full DIY path unless verification proves it is needed.
  13. Help the user add the OpenAI API key locally and run the app.
  14. Verify capture, generation, phone controller, album, and boot service.

For DIY parts:

  1. Set up the Raspberry Pi microSD card with Raspberry Pi Imager using the settings in docs/codex-guide/setup-flow.md.
  2. Assemble the hardware in the exact order from docs/codex-guide/setup-flow.md.
  3. SSH into the Pi once to confirm it is reachable.
  4. Set up Mac-to-Pi SSH key access with scripts/setup_mac_ssh_to_pi.sh.
  5. In the SSH terminal, install and authenticate Codex CLI on the Pi.
  6. Clone this repo to /home/imagegencam/Documents/imagegencam if it is not already there.
  7. 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, choose imagegencam, and add /home/imagegencam/Documents/imagegencam.
  8. In the remote session, update apt packages and install dependencies.
  9. Verify camera, display, and PiSugar hardware.
  10. Configure the app.
  11. Run software/scripts/run.sh manually.
  12. Verify the device UI and phone web app.
  13. Install and enable the boot service only after manual testing works, then reboot and verify it starts on boot.
  14. 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-keys

Have 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.

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.