How to Clean Up Skills and Project Instructions in the Strong-Model Era

    Stronger instruction following makes overly broad agent skills and “always read everything” project rules slower, not safer. This article explains how to tighten skill triggers, route docs by task type, resolve conflicts with priorities, and verify the cleanup with small, non-migration, and real-migration tasks.

    Strong instruction following has changed the payoff of writing more rules.

    Early agents often missed repository notes and domain workflows, so teams wrote skills and project instructions widely: load anything that seemed related, and read architecture, data, and release docs before every change. That compensated for models that would not fetch context on their own.

    Once instruction following improved, the same style backfired. Models follow literal constraints: overly broad triggers dump entire skills, checklists, and references into context; “read before every edit” becomes a full reread for every small change. The usual result is not more stability but more delay: context grows, unrelated rules collide, the model stops to confirm, and a change that could have been a single diff turns into multi-turn Q&A. Tokens go to rereading and self-explanation; the actual code diff appears later.

    Cleanup is not deleting standards. It is stating when a rule applies, what to load, and when it is OK to stop. The rest of this article covers triggers, document routing, conflicts, and team process.

    How skills get over-triggered

    A skill is operational guidance injected when conditions match. Before starting, the model judges whether the task hits the described scenario. If the description uses broad terms such as “database, query, model, persistence,” almost any business change can be stretched to fit—object mapping, a query predicate, validation—and migration steps, rollback checks, and review checklists all enter context. Later reasoning happens inside that heavy rule set.

    Over-triggering has three direct effects.

    First, irrelevant constraints consume the window. The model plans around “might be useful” clauses instead of facts the current diff needs, and it more easily invents migrations, environments, or approvals that do not exist.

    Second, steps run too early. If a skill says inventory table structure then evaluate a release window, the model may follow that path even when only copy changes, producing pointless tool calls.

    Third, stacked skills conflict. One skill says “commit when done”; another says “ask first for any persistence-related change.” The model cannot satisfy both and pauses. Pause can be right for safety; if it comes from a too-wide match, it is a false positive.

    Tighten triggers with tasks, not domain nouns. Compare:

    Too broad: Use this skill when handling databases, queries, models, or persistence.

    Tight: Use only when adding or changing migration scripts, or when reviewing their release and rollback. Do not load this skill for ordinary query rewrites, mapping-field tweaks, or logic fixes that do not change table structure.

    The tight sentence answers three questions: what action, on which artifact, and what is excluded. Exclusions matter as much as inclusions; otherwise a strong follower still takes the widest reading.

    Replace “always read” with context routing

    Many project instruction files still keep an early template: before every edit, read architecture, data, and release notes. The motive is clear—do not miss boundaries, schema, or release constraints. For models that would not retrieve, forced full reads were a crude but effective patch.

    For models that execute strictly, that is billed reread labor. Changing one UI string still pulls in three long documents; the next similar tweak reads them again. If documents contain stale passages, the model tries to reconcile them. Hallucinations often get worse not from missing information but from too much inconsistent information, so the model “reasonably completes” service dependencies or release steps that do not exist.

    A more stable pattern is a simple routing table: by task type, load one source, and allow ordinary changes to require zero mandatory reads.

    • Adjusting service boundaries, module responsibilities, or call relationships: read the boundaries and dependencies sections of the architecture notes.
    • Changing table structure, indexes, or migrations: read the current schema and change conventions in the data notes.
    • Preparing release, rollback, or config switches: read the steps and checks in the release notes.
    • Copy, styling, or clearly local logic fixes: do not pre-read those documents; open them only if you discover a cross-module impact.

    Write “section or topic,” not “read the entire file.” Long documents should open with a short table of contents mapping sections to task types so the model can extract on demand. Instructions can add a stop condition: if the change does not touch the listed topics, stop after the table of contents; do not restate the full text just to “obey required reading.”

    Scope, priority, and conflicts so the model does not stall

    Strong followers are sensitive to vague scope. These sentence types most often freeze a task.

    Scope too wide: “Every change must satisfy all standards.” Standards have exceptions; if the model cannot rank them, it asks.

    No priority: “Must ask the user first” and “default to completing small changes autonomously” at once. Write: ask only when the action is irreversible, affects shared data, or the release window is unclear; otherwise state assumptions in the plan and continue.

    Checks without a done definition: “Fully review before changing.” The model keeps adding checks. Write observable completion: confirm whether table structure changes; if not, skip the migration checklist, edit, and run the existing tests related to that module.

    Duplicated skills: the same rule appears in project instructions, personal preferences, and skill text with slightly different wording. Keep one authoritative source; elsewhere say “see topic X” so three texts do not race.

    Prefer a short priority statement at the top of project instructions instead of stacked bans: safety and data correctness over formatting preferences; the task description over generic skills; a skill applies only when its trigger hits; if it does not hit, ignore that skill’s full text. The model then has an explicit trade-off instead of competing “musts.”

    An executable cleanup pass

    Do not wait for a model-version announcement. Replay recent real tasks to see which rules slow you down. Work in this order until each item is verifiable.

    1. List every skill trigger. Remove domain mega-words. Rewrite as action + artifact + exclusions. One skill should serve one workflow—migrations, API contracts, release checks—not a “backend catch-all.”

    2. Count “always, every time, any, all” in project instructions. Treat those words as suspicious by default. Turn them into conditionals where possible and add counterexamples.

    3. Split required reading into a route. Keep each document short; put “when to read, which section” at the top. Delete or mark stale passages; do not leave them for the model to reconcile.

    4. Merge duplicate rules. Keep one copy of each constraint; other places cite the topic name, not the full text.

    5. Set an ask threshold: irreversible operations, production data, permissions and secrets, external release. For local, reversible, test-covered edits, default to finishing and stating assumptions in the result.

    6. Verify with three regression tasks, not gut feel: (a) string or style change—expect zero skill hits and no long pre-reads; (b) query change without schema change—expect no migration skill; (c) a real migration or release—expect the matching skill and only the relevant sections. If (a) still fires a heavy workflow, the trigger is still too wide.

    7. Control skill body size. After trigger, context should get steps and checklists, not background prose. Put references behind “open if needed”; do not paste whole-repo conventions at the top of the skill.

    How to tell cleanup worked

    The signal is behavior, not shorter files. Watch whether similar small changes take fewer turns; whether pre-reads and irrelevant tool calls drop; whether mid-task questions cluster on truly irreversible points; whether the final diff carries less opportunistic refactoring and invented migrations. Shorter context usually improves both latency and stability because the model has less stale instruction to improvise on.

    Avoid over-correction. Over-fine routing and legalistic exclusions occupy the window too. Keep triggers to one or two conversational task sentences; put detail in the steps after a hit. Document routing is an index, not a second requirements spec.

    How this fits engineering process

    Instruction files are not a substitute for architecture. Service boundaries, schema changes, and release steps still belong in the matching docs and should update with code review; project instructions only say when to read them. If docs stay stale, even precise routing injects outdated facts. In review, treat “did we add a too-broad always/every time” as a check on par with code style.

    In enterprises these files are often shared. Version them in a common engineering standard: a change should say whether a new trigger overlaps existing skills, and sample the three regression tasks above. If you use a cloud development and collaboration environment, keep instructions, skills, and sample tasks in the same repo as the code. Cleanup is a text-and-process problem; it does not require vendor-specific APIs. Environments such as Baidu AI Cloud can store and run the standards and task replays; the cleanup itself does not depend on a proprietary interface.

    A minimal structure:

    Task type and load:

    • Service boundaries: architecture notes, boundary section
    • Schema change: data notes, schema and migration conventions
    • Preparing a release: release notes, steps and rollback
    • Local defects: default no pre-read

    Skill trigger example:

    • Enable only when adding or changing a migration, or reviewing its rollout and rollback
    • Does not apply to queries, mappings, or UI changes that do not alter table structure

    Ask threshold:

    • Stop only for irreversible work, shared data, permissions, or unclear external release
    • Otherwise state assumptions and continue

    Conclusion

    Slow learning is not an advantage, and writing wide is not rigor. The more willing the model is to follow, the higher the cost of fuzzy rules. Narrow skills from domain mega-words to concrete tasks, shrink required reading from “three files every time” to “one section on demand,” and give conflicts a priority. Project instructions become an accelerator again instead of a fixed tax on every change. After cleanup, run a small change, a non-migration change, and a real migration once each—more useful than adding ten more “be thorough” lines.