Skip to content
←INDEX / Prompt library
TUTORIAL/OpenAI Codex/Beginner

AGENTS.md Starter Kit: Minimal and Advanced Templates for Codex and Any Agent

Two AGENTS.md templates drawn from Ischca/awesome-agents-md (CC0): "minimal" is a five-line checklist you can run with right away, and "advanced" covers five sections — environment, testing, conventions, safety, and example tasks. They let an AI coding agent know the rules the moment it enters your project.

SakuyaPromptCraft editor · Updated 2026-06-08
TutorialOpenAI CodexBeginner
01PROMPT
# === 範本 A:Minimal AGENTS.md(5 行就上路)===
# AGENTS.md

- 使用 {{NODE_OR_RUNTIME}}(例:Node 22 LTS)。
- 安裝相依套件:`{{INSTALL_CMD}}`(例:pnpm install)。
- 跑測試:`{{TEST_CMD}}`(例:pnpm test)。
- 格式化程式碼:`{{FORMAT_CMD}}`(例:pnpm format / Prettier)。
- 安全限制:除了 {{ALLOWED_ENDPOINT}} 之外,不得呼叫任何外部網路端點。

# === 範本 B:Advanced AGENTS.md(含 5 大區塊 + 範例任務)===
# AGENTS.md

## Overview
{{PROJECT_OVERVIEW}}(例:以 pnpm workspaces 驅動的模組化 TypeScript monorepo,採用 Airbnb + Prettier 風格)。

## Environment
- 本機開發:`{{DEV_CMD}}`(例:pnpm dev)。
- 相依基礎設施:{{INFRA}}(例:需要 Docker;`docker compose up -d` 啟動 Postgres 與 Redis)。

## Testing
- 單元測試:`{{TEST_CMD}}`。
- 整合測試:{{INTEGRATION_NOTE}}(例:需先啟動 Docker)。
- 鐵則:一個 commit 必須讓測試套件保持全綠。

## Coding Conventions
- 命名:檔名用 kebab-case;{{COMPONENT_LOCATION}}(例:React 元件放在 /src/components)。
- 風格:偏好函式式寫法,避免全域可變狀態。
- 其他:{{EXTRA_CONVENTIONS}}。

## Safety
- 禁止用使用者輸入直接拼出 shell 指令。
- 未經人類授權不得使用 `sudo` 或執行破壞性操作。
- {{EXTRA_SAFETY_RULES}}。

## Example Tasks
- 範例 1:實作 {{EXAMPLE_ENDPOINT}} 端點,並補上單元測試。
- 範例 2:重構 {{EXAMPLE_SERVICE}} 服務,行為不變、測試保持綠燈。

# === 使用說明 ===
# 新專案先用範本 A 起步;當需要規範環境、測試、慣例與安全邊界時,升級到範本 B。
# 把 AGENTS.md 放在 repo 根目錄;多數 agent(含 OpenAI Codex)會自動讀取它。

Swap the variables inside the [ ] brackets for your own content, then paste into OpenAI Codex.

◆ Open in toolChatGPT (paste it)
RUNTRY IT
▶ TRY IT ON-SITE

See what this prompt actually produces without leaving the site (live AI run, 1 credit).

SKILLINSTALL AS SKILL
INSTALL AS SKILLCodex custom prompt

Don't just copy-paste — download and drop it at ~/.codex/prompts/awesome-agents-md-minimal-advanced-starter.md then invoke it with /awesome-agents-md-minimal-advanced-starter.

macOS / Linux
mkdir -p ~/.codex/prompts && mv ~/Downloads/awesome-agents-md-minimal-advanced-starter.md ~/.codex/prompts/awesome-agents-md-minimal-advanced-starter.md
Windows PowerShell
New-Item -ItemType Directory -Force "$env:USERPROFILE\.codex\prompts" | Out-Null; Move-Item "$env:USERPROFILE\Downloads\awesome-agents-md-minimal-advanced-starter.md" "$env:USERPROFILE\.codex\prompts\awesome-agents-md-minimal-advanced-starter.md"
02CONTEXT / Why it works

