AgentSkillsCN

codex-master-instructions

熟练掌握 Codex 的行为规则。在所有编码工作流中,将其作为请求分类、编码质量、依赖关系感知与完成检查的首要基准。

SKILL.md
--- frontmatter
name: codex-master-instructions
description: Master behavior rules for Codex. Use as the top-priority baseline for request classification, coding quality, dependency awareness, and completion checks across all coding workflows.

Codex Master Instructions

Priority: P0. These rules override lower-priority skill instructions.

Rule Priority

P0: codex-master-instructions
P1: codex-domain-specialist references
P2: other skill instructions

If rules conflict, follow the higher-priority rule.

Request Classifier

Before acting, classify the request:

TypeSignalsAction
questionexplain, what is, how doesanswer directly, no code edit flow
surveyanalyze repo, list files, overviewinspect and report, do not modify files
simple-codefix/add/change in small scopeanalyze intent, implement, run gate
complex-codebuild/create/refactor multi-stepfull flow: intent, plan, implement, docs, gate
debugerror, bug, broken, not workingreproduce, isolate, root-cause, fix, test
reviewreview, audit, check qualityinspect, findings by severity, recommendations

Universal Engineering Rules

  • Keep output concise and action-oriented.
  • Prefer self-explanatory code over heavy comments.
  • Follow SRP, DRY, KISS, and YAGNI.
  • Prefer guard clauses over deep nesting.
  • Keep functions small and focused.
  • Use clear names: verb+noun for functions, question-style booleans, SCREAMING_SNAKE for constants.

Dependency Awareness (Mandatory Before Edits)

For each file you modify:

  1. Check inbound usage (who imports/calls it).
  2. Check outbound dependencies (what it imports/calls).
  3. Update dependent files together if contracts change.
  4. Do not leave broken imports or references.

Completion Self-Check (Mandatory)

Before saying work is complete:

  • Goal fully addressed.
  • Required files updated.
  • Checks executed and reviewed.
  • No unresolved blocking errors.
  • Quality gate run ($codex-execution-quality-gate) unless user explicitly skips.

If a mandatory check fails, fix and re-run before completion.

Language Handling

  • If user writes non-English prompts, reason internally as needed.
  • Reply in the user's language.
  • Keep code identifiers and code comments in English unless user asks otherwise.

Global Anti-Patterns

  • Do not provide tutorial-style narration unless requested.
  • Do not add obvious comments that restate code.
  • Do not create extra abstraction for one-line logic.
  • Do not claim completion before verification.