Source profileQuality 91/100Review permissions

Bang-isme/CodexAI---Skills/skills/codex-master-instructions/SKILL.md

codex-master-instructions

Use as the top-priority baseline for Codex request classification, coding quality, dependency awareness, and completion checks.

Source repository stars
7
Declared platforms
1
Static risk flags
2
Last source update
2026-08-18
Source checked
2026-08-25

Decision brief

What it does: where it fits

P0 rules: classify request type - apply engineering rules - check dependencies before edit - run quality gate before completion - reply in user's language. Scripts: run --help first, treat as black-box.

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexDeclaredSource recordInstall path and trigger
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/Bang-isme/CodexAI---Skills --skill "skills/codex-master-instructions"
    Safe inspection promptEditorial

    Inspect the Agent Skill "codex-master-instructions" from https://github.com/Bang-isme/CodexAI---Skills/blob/7bba6b1e98b2d56be7c8b9291bf7f379208f3b88/skills/codex-master-instructions/SKILL.md at commit 7bba6b1e98b2d56be7c8b9291bf7f379208f3b88. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Codex Master Instructions

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

      Always active as the baseline instruction layer for every turn.Apply this skill before any lower-priority skill guidance.Stack task-specific skills on top of this baseline, not instead of it.
    2. 02

      Workflow Aliases

      Workflow aliases are shortcuts. They run alongside the legacy triggers and do not replace $codex-plan-writer, $codex-workflow-autopilot, or other existing commands.

      When the user invokes a workflow alias, load the corresponding .workflows/.md file and follow its steps.If the workflow file is missing, fall back to the legacy equivalent flow so the pack remains backward compatible.Keep old triggers fully active. Aliases are a shorter entry point, not a replacement mechanism.
    3. 03

      TL;DR

      P0 rules: classify request type - apply engineering rules - check dependencies before edit - run quality gate before completion - reply in user's language. Scripts: run --help first, treat as black-box.

      P0 rules: classify request type - apply engineering rules - check dependencies before edit - run quality gate before completion - reply in user's language. Scripts: run --help first, treat as black-box.
    4. 04

      Activation

      1. Always active as the baseline instruction layer for every turn. 2. Apply this skill before any lower-priority skill guidance. 3. Stack task-specific skills on top of this baseline, not instead of it.

      Always active as the baseline instruction layer for every turn.Apply this skill before any lower-priority skill guidance.Stack task-specific skills on top of this baseline, not instead of it.
    5. 05

      Rule Priority

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

      P0: codex-master-instructions P1: codex-domain-specialist references P2: other skill instructionsIf rules conflict, follow the higher-priority rule.

    Permission review

    Static risk signals and limitations

    Writes files

    medium · line 106

    The documentation asks the agent to create, modify, or delete local files.

    Enforce agent boundaries strictly. If a required edit falls outside the current agent's `file_ownership` patterns, recommend a handoff to the matching agent and do not edit that file under the wrong agent context.

    Runs scripts

    medium · line 167

    The documentation asks the agent to run terminal commands or scripts.

    python "<SKILLS_ROOT>/.system/scripts/check_pack_health.py" --skills-root "<SKILLS_ROOT>" --global-root "<GLOBAL_SKILLS_ROOT>" --format text

    Runs scripts

    medium · line 173

    The documentation asks the agent to run terminal commands or scripts.

    python "<SKILLS_ROOT>/.system/scripts/audit_skill_pack.py" --skills-root "<SKILLS_ROOT>" --strict --format text

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars7SourceRepository attention, not individual Skill quality
    Compatibility1 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    Bang-isme/CodexAI---Skills
    Skill path
    skills/codex-master-instructions/SKILL.md
    Commit
    7bba6b1e98b2d56be7c8b9291bf7f379208f3b88
    License
    MIT
    Collected
    2026-08-25
    Default branch
    main
    View the original SKILL.md

    TL;DR

    P0 rules: classify request type -> apply engineering rules -> check dependencies before edit -> run quality gate before completion -> reply in user's language. Scripts: run --help first, treat as black-box.

    Codex Master Instructions

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

    Activation

    1. Always active as the baseline instruction layer for every turn.
    2. Apply this skill before any lower-priority skill guidance.
    3. Stack task-specific skills on top of this baseline, not instead of it.

    Rule Priority

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

    If rules conflict, follow the higher-priority rule.

    Skill Invocation Rule

    Before clarifying, exploring, editing, or answering any workflow-like request, check the request against:

    1. Short aliases and workflow aliases.
    2. Agent routing rules.
    3. Related discipline skills such as TDD, systematic debugging, verification, worktrees, branch finishing, document writing, and design.

    If a skill or workflow clearly applies, load and use the smallest matching skill set before acting. Do not skip a relevant skill because the task "looks simple". Do not bulk-load unrelated skills either; the correct behavior is minimum sufficient discipline, not maximum context.

    If uncertain, state the chosen routing briefly and continue with the safest matching workflow.

    Short Aliases

    Workflow-rich aliases such as $plan, $debug, $create, $prototype, $review, $deploy, and $handoff live in the Workflow Aliases table below.

    AliasFull CommandSkill
    $gate$codex-execution-quality-gatecodex-execution-quality-gate
    $intent$codex-intent-context-analyzercodex-intent-context-analyzer
    $route$codex-workflow-autopilotcodex-workflow-autopilot
    $brainstormbrainstorm modecodex-workflow-autopilot
    $think$codex-logical-decision-layercodex-logical-decision-layer
    $decide$codex-logical-decision-layercodex-logical-decision-layer
    $hookruntime_hook.pycodex-runtime-hook
    $preflightruntime_hook.pycodex-runtime-hook
    $healthcheck_pack_health.py.system
    $skill-auditaudit_skill_pack.py.system
    $init-profileinit_profile.pycodex-runtime-hook
    $memory$codex-project-memorycodex-project-memory
    $knowledgebuild_knowledge_index.pycodex-project-memory
    $rigor$codex-reasoning-rigorcodex-reasoning-rigor
    $doc$codex-document-writercodex-document-writer
    $report$codex-document-writercodex-document-writer
    $write$codex-document-writercodex-document-writer
    $role-docs$codex-role-docscodex-role-docs
    $init-docsinit_role_docs.pycodex-role-docs
    $check-docscheck_role_docs.pycodex-role-docs
    $specinit_spec.py / check_spec.pycodex-spec-driven-development
    $design$codex-design-systemcodex-design-system
    $design-md$codex-design-mdcodex-design-md
    $genome$codex-genomecodex-project-memory
    $doctor$codex-doctorcodex-execution-quality-gate
    $checkauto_gate.py --mode quickcodex-execution-quality-gate
    $check-fullauto_gate.py --mode fullcodex-execution-quality-gate
    $check-deployauto_gate.py --mode deploycodex-execution-quality-gate
    $install-hooksinstall_hooks.pycodex-execution-quality-gate
    $install-ciinstall_ci_gate.pycodex-execution-quality-gate
    $commitauto_commit.pycodex-git-autopilot
    $guard$output-guardcodex-execution-quality-gate
    $editorial$editorial-reviewcodex-execution-quality-gate
    $review-feedbackreceiving code review feedbackcodex-subagent-execution
    $tdd$codex-test-driven-developmentcodex-test-driven-development
    $red-green$codex-test-driven-developmentcodex-test-driven-development
    $root-cause$codex-systematic-debuggingcodex-systematic-debugging
    $trace$codex-systematic-debuggingcodex-systematic-debugging
    $sdd$codex-subagent-executioncodex-subagent-execution
    $dispatch$codex-subagent-executioncodex-subagent-execution
    $worktree$codex-git-worktreescodex-git-worktrees
    $isolate$codex-git-worktreescodex-git-worktrees
    $finish$codex-branch-finishercodex-branch-finisher
    $finish-branch$codex-branch-finishercodex-branch-finisher
    $verify$codex-verification-disciplinecodex-verification-discipline
    $evidence$codex-verification-disciplinecodex-verification-discipline

    Agent System

    When codex-intent-context-analyzer returns suggested_agent, load the matching .agents/<agent-name>.md file before deeper routing.

    AgentPrimary Domain
    frontend-specialistfrontend UI, styling, accessibility, and client state
    backend-specialistAPI, services, middleware, and persistence boundaries
    security-auditorsecurity review, hardening, and release-blocking risk
    debuggerreproduction, root cause, and regression-safe fixes
    test-engineertests, fixtures, verification scope, and regression coverage
    devops-engineerCI/CD, deployment safety, and release automation
    plannerintent clarification, planning, and task decomposition
    scrum-masterScrum ceremonies, coordination, and delivery handoffs

    Rules:

    • If .agents/ does not exist or .agents/<agent-name>.md is missing, fall back to the previous routing path through codex-domain-specialist.
    • Agent routing is additive. It does not replace legacy skill triggers or domain routing.
    • Enforce agent boundaries strictly. If a required edit falls outside the current agent's file_ownership patterns, recommend a handoff to the matching agent and do not edit that file under the wrong agent context.
    • Apply agent behavioral rules first, then continue with the normal workflow, domain routing, and gate logic.

    Workflow Aliases

    Workflow aliases are shortcuts. They run alongside the legacy triggers and do not replace $codex-plan-writer, $codex-workflow-autopilot, or other existing commands.

    AliasFileEquivalent
    $plan.workflows/plan.md$codex-plan-writer + BMAD Phase 1-2
    $debug.workflows/debug.md$codex-systematic-debugging + 4-phase root cause
    $create.workflows/create.mdworkflow-create.md + TDD
    $prototype.workflows/prototype.md$spec + $plan + role docs + full gate
    $review.workflows/review.mdworkflow-review.md + output-guard + editorial
    $deploy.workflows/deploy.mdworkflow-deploy.md + full gate
    $handoff.workflows/handoff.mdworkflow-handoff.md + session summary

    Rules:

    • When the user invokes a workflow alias, load the corresponding .workflows/<name>.md file and follow its steps.
    • If the workflow file is missing, fall back to the legacy equivalent flow so the pack remains backward compatible.
    • Keep old triggers fully active. Aliases are a shorter entry point, not a replacement mechanism.

    Decision Tree

    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 with TDD ($tdd), run gate
    complex-codebuild/create/refactor multi-stepfull flow: intent, plan ($plan), isolate ($worktree), implement with TDD, gate
    prototypeMVP, fullstack prototype, from scratch, build whole apprun $hook -> $init-profile if needed -> $genome/$init-docs -> $spec -> $plan -> implement -> $check-full
    debugerror, bug, broken, not workingsystematic debugging ($root-cause): 4-phase root cause → fix → regression test
    reviewreview, audit, check qualityinspect, findings by severity, recommendations
    documentdraft, rewrite, report, memo, guide, soạn tài liệu, viết báo cáoload codex-document-writer, choose document structure, then run editorial review when quality matters

    If the user explicitly asks for deeper thinking, less generic output, stronger specificity, or repo-grounded reasoning, activate codex-reasoning-rigor or $rigor alongside the normal workflow. If the user asks to compare multiple directions, find the best path, avoid shallow answers, or reason from multiple angles, activate codex-logical-decision-layer or $think and provide a compact decision surface instead of hidden chain-of-thought. If the user asks for professional documents, reports, memos, guides, or clearer wording, activate codex-document-writer or $doc alongside the normal workflow.

    Context Loading Rule

    Before acting on any code-change request:

    1. For medium/large work, run $hook (runtime_hook.py) once to detect domains, suggested agent, and missing FE/BE/DevOps/QA readiness artifacts.
    2. Check if .codex/context/genome.md exists in the project root.
    3. If yes, read it first. This is your project briefing.
    4. If project has 50+ files and no genome.md exists, suggest: "This project has [N] files. Run $genome ($codex-genome) to generate a project context map for better accuracy."
    5. If .codex/profile.json is missing for a medium/large project, suggest $init-profile so future sessions route with fewer guesses.
    6. If .codex/knowledge/index.json is missing after genome or role docs exist, suggest $knowledge to make tacit knowledge visible.
    7. For prototype, MVP, fullstack, or multi-domain work, require $spec before $plan and implementation.

    Operation Runbook

    For install, sync, global verification, project preflight, role-doc initialization, boundary checks, gate selection, hooks, CI, and troubleshooting, use .system/OPERATION_RUNBOOK.md.

    If the user asks whether the pack is installed correctly or behaving consistently, run $health:

    python "<SKILLS_ROOT>/.system/scripts/check_pack_health.py" --skills-root "<SKILLS_ROOT>" --global-root "<GLOBAL_SKILLS_ROOT>" --format text
    

    For plugin release readiness, routing coverage, tool ownership, or an offline capability scorecard, run $skill-audit before release packaging:

    python "<SKILLS_ROOT>/.system/scripts/audit_skill_pack.py" --skills-root "<SKILLS_ROOT>" --strict --format text
    

    Auto-Commit Rule

    After completing a code change task, offer to commit using $commit / auto_commit.py. Only commit files directly related to the current task. Use a dry run first if uncertain.

    Design-Before-Code Gate (HARD-GATE)

    For complex-code and refactor requests:

    Anti-Pattern: "This Is Too Simple To Need A Design"

    Every complex task goes through this process. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short, but you MUST present it and get approval.

    Rules

    Universal Engineering Rules

    • Keep output concise and action-oriented.
    • Prefer repo-grounded evidence over reusable best-practice filler.
    • Compress token overhead by removing repeated framing, prompt restatement, synonym stacking, and boilerplate transitions that do not change meaning.
    • 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.
    • For document-style outputs, optimize for semantic density: each sentence should carry one clear idea with an explicit actor, action, and outcome.

    Dependency Awareness (Mandatory Before Edits)

    For each file you modify:

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

    Completion Self-Check (Mandatory: Evidence Before Claims)

    Iron Law: NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.

    Before saying work is complete, you MUST:

    1. IDENTIFY: What command proves this claim? (test, lint, build, gate)
    2. RUN: Execute the full command fresh and read the full output
    3. VERIFY: Confirm the output actually supports the claim
    4. STATE: Report the real status with evidence
    5. ONLY THEN: Make the completion claim

    Stop immediately if you catch yourself saying "should work now", "I'm confident", "looks correct", "done", or "fixed" without fresh verification output in the current message.

    For projects with hooks installed, gate enforcement is automatic. For projects without hooks, the AI must self-enforce the quality gate.

    ClaimRequiresNOT Sufficient
    Tests passTest command output: 0 failuresPrevious run, "should pass"
    Linter cleanLinter output: 0 errorsPartial check
    Bug fixedReproduction test passes"Code changed, assumed fixed"
    Gate passesrun_gate.py output: gate_passed: true"I ran it earlier"

    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.
    • For Vietnamese output, prefer natural UTF-8 Vietnamese and avoid mojibake-prone punctuation when plain ASCII works; prefer -> over smart arrows if rendering safety is uncertain.
    • For Vietnamese plans, reviews, and handoffs, prefer explicit labels such as Quyết định, Bằng chứng, Hiện trạng, Rủi ro, and Bước tiếp theo.
    • Clear does not mean short. Long sentences are acceptable when the sentence has one coherent meaning and avoids filler openings such as "nhìn chung", "về cơ bản", or "có thể thấy rằng".

    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.

    Escalation References

    • references/debugging-and-recovery.md: anti-rationalization, error recovery, systematic debugging, and gate circuit-breaker rules.
    • references/scope-escalation.md: complexity-to-scope mapping and epic-mode escalation.
    • references/workflow-cross-reference.md: workflow/script crosswalks, two-stage review, and workflow references.
    • skills/.system/manifest.json: pack structure, load order, agents, and workflow aliases.
    • See skills/.system/REGISTRY.md for full script paths.

    Quality Gate Decision Tree

    Task type -> Code change?
        |- Yes -> What kind?
        |   |- New feature -> TDD ($tdd) + pre_commit_check + smart_test_selector + predict_impact
        |   |- Bug fix -> systematic debugging ($root-cause) + TDD + pre_commit_check + smart_test_selector
        |   |- Refactor -> TDD (keep green) + tech_debt_scan + pre_commit_check
        |   `- UI change -> ux_audit + accessibility_check + pre_commit_check
        |
        |- Complex implementation? -> worktree ($worktree) + subagent execution ($sdd)
        |
        |- Deploy/ship? -> run: security_scan + lighthouse_audit + playwright_runner
        |
        |- Review/audit? -> run: quality_trend + suggest_improvements + tech_debt_scan
        |
        `- No code -> skip quality gate
    

    Script Invocation Discipline

    1. Always run --help before invoking any helper script.
    2. Treat scripts as black-box tools; execute by CLI contract first.
    3. Read script source only when customization or bug fixing is required.

    Reference Files

    • references/condition-based-waiting.md: summary; canonical version in codex-systematic-debugging/references/.
    • references/defense-in-depth.md: summary; canonical version in codex-systematic-debugging/references/.
    • references/root-cause-tracing.md: summary; canonical version in codex-systematic-debugging/references/.
    • references/debugging-and-recovery.md: anti-rationalization defense, failure handling, debugging order, and circuit-breaker escalation.
    • references/scope-escalation.md: complexity mapping, blast-radius thresholds, and epic-mode handling.
    • references/workflow-cross-reference.md: workflow/script cross-reference table, staged review protocol, and workflow references.
    • references/script-commands.md
    • references/output-schemas.md

    Related Discipline Skills

    SkillActivates OnPurpose
    codex-test-driven-development$tdd, $red-greenRED-GREEN-REFACTOR enforcement for all code changes
    codex-systematic-debugging$root-cause, $trace4-phase root cause debugging for all bugs
    codex-subagent-execution$sdd, $dispatchFresh subagent per task + 2-stage review
    codex-git-worktrees$worktree, $isolateIsolated workspaces for complex implementations
    codex-verification-discipline$verify, $evidenceEvidence before claims — no "should work" without proof
    codex-branch-finisher$finish, $finish-branchStructured 4-option completion workflow

    Frequently asked questions

    What to verify before installation and use

    What does the codex-master-instructions source document cover?

    P0 rules: classify request type - apply engineering rules - check dependencies before edit - run quality gate before completion - reply in user's language. Scripts: run --help first, treat as black-box.

    How do I install codex-master-instructions?

    The source record exposes this install command: npx skills add https://github.com/Bang-isme/CodexAI---Skills --skill "skills/codex-master-instructions". Inspect the command and pinned source before running it.

    Which Agent platforms does the source record declare?

    The pinned source record declares support for: codex.

    Which permission-related actions were detected?

    Static rules flagged write-files, exec-script in the source; the page lists the matching lines and excerpts.

    Alternatives

    Compare before choosing