Strong Instruction-Following Models: Time to Clean Up Your Skills and AGENTS.md

    As models get better at following instructions, the old "compensating" configurations in Skills and AGENTS.md start to backfire. This article explains why overly broad triggers and mandatory reading lists now slow tasks down, and offers four cleanup principles: use specific actions instead of categories, load context only when needed, split rules into global, repository, and task layers, and measure results. It includes practical rewrites, a layered AGENTS.md example, acceptance metrics, common pitfalls, and a step-by-step rollout checklist.

    Strong Instruction-Following Models: Time to Clean Up Your Skills and AGENTS.md

    1. Why “Past Experience” Suddenly Stopped Working

    In the early days of AI coding tools entering real development workflows, mainstream models had limited instruction-following ability and were inconsistent about proactively retrieving project information. To make up for this, engineering teams widely adopted two kinds of “compensating configurations”:

    • Triggering a Skill with broad keywords, hoping “better to over-trigger than to miss”;
    • Writing mandatory actions into AGENTS.md, such as requiring the model to read the architecture, database, and deployment docs before every change.

    These practices were reasonable at the time. But once the model’s instruction-following strength improved significantly, the same configurations turned from a “safety net” into a “shackle”: the model no longer treats these rules as vague suggestions, but as hard processes that must be executed word for word. The result is that tasks are repeatedly interrupted, context is filled with meaningless content, progress slows down, and the probability of hallucination rises.

    To summarize this shift in one sentence: in the past, the model didn’t listen, so you had to write more; now the model listens too well, so you have to write precisely.

    2. Two Typical Negative Optimizations and Their Causes

    2.1 Overly Broad Skill Triggers Cause Over-Triggering

    A common pattern is to describe the trigger scenario as a broad category, for example “use when working with databases, queries, models, or persistence.” The problem is that these words cover almost the majority of everyday development changes: changing an ORM field, fixing a query, or adjusting a return structure could all be judged as “related.”

    Once judged as related, the subsequent migration rules, checklists, and reference materials enter the context in full. The real task might only require changing three lines of code, but the model goes through the entire process, and may even proactively ask to confirm the migration plan, forcing the task to pause.

    2.2 Mandatory Reading Lists in AGENTS.md

    Another high-frequency configuration is “must read certain docs before every edit.” Early on, this significantly improved output quality, but under strong instruction-following models, it becomes a fixed cost executed each time: read once for one string change, read again for the second change. Context expands rapidly, attention is diluted, and long tasks are more prone to contradictions and speculation.

    3. Four Principles for the Cleanup

    1. From “category” to “specific task”: trigger conditions should describe a determinable action, not an abstract domain.
    2. From “every time” to “when necessary”: change unconditional mandates into on-demand loading with preconditions.
    3. From “stacking” to “layering”: maintain global rules, repository rules, and task rules separately to avoid bloat in one place.
    4. From “write and forget” to “measurable”: use trigger rate, context usage, and task completion time for acceptance.

    4. How to Rewrite Skill Trigger Conditions

    The core of the rewrite is to make trigger conditions “determinable”: the model can clearly answer “does the current action match,” rather than relying on semantic association.

    1. # Before (too broad)
    2. Use when working with databases, queries, models, or persistence.
    3. # After (narrowed to a specific action)
    4. Use when adding or changing a migration file, or reviewing its rollout plan.

    Key points for rewriting:

    • Start with a verb and point to a clear artifact (migration file, rollback script, release checklist);
    • Use exclusion to describe scenarios that do not apply, reducing misjudgment;
    • Change reference materials from “auto-load” to “reference on demand after a match.”

    5. Streamlining and Layering AGENTS.md

    It is recommended to split a single large file into three layers:

    • Global layer: keep only stable constraints such as language style, commit conventions, and prohibitions;
    • Repository layer: directory conventions, build and test commands, dependency management;
    • Task layer: temporary notes strongly related to the current change, cleaned up when the task ends.
    1. # Global
    2. - Keep changes minimal; do not do unrelated refactoring.
    3. # Repository
    4. - Run the dependency install command before running tests.
    5. # Load on demand (read only when matched)
    6. - Only when the change involves table structure, read the data model documentation.

    The key is to change “unconditional reading” into “read after a condition matches,” and to split documents into small pieces so the model only takes the fragments it needs.

    6. Context Budget and Acceptance Metrics

    The cleanup cannot rely on feeling; it is recommended to establish a simple, quantifiable acceptance method:

    • Trigger accuracy: sample and count the proportion of Skill matches that are truly necessary;
    • Context increment: the average length of reference content added per task;
    • Task duration and rework rate: compare completion time and number of second edits before and after the rewrite;
    • Number of interruptions: count the frequency of the model proactively pausing to ask.

    If a metric gets worse after the rewrite, it means the rules are still too vague or the layering is unreasonable, and further tightening is needed.

    7. Common Pitfalls

    • Deleting all rules: stable constraints still need to be kept, otherwise output style and safety will degrade;
    • Only changing wording, not structure: still stacking in one file, the bloat problem will recur;
    • Making a big change all at once: it is recommended to roll out gradually by repository in batches, making it easier to locate problems;
    • Ignoring task-layer cleanup: leftover temporary rules are a hidden source of context bloat.

    8. Implementation Checklist

    1. Inventory existing Skills and AGENTS.md, and mark “unconditional mandatory” items;
    2. Rewrite broad categories into specific actions and add exclusion conditions;
    3. Split into global, repository, and task layers, and remove duplicate constraints;
    4. Split large documents into small fragments and change to on-demand loading after a match;
    5. Run regression tests with a unified task set and record the four acceptance metrics;
    6. Establish a quarterly review mechanism to continuously adjust as model capabilities change.

    Conclusion

    Strong instruction-following ability does not mean writing more configurations, but making every rule more accurate and more determinable. Changing “do it every time” to “do it only when matched,” changing “broad category triggers” to “specific action triggers,” and changing a “single large file” to “layered on-demand loading” lets you spend tokens on real engineering judgment. In engineering practice on platforms such as Baidu AI Cloud, this kind of context governance is likewise foundational work for improving the output stability and cost efficiency of AI coding tools.