Spring Cleaning for Agent Configs: A Practical Guide to Refactoring Skills and AGENTS.md for GPT-6 Astra

As models grow more capable, the repository rules once written to scaffold weaker predecessors are now actively holding them back. This guide turns OpenAI Developers' recommendations into four actionable refactors: narrowing skill descriptions, turning AGENTS.md from mandatory reading into an on-demand index, granting explicit authority in safe environments, and encoding definitions of done directly into task prompts—complete with verification checks for every step.

By OpenAI Developers09-12 · 12 min read

For a long time, developers kept coding agents like Codex producing reliable code by packing repositories with guardrails: exhaustive recipes, strict mandates to read all architecture documentation before modifying files, and defensive instructions requiring approval before every single step.

With the upgrade to GPT-6 Astra, these once-effective practices have turned into technical debt. Legacy configurations have transformed from safety nets into bottlenecks. The core driver behind this shift is a generational leap in model capability: Astra features significantly improved comprehension, safety alignment, and context awareness. Traditional "helicopter-parent" scaffolding now wastes valuable context window space, introduces conflicting constraints, accidentally triggers irrelevant workflows, and causes highly safety-aligned models to stall out unnecessarily.

This guide walks you through systematically pruning outdated repository configs. You can audit your projects directly across skills, AGENTS.md, permission boundaries, and task prompts.


Why Stronger Models Make Legacy Configs a Burden

Before editing configuration files, it helps to understand the foundational principle behind the official recommendations: transition from hand-holding constraints to autonomous judgment and on-demand routing.

Common configurations from the past year suffer from three flaws that become magnified under more capable models:

First, context pollution and truncation risk. Many teams configure dozens of skills per project, writing lengthy descriptions for each. When too many skills are registered, Codex aggressively truncates the summaries surfaced to the model. The model receives incomplete fragments, and overlapping trigger phrases frequently cause incorrect skills to load. Once a bloated skill file enters the context, it triggers early context compaction, pushing out genuinely valuable development history.

Second, rigid recipes restrict high-level reasoning. Older models frequently missed edge cases and required step-by-step recipes; Astra, however, handles ambiguous intent and complex domain logic with ease. Overly prescriptive instructions add unnecessary token overhead and constrain the model's problem-solving flexibility.

Third, over-conservatism caused by safety alignment. Astra is exceptionally well-aligned and exercises sound judgment, meaning it hesitates to proceed when boundaries are unclear. If repository rule files still contain stern legacy warnings—such as "do not perform any action without prior approval"—Astra will follow them literally, pausing for confirmation during completely benign local test runs or standard file edits.

With these dynamics in mind, the refactoring roadmap is straightforward: keep entry points lightweight, retrieve documentation on demand, grant clear operational permissions, and define explicit criteria for completion.


Step 1: Streamline and Refactor Skills

First, clarify what you are modifying: a skill is essentially a prompt stored as a Markdown file, optionally bundled with assets and scripts. It is best suited for guiding a specific workflow or integrating with dedicated external tools.

Audit the skill definition files across your repository. Recent updates to the official $skill-creator guidelines emphasize a single overarching directive: make skills dramatically leaner.

Condense trigger descriptions: A skill's name and description reside permanently in the model's context index. Descriptions must remain concise and strictly specify when the skill should be invoked. Avoid packing every tangentially related keyword into the description just to avoid misses.

Bad example:

Create and validate Postgres schema migrations. Use when working with databases, queries, models, or persistence.

Good example:

Create and validate Postgres schema migrations. Use when adding or changing a migration, or reviewing its rollout.

Explanation: The bad example treats writing queries, updating data models, and general persistence tasks as triggers. As a result, whenever the agent touches database-related code, it mistakenly pulls the entire migration skill into context. The good example narrows the scope specifically to adding, modifying, or reviewing migrations, firing only when migration work actually takes place.

The longer your description, the less the model sees

Description written in your skill

migrations Create and validate Postgres schema migrations. Use when working with databases, queries, models, or persistence.
api-tests Complete toolkit for REST and GraphQL endpoints. Use whenever you touch routes, schemas, controllers, or clients.
docker Container management skill. Use for any container, Dockerfile, Compose, deployment, or infrastructure task.

Striped area = Exceeds the runtime budget reserved for descriptions

Description actually seen by the model

migrations Create and validate Postgres schema migrations. Use when working with…
api-tests Complete toolkit for REST and GraphQL endpoints. Use whenever you…
docker Container management skill. Use for any container, Dockerfile,…
  • All three stop right where “Use when…” begins, and the half that actually draws the boundary is gone.
  • The model is left guessing from the first half, so an ordinary query can still drag the whole migration skill into context.
  • A wrongly loaded skill keeps eating tokens and pushes still-useful working context into compaction early.

So the first piece of official advice is not “write fewer skills” but cut the description to one or two sentences that say only when to use it — short enough to escape truncation is what keeps the boundary intact.

Practice Progressive Disclosure: Reading skill documentation consumes context tokens. For complex skills covering multiple workflows, the root document should function strictly as a lightweight router, directing the model to secondary documents or standalone scripts as needed, rather than dumping every operational procedure into the entry file.

Prune procedural recipes and consider multi-model teams: Remove granular, hand-holding steps and give Astra room to leverage its own reasoning. However, account for team dynamics: if your repository also accommodates teammates whose agents run legacy models such as GPT-5.6 Sol or Luna, rigid constraints retained for older models can over-constrain Astra. Balance the structure of shared skills against the models active across your team.

Verification: Inspect the list of skills loaded by Codex to confirm that every description displays in full without being truncated by the engine. When writing routine database queries or business logic, verify that the agent no longer errantly loads the schema migration skill.


