Context control

Use hint files, persistent instructions and prompt templates to turn project conventions, personal preferences and output rules into reusable context.

Why control context

The model can only "see" what is in the current context. Persisting stable information (project conventions, code style, output formats) as automatically applied instructions is more reliable than re-explaining every session — context control means changing what the model sees each time, not the model itself.

Hint files: project-level conventions

Create a hint file in the project root (canonical name .cyhints, compatible with the legacy .goosehints and AGENTS.md) and write down the project's conventions: stack, directory layout, code style, things not to do. Every session started in that project injects this file automatically — no repeated explanations.

A global variant exists too: place a hint file in the settings config directory and it applies to all of your projects (e.g. "reply in English", "comment code conservatively").

Persistent instructions: personal preferences

Beyond hint files, you can maintain persistent instructions for the agent in Settings — cross-session personal preferences (response style, level of detail, tooling conventions). Changes save immediately and apply from the next session.

Prompt templates

"Settings → Prompts" lets you inspect the system prompt templates used per scenario (with a Chinese reference), so you know the behavioral contract behind each task type; advanced users can also override templates locally for deep customization (an advanced operation — re-check after product updates).

How this divides with skills

  • Hint files / persistent instructions: tell the agent "the rules here" — passive, applied automatically;
  • Skills: tell the agent "how this kind of work is done" — domain knowledge invoked on demand (see Skills);
  • Workflows: fix multi-step operations into one-click tasks (see Workflows).

Use them together: project conventions go to hint files, domain knowledge to skills, repeated operations to workflows.

This page is adapted from upstream open-source documentation (Apache-2.0) with modifications; see /legal/provenance for sources and changes.