## What is it, and what problem does it solve? AGENTS.md is a file placed at the root of a project, written for "AI coding agents" to read — essentially a project's README, except the reader is an agent like Codex or Claude Code. It tells the agent how to install the project, how to run tests, what coding style to use, and what the safety red lines are. The pain point is very concrete: without it, an agent has to guess your conventions every time it enters the project, and often ends up using the wrong package manager, the wrong naming style, or performing destructive operations. Ischca's awesome-agents-md is a curated collection of real-world AGENTS.md examples, templates, guides, and tools, built around the goal of "accelerating agent onboarding" — getting an agent up to speed the moment it enters a project. ## Why this source is worth using It offers two clearly positioned templates that cover two different starting points: - **Minimal**: "a concise, no-frills starting point" — a single-section minimal checklist (runtime, install command, test command, formatting, one network-security restriction) you can be running with in five lines. - **Advanced**: "a feature-rich template with testing, safety and style rules" — covering five sections: Overview, Environment, Testing, Coding Conventions, and Safety, plus Example Tasks demonstrating typical assignments. The advanced template contains several hard rules well worth borrowing, such as "a commit must leave the test suite fully green," "use kebab-case for filenames," "never build shell commands from user input," and "no unauthorized sudo." And the whole repo is CC0 (public domain dedication) — the most permissive license possible, so you can freely adapt it. ## How to use it (steps and key points) This entry's full prompt rewrites both the minimal and advanced skeletons into "fill-in-the-blank" versions, ready to copy straight into your project root's AGENTS.md: 1. **New or small projects**: start with Template A (minimal) — just fill in the five blanks {{NODE_OR_RUNTIME}}, {{INSTALL_CMD}}, {{TEST_CMD}}, {{FORMAT_CMD}}, and {{ALLOWED_ENDPOINT}} and you're ready to go. 2. **Larger or multi-person projects**: upgrade to Template B (advanced) — fill in the environment (Docker/services), test-layer breakdown, naming and style conventions, safety boundaries, then add two Example Tasks so the agent knows what a typical assignment looks like. 3. Place the file at the repo root; most agents, including OpenAI Codex, read it automatically. Subdirectories can also have their own AGENTS.md for local overrides. ## When to use it Any repo you hand off to an AI agent for collaboration should have one. When starting a new project, or when you want Codex/Claude Code to follow the rules quickly, start with minimal; once the project grows a test suite, CI, and security requirements, switch to advanced. It complements documents like CLAUDE.md or an Agent OS standards file — AGENTS.md is the agent's "entry rulebook," and the more precise it is, the less likely the agent is to go off the rails. ## Source and license Source: Ischca/awesome-agents-md (by Ischca, CC0 1.0 Public Domain Dedication) — this entry is an edited adaptation; see the link above for the original. The original repo also includes multiple real-world AGENTS.md files (including a production-grade Java SDK example), guides, and tools; this entry only adapts the structure of its minimal/advanced templates into fill-in-the-blank starters, and does not reproduce the full template files verbatim.

04VARIABLES
01[NODE_OR_RUNTIME]

執行環境版本,例如 Node 22 LTS、Python 3.12、Go 1.22

02[INSTALL_CMD]

安裝相依套件的指令,例如 pnpm install、npm ci、poetry install

03[TEST_CMD]

跑測試的指令,例如 pnpm test、pytest -q、go test ./...

04[FORMAT_CMD]

格式化指令,例如 pnpm format、prettier --write、gofmt

05[ALLOWED_ENDPOINT]

唯一允許 agent 連線的外部端點(其餘禁止),例如 https://api.internal.local

06[PROJECT_OVERVIEW]

專案一句話概述(架構/語言/風格),advanced 範本用

07[DEV_CMD]

本機啟動開發環境的指令,例如 pnpm dev

08[INFRA]

相依的基礎設施,例如 需要 Docker;docker compose up -d 啟 Postgres/Redis

09[INTEGRATION_NOTE]

整合測試的前置條件說明,例如 需先啟動 Docker

10[COMPONENT_LOCATION]

元件/模組擺放位置慣例,例如 React 元件放 /src/components

11[EXTRA_CONVENTIONS]

其他程式慣例(選填),例如 用 named export、禁用 any

12[EXTRA_SAFETY_RULES]

其他安全紅線(選填),例如 禁止刪除 migrations、prod 操作前先確認

13[EXAMPLE_ENDPOINT]

Example Task 用的範例端點名,例如 GET /api/users/:id

14[EXAMPLE_SERVICE]

Example Task 用的範例服務/模組名,例如 NotificationService

