| name | x9-agent-instructions |
| description | Use when drafting a one-off prompt/task brief for another agent without executing it, or when creating, auditing, or editing global personal agent instructions — «напиши промпт для агента», «мне нужен промпт», «поправь глобальные правила», «обнови CLAUDE.md/AGENTS.md», "write an agent prompt", "edit my global instructions". Do not use for repository onboarding files (x9-context-files-generator), skill authoring (x9-skill-creator), ordinary prose, or actually delegating a task to Codex. |
Agent instructions
Own global behavioral policy in ~/.claude/CLAUDE.md, ~/.codex/AGENTS.md, and bounded briefs handed to another agent. Keep the skill itself and standing machine-facing policy in English by default. Write a one-off brief in the user's language so the user can read and verify it before sending; for a Russian-language request, default to Russian. Preserve identifiers, commands, file paths, UI labels, literal configuration values, and quotations in their exact original form. Use English for the whole brief only when the user explicitly requests it or the receiving agent or runtime has a load-bearing English-only requirement; state that reason.
Classify before editing
Place each rule in the narrowest owner that can reliably enforce it:
- Stable personal policy: authority, preservation, uncertainty, completion, communication → mirrored shared core in both global files.
- Runtime adapter: current models, tools, CLI flags, browser and subagent schemas → a runtime-specific global section or a user-owned adapter outside the reusable skill.
- Repository context: commands and local constraints → repository
AGENTS.md/CLAUDE.md, owned by x9-context-files-generator.
- Domain behavior: situation-specific method → the relevant skill.
- Operational state: rankings, measurements, experiments, freshness dates → a dated state/log file, not standing policy.
- One-off task: goal, constraints, evidence, authority, deliverable, and observable completion bar → the task brief.
System and developer instructions remain higher authority than user, repository, or skill instructions. Never write a lower layer as though it can override a higher one.
Editing contract
- Read both global files and any runtime adapter affected by the change.
- Add a standing rule only when omitting it would make a capable agent materially likely to behave differently or repeat a known failure. Do not spend always-loaded context on generic advice the model already follows.
- Identify the canonical owner. Allow a short audience-specific summary elsewhere only when it changes behavior; point back to the owner.
- Preserve unrelated user content. Replace only the intended bounded section when markers exist.
- Keep the shared block between
<!-- BEGIN SHARED PERSONAL CORE --> and <!-- END SHARED PERSONAL CORE --> byte-identical in both global files.
- State hard negative boundaries explicitly when safety or preservation depends on them. Prefer positive target behavior for ordinary guidance.
- Specify process only when the path is part of correctness: dependencies, approval gates, deterministic transformations, state/checkpoints, or known failure modes.
- Resolve the installed
x9-agent-instructions directory from the loaded SKILL.md, then run python3 <skill-directory>/scripts/check_globals.py. Do not resolve the script from the caller's current working directory. Exercise the behavior scenarios below; a prose reread alone is not validation.
Behavior scenarios
- Answer/review request → inspect and report; no edits.
- Explicit build/fix request → safe in-scope local edits and tests proceed; external, destructive, costly, or expanded actions require confirmation.
- Required tool fails → report the failure; no from-memory substitution.
- Runtime fact changes → update one adapter and its freshness marker, not every skill.
- Shared policy changes → both global copies match; runtime-specific sections may differ deliberately.
- One-off brief has a load-bearing ambiguity → ask one question; otherwise proceed with a stated assumption.
- Russian-language request for a one-off prompt → return the complete brief in Russian while preserving exact technical literals.
- Target explicitly requires English → return the brief in English and state why the normal user-language default was overridden.
Done
- Every added standing rule changes likely behavior or prevents a documented failure; generic advice was left out.
- The rule has one canonical owner and no accidental contradiction.
- Shared global policy passes
python3 <skill-directory>/scripts/check_globals.py from an unrelated working directory.
- A one-off brief uses the user's language unless an explicit request or a documented target constraint requires another language.
- At least one positive and one boundary scenario were checked in a fresh context for substantive changes.
- The handoff names changed files and validation performed.