agentleFS
ShaoXiangChienShaoXiangChien/banana-codex/AGENTS.md

banana-codex

AGENTS.md0 starsChanged 4 months agoMITView on GitHub

- The installable skill root is skills/banana. - skills/banana/SKILL.md owns the Codex creative-director workflow. - skills/banana/agents/openai.yaml owns Codex UI metadata and the default $banana prompt. - skills/banana/references/ contains progressively disclosed domain knowledge. - skills/banana/scripts/ contains setup, validation, REST fallback, batch, preset, and cost utilities. - install.sh copies the skill to ${CODEX_HOME:-$HOME/.codex}/skills/banana. Do not add upstream-runtime plugin manifests, settings paths, slash-command installation, custom-agent manifests, or invented repository URLs. Upstream references are allowed only for attribution and migration context. The MCP server…

  • Reads credentials
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 32,671 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 repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not add upstream-runtime plugin manifests, settings paths, slash-command installation, custom-agent manifests, or invented repository …

    line 16
  2. Very specific:

    Use secret-free Codex CLI registration, lookup, and removal through codex mcp add, codex mcp get, and codex mcp remove.

    line 28
  3. Distinctive:

    Keep all Python runtime scripts compatible with Python 3.9 or newer and limited to the standard library.

    line 40
  4. Very specific:

    Keep gemini-3.1-flash-image as the default and gemini-2.5-flash-image as the stable fallback.

    line 42
  5. Very specific:

    Keep imageSize values uppercase: 512, 1K, 2K, and 4K.

    line 46
  6. Distinctive:

    Keep one image per Gemini API call and express exclusions with positive semantic reframing rather than a negative-prompt field.

    line 54
  7. Very specific:

    Keep SKILL.md at or below 500 lines and preserve the exact community footer used after successful generation, editing, and batch operations.

    line 58
  8. Distinctive:

    Run these commands from the repository root before committing:

    line 63
  9. Very specific:

    Keep model facts consistent across SKILL.md, references/gemini-models.md, references/mcp-tools.md, the fallback scripts, and their tests.

    line 101

≈ “Common” is an estimate: at least 1 in 5 of the 41,581 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

Banana Codex Maintenance Guide

Repository contract

  • The installable skill root is skills/banana.
  • skills/banana/SKILL.md owns the Codex creative-director workflow.
  • skills/banana/agents/openai.yaml owns Codex UI metadata and the default $banana prompt.
  • skills/banana/references/ contains progressively disclosed domain knowledge.
  • skills/banana/scripts/ contains setup, validation, REST fallback, batch, preset, and cost utilities.
  • install.sh copies the skill to ${CODEX_HOME:-$HOME/.codex}/skills/banana.

Do not add upstream-runtime plugin manifests, settings paths, slash-command installation, custom-agent manifests, or invented repository URLs. Upstream references are allowed only for attribution and migration context.

Codex MCP integration

The MCP server name is nanobanana-mcp, and its stdio command is:

npx -y @kindlmann/nano-banana-mcp@2.1.0

Use secret-free Codex CLI registration, lookup, and removal through codex mcp add, codex mcp get, and codex mcp remove. Store the key with a protected atomic direct patch to [mcp_servers.nanobanana-mcp.env] in config.toml, preserving unrelated configuration and using mode 0600. The stored contract is stdio, command npx, arguments exactly ["-y", "@kindlmann/nano-banana-mcp@2.1.0"], and a nonempty GEMINI_API_KEY in env. Keep env_vars exactly empty. Never print a full API key, put one in a URL or child-process argument, commit one, or call the paid Gemini API from tests.

Runtime and compatibility rules

  • Keep all Python runtime scripts compatible with Python 3.9 or newer and limited to the standard library.
  • Keep gemini-3.1-flash-image as the default and gemini-2.5-flash-image as the stable fallback.
  • Reject every model override from both env and env_vars, including values that are live model IDs.
  • Keep imageSize values uppercase: 512, 1K, 2K, and 4K.
  • The 3.1 model supports all four documented sizes. The 2.5 model supports 1K only.
  • The MCP size field spells the direct REST 512 tier as 0.5K.
  • Preserve MCP continuity by retaining each returned interaction_id and passing it as the next edit_image.previous_interaction_id.
  • Validate model-specific aspect ratios and resolutions before credential lookup or network access.
  • Keep one image per Gemini API call and express exclusions with positive semantic reframing rather than a negative-prompt field.
  • Preserve data compatibility at ~/.banana/presets, ~/.banana/costs.json, and ~/Documents/nanobanana_generated.
  • Keep SKILL.md at or below 500 lines and preserve the exact community footer used after successful generation, editing, and batch operations.

Validation

Run these commands from the repository root before committing:

python3 -m unittest discover -s tests -v
python3 -m py_compile skills/banana/scripts/*.py
for script in skills/banana/scripts/*.py; do python3 "$script" --help >/dev/null; done
git diff --check

The repository-local structural validator is tests/test_skill_metadata.py; CI relies on it and the rest of the unittest suite. When the official Codex skill-creator validator and uv are installed, also run this local completion check:

uv run --with pyyaml python \
  "${CODEX_HOME:-$HOME/.codex}/skills/.system/skill-creator/scripts/quick_validate.py" \
  skills/banana

Automated and unit tests must use temporary homes, fake executables, and mocked HTTP responses. They must not depend on an installed MCP server, authenticated Codex, or a real Google AI key.

tests/run-installed-discovery.sh is an opt-in manual forward-verification exception. It uses real authenticated Codex only inside an isolated temporary CODEX_HOME, with an ephemeral session, ignored user/project rules, a read-only sandbox, and prompts that forbid generation, MCP/API calls, bundled scripts, and file writes. It is not a CI or unit test.

Version updates

For a release, update the version and date in:

  • CHANGELOG.md
  • CITATION.cff
  • Any version statement newly introduced in README.md

Keep model facts consistent across SKILL.md, references/gemini-models.md, references/mcp-tools.md, the fallback scripts, and their tests. Retain AgriciDaniel's MIT copyright and upstream attribution.

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.