05RESOLVER · 變數代入器0 / 14

填下面的欄位,上方 prompt 會即時替換 [方括號] 內容。填好後按「複製組好的 prompt」直接丟進工具。

修飾
Assembled · 填剩餘變數…
# === 範本 A:Minimal AGENTS.md(5 行就上路)===
# AGENTS.md

- 使用 {{NODE_OR_RUNTIME}}(例:Node 22 LTS)。
- 安裝相依套件:`{{INSTALL_CMD}}`(例:pnpm install)。
- 跑測試:`{{TEST_CMD}}`(例:pnpm test)。
- 格式化程式碼:`{{FORMAT_CMD}}`(例:pnpm format / Prettier)。
- 安全限制:除了 {{ALLOWED_ENDPOINT}} 之外,不得呼叫任何外部網路端點。

# === 範本 B:Advanced AGENTS.md(含 5 大區塊 + 範例任務)===
# AGENTS.md

## Overview
{{PROJECT_OVERVIEW}}(例:以 pnpm workspaces 驅動的模組化 TypeScript monorepo,採用 Airbnb + Prettier 風格)。

## Environment
- 本機開發:`{{DEV_CMD}}`(例:pnpm dev)。
- 相依基礎設施:{{INFRA}}(例:需要 Docker;`docker compose up -d` 啟動 Postgres 與 Redis)。

## Testing
- 單元測試:`{{TEST_CMD}}`。
- 整合測試:{{INTEGRATION_NOTE}}(例:需先啟動 Docker)。
- 鐵則:一個 commit 必須讓測試套件保持全綠。

## Coding Conventions
- 命名:檔名用 kebab-case;{{COMPONENT_LOCATION}}(例:React 元件放在 /src/components)。
- 風格:偏好函式式寫法,避免全域可變狀態。
- 其他:{{EXTRA_CONVENTIONS}}。

## Safety
- 禁止用使用者輸入直接拼出 shell 指令。
- 未經人類授權不得使用 `sudo` 或執行破壞性操作。
- {{EXTRA_SAFETY_RULES}}。

## Example Tasks
- 範例 1:實作 {{EXAMPLE_ENDPOINT}} 端點,並補上單元測試。
- 範例 2:重構 {{EXAMPLE_SERVICE}} 服務,行為不變、測試保持綠燈。

# === 使用說明 ===
# 新專案先用範本 A 起步;當需要規範環境、測試、慣例與安全邊界時,升級到範本 B。
# 把 AGENTS.md 放在 repo 根目錄;多數 agent(含 OpenAI Codex)會自動讀取它。
RELATED
PRO01
TUTORIALSuno v5.5FEATURED
r/SunoAI (anonymous studio engineer)2026-06-12

Suno Engineer's Mindset: 4 Steps to a Song That Doesn't Sound Like AI

5.0(1)

A studio engineer's breakdown of Suno's fatal weaknesses (fried vocals, high-frequency artifacts), plus a 4-step DAW workflow and a Suno Studio cleanup prompt.

Advanced
Read

Free02
TUTORIALClaude 4.5 SonnetFEATURED
r/ClaudeAI2026-05-14

5 Claude Weekly Workflows That Stuck After 6 Months

Proposal generator / meeting processor / content repurposer / Friday review / shutdown reset — out of 40 I tried, only these 5 survived, each saving 30+ minutes per run.

Intermediate
Read

PRO03
TUTORIALClaude 4.5 SonnetFEATURED
r/PromptEngineering2026-05-14

7 Cross-Model A/B-Tested Prompt Techniques (Not Vibes)

Written after six months of A/B testing 200+ prompts on Claude, GPT-4, and Gemini with human raters. Covers persona + constraint stacking, anti-examples, role-reversal QA, cognitive scaffolds, emotional priming, uncertainty CoT, and steelman-first.

Advanced
Read

Free04
TUTORIALChatGPTFEATURED
r/ChatGPTPromptGenius2026-05-14

5 trust-checking one-liner prompts (no role-play)

After a year of role-play system prompts and 14-step frameworks, here's the takeaway: the thing that actually moved the needle on quality was 5 one-line prompts. No roles, no markdown, no "you are an expert."

Beginner
Read

COMMENTS · 討論區0 則
登入 後可留言。還沒帳號?註冊
目前沒有留言。第一個說說你的經驗。