Skills and AGENTS.md Cleanup Guide for Next-Generation Instruction-Following Models
As models become better at following instructions, accumulated Skills and AGENTS.md files can slow tasks down instead of helping. This article explains why overly broad triggers, mandatory pre-reading, and conflicting rules cause context bloat, and how to fix them. You will learn how to inventory rule assets, rewrite triggers around actions and deliverables, switch to on-demand document retrieval, and validate changes with observability metrics.
1. The Problem: Better Instruction-Following Can Backfire
As AI coding tools enter a new generation, a counterintuitive pattern keeps showing up: the better a model follows instructions, the more accumulated Skills and AGENTS.md files can slow tasks down. Earlier models applied constraints such as “always read the architecture document” or “run the migration workflow whenever the database is involved” fairly loosely, so developers rarely noticed the cost. The current generation treats every rule as a hard constraint, turning fallback advice into a mandatory workflow that fires on every task.
The industry has reached a similar conclusion. A cloud provider’s official prompting guidance for its next-generation model states that stronger instruction-following makes the model more susceptible to Skills and project-level instruction files in the context. Vague, conflicting, or overly broad rules can make the model pause early, repeatedly ask the user for confirmation, or block the task outright. This matches the saying that “if learning is slow, skip it”: rule assets must evolve alongside model capabilities, or the more you accumulate, the heavier the debt becomes.
2. Root Causes: Three Kinds of Rules That Cause Context Bloat
2.1 Overly Broad Triggers Over-Activate Skills
A typical anti-pattern is a broad capability-domain description, such as “Use when working with databases, queries, models, or persistence.” The problem is that terms like “database,” “model,” and “query” cover a huge surface area: changing a single ORM field or adjusting one query condition can be judged as related to the migration workflow. Once a Skill is activated, its bundled migration standards, checklists, and reference material are injected into the context in full, and every subsequent step carries that baggage.
A tighter version points to concrete actions and deliverables, for example: “Use when adding or changing a migration script, or reviewing its rollout plan.” This binds the trigger to a task boundary that can be evaluated, preventing unrelated changes from repeatedly pulling a heavy workflow into the context.
2.2 Mandatory Pre-Reading Turns a Fallback Into Fixed Overhead
Another common rule requires reading three documents—architecture, database, and deployment—before every edit. That rule was born when early tools did not proactively retrieve project material, so teams relied on forced reading as a fallback. Under instruction-following models, it becomes a fixed cost paid on every pass: read once for a string change, read again for the second change. Tokens and latency rise together, context expands quickly, and the probability of hallucination increases.
2.3 Conflicting Rules and Overlapping Scope
When multiple Skill descriptions overlap, or when project instructions and global rules assign different priorities, the model often takes the more conservative path: pause, ask, wait for confirmation. The more conflicts there are, the more likely a task stalls at the first step.
3. Governance: Treat Rules as Code Assets That Need Ongoing Maintenance
3.1 Build a Rule Inventory With Owners
Consolidate Skills, project instructions, and template files scattered across directories into an inventory that records purpose, trigger conditions, owner, and last update time. Any rule without an owner goes into a cleanup queue by default.
3.2 Change Triggers From “Domain Words” to “Action + Deliverable”
Prefer verifiable verb phrases and state explicit exclusions. An illustrative example:
# Anti-pattern (scope too broad)Use when working with databases, queries, models, or persistence.# Recommended (action + deliverable + exclusions)Use when adding or changing a migration script, or reviewing its rollout plan.Do not use for read-only query tuning or field rename without schema change.
3.3 Replace Mandatory Pre-Reading With On-Demand Retrieval
Turn “always read” into conditional triggers and cache reuse:
# Anti-patternBefore every edit, read architecture.md, database.md and deployment.md.# RecommendedRead architecture.md only when the change crosses module boundaries.Reuse already-loaded documents within the same task; do not reload.
3.4 Deduplicate, Merge, and Downgrade
Keep one authoritative statement per constraint and turn the rest into references. For rules with unclear benefit, downgrade them to advisory descriptions first, observe token usage and task completion rate over one iteration, then decide whether to delete or rewrite them.
3.5 Validate With Observable Metrics
Track at least four metrics: context growth per task, Skill trigger count and hit rate, number of task blocks and clarification requests, and task completion time. If a rule’s metrics do not improve after rollout, treat it as ineffective debt.
4. Rollout Cadence and Team Norms
Approach cleanup as inventory → tiering → rewrite → canary → standardization. First, tier rules by impact into mandatory, advisory, and deprecated. When rewriting, use a consistent three-part structure: trigger condition + action + exclusions. Validate metrics on a small set of repositories during the canary stage. Finally, fold rule review into the code review process and check rules alongside dependency upgrades.
In engineering practice on cloud platforms such as Baidu AI Cloud, this kind of governance is typically combined with common capabilities like log services, monitoring and alerting, and container platforms: build an observability dashboard for rule triggers and task duration, and let data drive rule iteration rather than adding or removing rules by feel.
5. Conclusion
Next-generation instruction-following models do not make old rules obsolete automatically; they simply execute old rules more faithfully. The value of Skills and AGENTS.md depends on whether boundaries are clear, whether triggers are verifiable, and whether rules are continuously maintained. Manage rules like code, define triggers with actions and deliverables, and validate benefits with metrics—that is how you make the context budget actually serve the task.
