Source: https://arara.code.app.br/en/articles/prompts-for-coding-with-ai
Language: en-US
Published: 2026-10-31T20:25:00-03:00

Guides and comparisons

# Prompts for coding with AI: rules and examples

A good prompt for coding with AI states the goal, points to the relevant files and says how to check the result, such as a test that must pass. For large or vague tasks, first ask the AI to explore the code, ask you questions and propose a plan before editing. Rules that apply to every request, like build and test commands, belong in AGENTS.md or CLAUDE.md.

Arara Code

Published and sources checked on October 31, 2026.

Published by the Arara Code project based on the official documentation cited.

## Be specific: the goal, the files and how to check

Anthropic's best practices guide for Claude Code recommends specific prompts: name the file, describe the symptom and say up front what “fixed” looks like. That usually saves a round of corrections. The guide gives an example. Instead of “fix the login bug,” try “users report login fails after the session times out. look at token refresh in src/auth/, write a failing test that reproduces it, then fix it.”

Also say how to check the result. The same guide notes that Claude stops when the work looks done, and without a check to run, “looks done” is all it has. Give it something that comes back pass or fail, such as a test file, a build's exit code or a linter. Then ask for evidence: the command it ran and its output. “All tests pass” on its own tells you very little.

[Anthropic: Claude Code best practices](https://code.claude.com/docs/en/best-practices)

## Explore, plan, then code

OpenAI's best practices guide for Codex suggests four things in each prompt: the goal, the context (files, docs, examples or errors), the constraints and when the task counts as done. When a task is complex, ambiguous or hard to describe, the guide recommends asking for a plan before any code. In Codex, Plan mode, toggled with “/plan” or Shift+Tab, lets the agent gather context, ask clarifying questions and build a plan before implementing.

When you are not sure what you want yet, ask the AI to interview you before it edits anything. Both guides suggest this, and OpenAI's adds that it should challenge your assumptions. Anthropic's shows a request to add rate limiting to a public API that ends with “Interview me until you could write the spec, then write it to SPEC.md.” The guide then recommends a fresh session to build from that file, with a clean context.

[OpenAI: Codex best practices](https://learn.chatgpt.com/guides/best-practices)

Related

[Coding with AI for beginners: a step-by-step guideCoding with AI for beginners: what 2025 data says to expect, a first project, basic Git, a safe routine and your first steps in Arara Code.](https://arara.code.app.br/en/articles/coding-with-ai-for-beginners)

## AGENTS.md and CLAUDE.md: instructions agents read on their own

Rules that apply to every request do not belong in each prompt. AGENTS.md is an open format that its official site describes as a README for agents, used by over 60,000 open-source projects. Create the file at the root of the repository with what an agent needs: a project overview, build and test commands, code style, testing instructions and security considerations. In a monorepo, the nearest file takes precedence.

Claude Code reads CLAUDE.md at the start of every session, and its docs say it can also read a repository's AGENTS.md when there is no CLAUDE.md. Put build and test commands and project conventions there. Write instructions you can verify: “Run npm test before committing” instead of “Test your changes.” The docs recommend under 200 lines per file, and in both Claude Code and the Codex CLI, “/init” generates a first version.

[AGENTS.md: open format for coding agents](https://agents.md/)

## How to apply these prompt rules in Arara Code

In the Arara Code side chat, hand over context instead of describing it. Select code and press Ctrl+L, or right-click a file in the explorer and choose “Add to chat.” The “@” menu adds images, such as a screenshot of an error, and the project's “Code map.” If the AI asks questions, as you requested in the plan, answer them in the chat. While it works, follow the task list and approve or refuse each edit and command.

For simple tasks, such as a rename across a few files, choose a lower effort in the platform · model · effort picker; Anthropic's guide says higher effort spends more time and tokens. Before you send, check that the request states the goal, points to the files and says how to verify the result, that large tasks start with a plan and questions, and that fixed rules live in AGENTS.md or CLAUDE.md. Then run the tests and review the diff before committing.

[Arara Code: public IDE repository](https://github.com/arara-ide/arara-code)

## Sources and further reading

- [Anthropic: Claude Code best practices](https://code.claude.com/docs/en/best-practices)
- [OpenAI: Codex best practices](https://learn.chatgpt.com/guides/best-practices)
- [AGENTS.md: open format for coding agents](https://agents.md/)
- [Claude Code docs: memory and CLAUDE.md](https://code.claude.com/docs/en/memory)
- [Arara Code: public IDE repository](https://github.com/arara-ide/arara-code)

[Read as Markdown](https://arara.code.app.br/en/articles/prompts-for-coding-with-ai.md)

## Keep exploring

### [How to switch from VS Code or Cursor to Arara Code](https://arara.code.app.br/en/articles/switch-from-vs-code-or-cursor)

How to switch from VS Code or Cursor to Arara Code: what the import brings, how to check extensions on Open VSX, your AI CLIs, and a one-afternoon plan.

[Read the guide](https://arara.code.app.br/en/articles/switch-from-vs-code-or-cursor)

### [Arara Code vs Kiro: assistants or a spec-driven workflow?](https://arara.code.app.br/en/articles/arara-code-vs-kiro)

Compare Kiro specs, steering and hooks with Arara Code’s integrated assistants, Code-OSS editor and WhatsApp workflow. Includes official sources.

[Read the guide](https://arara.code.app.br/en/articles/arara-code-vs-kiro)

## Make room for your next idea.

Get to know Arara Code in your own project. Start with the installer and review the changes your assistant makes.

Download Arara Code
