MODULE 3.1 / 5 OF 8
AGENTS, Skills and memory
Create project instructions and a reusable capability with a review criterion.
1AGENTS.md guides execution
What it is
AGENTS.md is the instruction file that Codex discovers in the applicable scope. It describes how to work: initial files, verification commands, limits and delivery format. No need to explain the whole organization history; prefer short rules that change a real decision.
Why learn
Objective instructions avoid repeating the same details in each conversation. The file should help the agent choose a concrete action, such as verifying the report before considering it finished.
Key concepts
Operational instruction; scope; observable rule; conciseness.
In practice
“Be excellent” is hard to test. “Compare the total of the report with vendas.csv and indicate the difference” defines an action and its evidence.
✓ Do it
Write five rules. For each one, ask: can I observe if it was fulfilled? Remove guidelines that do not change the work.
✗ Avoid
Accepting a conclusion without checking the input that supports it.
2Global and project complement each other
What it is
By default, ~/.codex/AGENTS.md stores global instructions. In the project, AGENTS.md adds specific rules; files in closer folders can prevail in the corresponding scope. AGENTS.override.md has priority over AGENTS.md at the same level. This does not override system instructions, permissions or the explicit request of the session.
Why learn
Path matters. A local rule may not apply to another folder, and a forgotten override file can explain unexpected behavior. Keep the global small and leave local details in the project.
Key concepts
Discovery; hierarchy; directory scope; override.
In practice
Global: “report the tests executed”. Project: “validate the CSV with python3 validar.py”. Both instructions collaborate; it is not necessary to repeat the script of each project in the global file.
3Skills package procedures
What it is
A Skill gathers instructions for a recurring activity, with name and description at the beginning of SKILL.md. It may include supporting resources and programs. Personal skills reside in ~/.agents/skills; project skills can be in .agents/skills within the repository. The ~/.codex folder remains Codex configuration.
Why learn
A rule says what to respect; a Skill teaches a procedure that can be triggered when needed. Separating these roles avoids loading the entire manual into every task.
Key concepts
Name; trigger description; procedure; input and output; validation.
In practice
relatorio-semanal receives a fictitious CSV, calculates a verifiable total and produces a Markdown with pending items. The description makes clear that it does not automatically send the result.
Sequence to try
- Prepare a training copy.
- Read materiais/SKILL-relatorio.md. Create the indicated folder and save the file as SKILL.md, keeping the header delimited by ---.
- Record the observed result and the next correction.
4Memory needs maintenance
What it is
The course's operational memory is a set of queryable files, not a change to the model weights. It works when the agent reads the relevant information and when someone keeps that information up to date. Store stable facts, decisions and causes of failures; do not preserve every sentence of every conversation.
Why learn
Copying the entire history increases volume and can reintroduce old instructions. A small, dated and reviewed memory helps more than a massive file that no one can validate.
Key concepts
External memory; explicit query; summary; validity; source.
In practice
A teacher notes that the class materials use accessible language and fictitious examples. In the next task, reference this file instead of repeating the whole conversation about the class.
✓ Do it
Include in memoria.md three useful facts and a review date. In the next task, ask the agent to cite which fact was used.
✗ Avoid
Mix the training copy with private files or production work.
5Failures become small protections
What it is
Record the symptom, the observed cause, the minimal fix and how to verify. Differentiate failure of request, such as ambiguous objective, from infrastructure failure, such as a terminated process. The record only generates operational learning when it changes the next procedure.
Why learn
Redoing the whole project can mask a simple problem. A small protection, like checking for a file's existence before reading, is usually easier to test and maintain.
Key concepts
Symptom is not cause; minimal correction; prevention; evidence.
In practice
The report came out empty because the CSV had no rows. The safeguard is to validate the header and number of records before generating the report, not to switch models.
6Test reusable capability
What it is
Test the Skill with a normal input, another incomplete one, and one out of scope. Observe whether the result preserves data, signals uncertainty, and stops when it should. The test should measure behavior, not just look for the Skill name in the response.
Why learn
A procedure that works once may be relying on accidental context. Varying inputs helps discover what needs to be made explicit in the instructions.
Key concepts
Normal case; incomplete case; scope limit; acceptance criterion.
In practice
Incomplete input: missing a sale value. Expected: do not invent the number and separate known total from pending. Out of scope: ask for client submission; expected: prepare only a draft.
Criteria to review your delivery
Use this rubric after the lab. Each line asks for evidence; checking reading does not mean the practice was performed.
| Criterion | Expected evidence | If not passed |
|---|---|---|
| Scope | The delivery matches the objective of this class. | Reduce the task and name a single result. |
| Inputs | You know which files or data were used. | List the sources and remove unrelated material. |
| Execution | The procedure was carried out in the training environment. | Differentiate what was planned from what was done. |
| Verification | A result was compared with a reference. | Open the file or repeat the verifiable query. |
| Secrets | No token, password, or private data was shared. | Review the work copy before any submission. |
| Continuity | Another person can find the next step. | Update README and record a concrete pending item. |
GET HANDS-ON / ~15 MIN OR IN STEPS
Your first reporting Skill
Use fictional files and a training folder. Practices involving installation, Telegram or VPS may require additional time for registration and configuration.
Example Skill
Read the block before using. Fields like Your Name and usuario@ip-da-vps are examples to adapt; administrative commands belong only to your training environment.
--- name: relatorio-semanal description: Generate a draft report from the provided CSV, without external transmission. --- 1. Read the README and the specified CSV. 2. Validate header, values and empty lines. 3. Calculate totals without inventing missing data. 4. Generate Markdown with sources, total and pending items. 5. Compare the total with the sum of the entries. 6. Stop before sending or publishing.
Ready criterion
Create project instructions and a reusable capability with a review criterion. Record the produced file, the executed test, and the observed result.
Open lab files and modelsCheck what remained
Writing “do not leak secrets” in AGENTS.md replaces file permissions?
View commented answer
No. Instructions guide; permissions and isolation restrict what the tool can access.
If your answer was different, return to the corresponding topic and write the difference in one sentence. The check does not block your study.
Module summary
- Operational instruction; scope; observable rule; conciseness.
- Discovery; hierarchy; directory scope; override.
- Name; trigger description; procedure; input and output; validation.
- External memory; explicit query; summary; validity; source.
- Symptom is not cause; minimal correction; prevention; evidence.
- Normal case; incomplete case; scope limit; acceptance criterion.
Consult the source
Tools verified on 20/09/2026; screen names and availability may change.