Step 2: Overhaul the Documentation Index in AGENTS.md

Open AGENTS.md at the root of your project. This file serves as the agent's persistent, repository-wide operational brief; audit every single directive inside it.

Shift from mandatory reading to on-demand lookup: Older setups frequently forced the agent to read multiple specification documents before touching any code. When fixing a typo or updating a constant, this approach is extremely wasteful. Astra is fully capable of deciding which background context a specific task actually requires.

Bad example:

Before every edit, read architecture.md, database.md, and deployment.md.

Good example:

Use architecture.md for service boundaries, database.md for schema changes, and deployment.md when preparing a deployment.

Explanation: The bad example mandates reading architecture, database, and deployment documents before every single edit, burning tokens and slowing down response latency. The good example converts documentation into a contextual index, pointing the agent to specific files only when adjusting service boundaries, updating schemas, or preparing a release. Ensure that any indexed documents are actively maintained and up to date.

Remove redundant testing nudges: Older models often declared a task finished immediately after generating code, leading past AGENTS.md guidelines to insist that "tests must be run and results inspected after any modification." Astra handles testing autonomously and initiates self-checks unprompted; keeping repetitive testing reminders often causes it to trigger redundant test suites.

Verification: Issue a minor task (such as updating a docstring) and check the interaction trace. Confirm that the agent goes straight to the target file without blindly loading architectural docs or running full regression suites.


Step 3: Reset Permission Boundaries and Local Test Execution

Review the permission and approval clauses in AGENTS.md and global rules to remove outdated restrictions.

Tone down overly defensive language: To prevent older models from taking unauthorized actions, developers often added rigid commands like "never make any modifications without explicit human permission." For a more discerning model like Astra, defensive language makes the agent overly hesitant, causing it to pause repeatedly during completely safe operations. Remove blanket stopgaps that were introduced purely out of distrust for weaker models.

Explicitly authorize execution in safe environments: Astra works thoroughly, but its caution can make it conservative about taking subsequent steps autonomously. It needs explicit permission to keep moving forward. For safe scenarios like local tests that carry zero production risk, grant continuous execution authority directly in AGENTS.md.

Permission grant example:

The local tests use disposable fixtures and have no production access. Run them, fix failures caused by the requested change, and rerun affected tests without asking for approval at each step.

Explanation: This configuration communicates two critical points: local test runs carry no production impact, and the model is explicitly instructed to run tests, inspect failures, patch code, and re-verify without interrupting the user for approval at every single micro-step.

Verification: Introduce a code change that deliberately breaks a unit test. Confirm that the agent autonomously completes the loop—modifying code, spotting test failures, applying fixes, and re-running tests until green—without stopping to request manual approval.


Step 4: Refine Task Prompts with Clear Definitions of Done

Beyond static configuration files, daily prompting habits require a corresponding shift.

Front-load the Definition of Done: Many developers grew accustomed to GPT-5.6 Sol running long execution chains on minimal guidance. When moving to GPT-6 Astra, it may initially appear more conservative—often pausing after writing a first draft to await user review.

If your task requires running the code, checking runtime output, and fixing errors, state those expectations explicitly as completion criteria in the initial task prompt. Do not leave room for the assumption that stopping after an initial draft is acceptable, unless a human decision is genuinely required at that milestone; unnecessary pauses push the model into premature termination.

When requesting exploratory work, avoid vague prompts like "try a few different options." Instead, outline the specific directions to explore and clearly define the criteria for when to converge and stop.

Verification: After submitting a task, observe whether Astra completes end-to-end verification and testing rather than stopping at an unverified draft, returning only after validating the complete result.


Quick Rollout: Let GPT-6 Astra Audit Your Repository

You do not need to comb through legacy configuration files entirely by hand. The fastest path forward is having GPT-6 Astra run a repository compliance audit directly.

Repo audit: check the issues you have to narrow down the audit prompt below

Works without checking any boxes—defaults to a comprehensive six-point audit. Checking boxes simply focuses the scope on areas you need to fix.

Audit against your repository
Scope: all six checks
Audit the skills, AGENTS.md, and common task prompts in this repository against the GPT-6 Astra configuration guidance.

Focus on the following:
1. Review every skill description. Flag the ones that are too long or trigger too broadly, and rewrite them into one or two sentences that state only when the skill applies, not what it can do.
2. For skills covering several workflows, propose splitting them into a minimal router root file with supporting docs and scripts read on demand.
3. Find step-by-step recipe instructions and judge which can be left to your own reasoning and which genuinely need to stay.
4. Remove blanket "read these docs before every edit" rules from AGENTS.md and replace them with a contextual index saying which doc to consult in which situation.
5. Remove repeated nudges to run tests. Narrow blanket approval gates down to genuinely destructive or remote operations, and grant the isolated local test suite explicit permission to run, fix failures, and rerun without asking at each step.
6. Add a definition of done to common task prompts (get it running, inspect the output, fix failures until they pass) and drop unnecessary "stop for review after the first pass" requirements.

List the findings first: file path, current text, and proposed rewrite, side by side. Wait for my confirmation before you change anything.

This prompt deliberately instructs the model to produce an audit manifest before applying changes—the primary value of an audit lies in reviewing intended edits upfront. Review the proposed diff, approve the updates, and your configuration setup will be fully modernized.

Source
Rethinking skills and prompts for GPT-6 AstraOpenAI Developers·Read the source
Further reading
↑ End of article
✓ This article is free to read in full

Members can copy or download the full Markdown, and let their AI subscribe and ask.

Read the original ↗
📮 New explainers, straight to your inbox

Found this useful? Leave your email — every new explainer, the moment it's out. Unsubscribe anytime.