Codex Writes an AGENTS.md for This Repository From the Real Setup

Has Codex inspect your repository and write a short, accurate AGENTS.md with the real build, test and lint commands, conventions and boundaries, checked by actually running them.

You get: the AGENTS.md content in one code block with sections Setup, Commands, Project layout, Conventions, Testing, Boundaries and Pull requests. Then a table of each command and…

More like this

Ready to use: no blanks to fill in.

The prompt

Installs to .agents/skills/codex-writes-an-agents-md-for-this-repository-from-the-real-setu/

mkdir -p .agents/skills/codex-writes-an-agents-md-for-this-repository-from-the-real-setu && curl -sL "https://prompts-gpt.com/prompts/codex-writes-an-agents-md-for-this-repository-from-the-real-setup/raw" -o .agents/skills/codex-writes-an-agents-md-for-this-repository-from-the-real-setu/SKILL.md
SKILL.md
Preview
---
name: codex-writes-an-agents-md-for-this-repository-from-the-real-setu
description: "Has Codex inspect your repository and write a short, accurate AGENTS.md with the real build, test and lint commands, conventions and boundaries, checked by actually running them."
---

# Codex Writes an AGENTS.md for This Repository From the Real Setup

Has Codex inspect your repository and write a short, accurate AGENTS.md with the real build, test and lint commands, conventions and boundaries, checked by actually running them.

## Prompt

```
You are Codex working in this repository. Write an AGENTS.md at the repository root that tells coding agents how to work here. Base every line on what you find in the repo, not on general advice.

Steps:
1. Inspect the repo: package manifests, lockfiles, Makefile or task runner, CI workflows, linter and formatter configs, test folders, README and any existing CLAUDE.md, .cursor/rules or contributing guide.
2. Find the exact commands to install, build, test one file, test everything, lint, format and typecheck. Run each one that is safe and quick, and record whether it worked.
3. Note the conventions you can see in the code: folder layout, naming, error handling, how tests are written, and commit message style from git log.
4. Note boundaries: generated files, vendored code, secrets, migrations and anything that must not be edited by hand.

Rules: keep it under 120 lines; every rule must be checkable; no rule that a linter or CI already enforces; do not copy the README.

Output format: the AGENTS.md content in one code block with sections Setup, Commands, Project layout, Conventions, Testing, Boundaries and Pull requests. Then a table of each command and whether it ran successfully, and a list of assumptions, risks and open questions for the maintainers.
```

## Usage Notes

Run in Codex (CLI or IDE) at the repo root, then commit the file. Codex, Cursor, GitHub Copilot and Gemini CLI read AGENTS.md; for Claude Code, import it from CLAUDE.md. Review the commands table before trusting it.

Tips and common edits

Run in Codex (CLI or IDE) at the repo root, then commit the file. Codex, Cursor, GitHub Copilot and Gemini CLI read AGENTS.md; for Claude Code, import it from CLAUDE.md. Review the commands table before trusting it.

Questions about this prompt

More in Codex

Conventional Commit and PR Description Writer Skill (SKILL.md)

A ready-to-save SKILL.md that makes your coding agent write Conventional Commits messages and pull request descriptions from the staged diff, never from guesses.

Pre-Merge Code Review Checklist Skill (SKILL.md)

A save-ready SKILL.md that has your coding agent review a branch before merge: correctness, security, tests and migrations, with findings ranked by severity and no style nitpicks.

Release Notes From Git Log Skill for Users and Developers (SKILL.md)

A SKILL.md that writes release notes from the commits between two tags, split into a plain-language section for users and a technical changelog for developers.

Test-First Bug Fix Skill: Reproduce, Fix, Prove (SKILL.md)

A SKILL.md that forces your coding agent to reproduce a bug with a failing test before changing code, apply the smallest fix, and prove it with the test suite.

Brand Voice Guard Skill That Checks Drafts Against VOICE.md (SKILL.md)

A SKILL.md that makes Claude write and edit in your brand's voice: it reads a VOICE.md in the project, or builds one from samples, then checks every draft against it.

Meeting Notes to Decisions and Action Items Skill (SKILL.md)

A SKILL.md that turns any meeting transcript or rough notes into a decision log, owner-and-date action items, open questions and a ready-to-send recap email.

Spreadsheet and CSV Cleanup Report Skill (SKILL.md)

A SKILL.md that has your agent profile a messy CSV or spreadsheet, fix it in a copy with a script, and report every change so the cleaned data can be trusted.

Cursor .mdc Rules to Portable AGENTS.md Converter

Converts your pasted Cursor .mdc rules into a single AGENTS.md that Codex, Copilot and Gemini CLI can read, plus a table of what does not carry over.

Explain a Codebase Folder to a New Developer on Their First Day

Produces an onboarding guide for one folder of a codebase: what it does, how data moves through it, the files to read first and the traps a new developer should avoid.

CLAUDE.md or AGENTS.md Audit: Cut, Rewrite as Checkable Rules, Move to Skills

Turns a pasted CLAUDE.md or AGENTS.md into a shorter file of verifiable rules and names which procedures belong in skills.

Write a SKILL.md From a Workflow You Keep Repeating

Interviews you about a task you do over and over, then writes a complete, save-ready SKILL.md with a trigger description, steps, output format and stop conditions.

Codex Characterization-Test-First Refactor with Verification Handoff

Runs a behavior-preserving refactor in Codex exec. It pins current behavior with characterization tests, refactors in small verified steps inside an allowed scope, and ends with an evidence-based handoff for the merge decision.