AI Agent Configuration
This repo keeps a single canonical prompt in PROMPT_SYSTEM.md and all agent
files reference it using a relative path.
Files and minimal contents
GEMINI.md (repo root or subdir)
# shellgAIde
@PROMPT_SYSTEM.md
CLAUDE.md (repo root or subdir)
# shellgAIde
@PROMPT_SYSTEM.md
AGENTS.md (repo root, for Codex/Copilot)
# shellgAIde - GNU-first Shell Toolchain
See full system prompt: [PROMPT_SYSTEM.md](PROMPT_SYSTEM.md)
Core rules: Google Shell Style Guide, GNU tools (grep/sed/date), Bash 5+,
main() structure, CI-safe.
.github/copilot-instructions.md (subdir)
# shellgAIde Copilot
Follow [../PROMPT_SYSTEM.md](../PROMPT_SYSTEM.md): GNU-first toolchain, Google
Shell Style, main() structure.
Notes on paths
- Use a relative
@PROMPT_SYSTEM.mdfrom the file location. - For
.github/copilot-instructions.md, go up one level with../.
Manual setup (full instructions)
1) ChatGPT
Recommended approach:
- Create a ChatGPT Project (or use Custom Instructions) and paste the full
content of
PROMPT_SYSTEM.mdinto the project instructions. - Ask for either:
- a new script (“Create a new script that does X”), or
- a refactor (“Refactor this script to conform to the system prompt; preserve behavior”).
When refactoring, include:
- The current script (full text).
- Constraints (what must not change).
- Any expected I/O examples (flags, env vars, exit codes).
2) OpenAI Codex (CLI)
Codex CLI supports repository instructions via AGENTS.md.
Typical flow:
- Start Codex in the repo root.
- Run
/initto createAGENTS.md. - Paste the full content of
PROMPT_SYSTEM.mdintoAGENTS.md(or summarize while keeping the non-negotiable rules). - Ask Codex to create/refactor the script, then review and apply diffs.
2b) OpenAI Codex (VS Code extension)
The VS Code Codex extension also supports repository instructions. Typical flow:
- Ensure
AGENTS.mdexists in the repo root. - Paste the full content of
PROMPT_SYSTEM.mdintoAGENTS.md(or a concise but complete adaptation). - Reload the VS Code window or restart the Codex session.
- Use Codex Chat to create/refactor scripts; the instructions are applied automatically.
3) GitHub Copilot (VS Code / Visual Studio / JetBrains)
Copilot supports repository custom instructions. Typical flow:
- Create
.github/copilot-instructions.mdin your target repo. - Paste the full content of
PROMPT_SYSTEM.mdinto that file (or a concise but complete adaptation). - Use Copilot Chat to create/refactor scripts with the instructions applied automatically.
Note: Copilot instruction support may vary by IDE and requires the feature to be enabled.
4) Google Gemini (Gemini CLI)
Recommended approach:
- Add a
GEMINI.mdfile in your repo root (or parent dirs). - Reference
PROMPT_SYSTEM.mdwith a relative@PROMPT_SYSTEM.md.
Notes:
- Use
/memory showto inspect,/memory refreshto reload, and/memory add <text>to append to~/.gemini/GEMINI.md. - You can import other files inside
GEMINI.mdwith@file.md(relative or absolute paths). - You can change the filename via
settings.jsonusingcontext.fileName. - Reference: https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/gemini-md.md
5) Anthropic Claude (Claude Code)
Recommended approach:
- Add a
CLAUDE.mdfile in your repo root (or parent dirs). - Reference
PROMPT_SYSTEM.mdwith a relative@PROMPT_SYSTEM.md. - Optionally run
/initin Claude Code to generate a starterCLAUDE.md, then review and refine it to match your real workflow.
Notes:
CLAUDE.mdis loaded automatically by Claude Code and becomes part of the system prompt for every session.- You can place
CLAUDE.mdin a parent directory for monorepos or in your home folder to apply it to all projects. - Keep it concise and avoid secrets; treat it like shareable documentation.
- Reference: https://claude.com/blog/using-claude-md-files
Verify output with this toolchain
After generating/refactoring a script (locally):
make setup
# then inside the toolchain shell:
make lint
make test
make ci
For a single script:
make shell
# then:
./bin/lint.sh path/to/script.sh