How to Clean Up Skills and AGENTS.md for Strong Instruction-Following Models
As newer LLMs follow instructions more literally, broad Skill triggers and mandatory document reads in AGENTS.md can slow agents down and bloat context. This article explains why stronger instruction following makes vague rules counterproductive, shows two common problem patterns with fixes, and outlines a four-step cleanup: audit rules, narrow triggers to action verbs, lazy-load documentation, and remove conflicts. It also discusses a shift in context engineering from piling on rules to precise delivery.
How to Clean Up Skills and AGENTS.md for Strong Instruction-Following Models
Introduction: When Strict Constraints Become Negative Optimization
In the early days of agentic coding tools, models rarely retrieved project context on their own. To compensate, the developer community accumulated a large set of “mandatory prompts”: placing an AGENTS.md file in the project root to require the model to read architecture docs before every edit, or defining Skills with broad trigger conditions in the hope that the model would automatically load best practices in specific scenarios.
With the significant improvement in instruction-following capabilities in a new generation of large language models, these legacy configurations are now producing the opposite effect. Stronger instruction following means the model executes every rule you write extremely strictly and literally. Vague instructions originally intended as a safety net now slow progress, waste tokens, and worsen context bloat. The industry is re-examining this rule system, and a major cleanup of Skills and AGENTS.md is overdue.
1. Root Cause: Why Are Strong Models Easier to Mislead?
To understand why a cleanup is necessary, you first need to clarify the fundamental difference between weak and strong models when handling contextual instructions.
From Selective Ignoring to Absolute Compliance
Earlier models had a degree of “fuzzy handling” when facing conflicting or redundant instructions, sometimes selectively ignoring unreasonable constraints. The new generation treats instruction following as a high-priority task. When broad rules exist in the context, the model treats them as hard gates that must be executed unconditionally.
The Chain Reaction of Context Bloat
Every unnecessary Skill trigger forcibly stuffs related migration rules, checklists, and reference material into the context window. The longer the context, the more severely key information is diluted and the higher the probability of model hallucinations. This creates a vicious cycle: the more complete the rules, the dirtier the context, and the worse the output quality.
2. Typical Problems: Two Types of “Bad Rules” That Must Be Removed
In existing project configurations, two types of rules are typical sources of negative optimization and should be investigated first.
Problem 1: Skills with Overly Broad Triggers
Many Skills use a large number of general technical terms in their trigger descriptions, leading to a high false-trigger rate.
Bad example:
name: database-migration-skilltrigger: Use when working with databases, queries, models, or persistence.
Analysis: When you only want to change a string attribute on an ORM model or optimize an ordinary query, words like models and queries lead the model to misjudge the task as highly related to database migration. As a result, an unnecessary migration check process is activated and a large amount of irrelevant instructions floods the context.
Fix: Tighten the trigger from “broad domain words” to “specific action words.”
trigger: Use only when adding or changing a migration file, or reviewing its rollout plan.
Problem 2: Indiscriminate Mandatory Read Constraints
The common AGENTS.md rule to “read all documents before every edit” is a pure token black hole in the era of strong models.
Bad example:
Before every edit, read architecture.md, database.md, and deployment.md.
Analysis: Even to fix a typo, the model faithfully loads all three long documents in full. Two consecutive code changes cause the documents to be loaded six times. This not only makes response speed decline linearly but also rapidly fills the context window with low-information-density documents.
Fix: Introduce conditional logic and on-demand retrieval instead of mandatory full reads.
Only consult architecture.md if the change involves module boundaries or public interface definitions.
3. Systematic Refactoring: Four Steps to Reduce Context Load
To address the problems above, developers need a structured refactoring methodology.
Step 1: Build a Rule Audit Checklist
Go through all Skill definitions and AGENTS.md files in the project and annotate each rule: What specific failure scenario does it solve? If you remove this rule, will a strong model naturally do it right? If the answer is “yes,” delete it directly. Remember the developer saying: if you learn slowly enough, you don’t have to learn—the general engineering common sense that strong models carry often already covers many rules that early setups needed to hardcode.
Step 2: Narrow the Semantic Boundary of Triggers
Rework all Skill trigger descriptions into verb form. Prohibit state descriptions like working with... and related to..., and use explicit action descriptions like adding, removing, and debugging, with the qualifier only when, cutting off false-trigger paths at the semantic level.
Step 3: Lazy-Load Documentation
Abolish time-triggered rules like “Before every edit.” Switch to “information-gap triggers”: retrieve docs only when the model is about to make a decision that lacks necessary background. At the same time, split huge documents into fine-grained knowledge chunks and use retrieval augmentation to fetch them on demand, avoiding loading whole files.
Step 4: Conflict Detection and Deduplication
Strong models pause and ask the user when they encounter contradictory rules, and may even block the task. Make sure there is no logical overlap between AGENTS.md and individual Skills. For example, if a global rule already requires “run tests before committing,” do not redefine the same test steps inside a specific Skill.
4. A Configuration Philosophy for the Future
As computing power and model capabilities continue to evolve, the focus of context engineering is shifting: from “piling up rules” to “precise delivery.”
Developers should view the large model as a highly capable but extremely rigid new colleague. You don’t need to teach it how to write code; you only need to hand it a narrowly scoped note right before the one specific action where it is about to make a mistake. For enterprise applications, cloud platforms such as Baidu AI Cloud offer log services and monitoring and alerting capabilities that can quantitatively analyze Skill trigger frequency and token consumption, using data to drive the continuous slimming of rules.
In short, stop adding rules immediately and start subtracting. Remove those broad trigger words and mandatory read commands, and let strong models unleash their real productivity in clean, precise contexts.
