Production-ready instruction framework for Codex - deterministic workflows, deliberate reasoning, domain routing, strict quality gates, and persistent project memory.
CodexAI Skill Pack turns Codex from an ad-hoc code assistant into a structured engineering partner. Instead of relying on prompt luck, the pack enforces a repeatable flow:
Intent -> Spec -> Plan -> Route -> Implement -> Verify -> Persist -> Commit
The pack is designed for 3 outcomes:
- less generic output
- stronger workflow discipline
- deliverables that read more like accountable human engineering work
| Metric | Value |
|---|---|
| Core Skills | 28 |
| Entry-point Scripts | 69 |
| Shared Helpers | 2 |
| Reference Docs | 188+ |
| Starter Templates | 29 |
| Artifact Templates | 9 |
| Agent Personas | 8 |
| Workflow Aliases | 8 |
| Verification | 341 unit + 71 smoke = 412 tests |
| Codex Native Plugin | .codex-plugin/plugin.json + .agents/plugins/marketplace.json |
| Claude Code Plugin | .claude-plugin/plugin.json + hooks/hooks.json |
| GitHub Automation | GitHub CLI (gh) + gh auth login for PR/release workflows |
| CI/CD | .github/workflows/ci.yml + .github/workflows/release.yml |
| Weakness in default AI workflows | What this pack adds |
|---|---|
| Vague task interpretation | codex-intent-context-analyzer locks goal, scope, and ambiguity before code |
| Plans that sound good but do not guide execution | codex-plan-writer creates verifiable, dependency-aware task breakdowns |
| Design output drifts between sessions | codex-design-system plus codex-design-md turn design intent into reusable vocabulary and a lintable DESIGN.md contract |
| Generic output with no proof | codex-reasoning-rigor plus output_guard.py force evidence-backed deliverables |
| AI-safe writing that still feels synthetic | editorial_review.py scores tone, decision clarity, tradeoffs, and scanability |
| Documents that make readers infer too much | codex-document-writer forces purpose, audience, structure, complete sentences, and reliability wording |
| No final gate before declaring done | codex-execution-quality-gate runs lint, tests, security, output quality, editorial quality, UX, and trend tracking |
| Context lost between sessions | codex-role-docs preserves role-scoped project docs, while codex-project-memory stores decisions, summaries, genome, handoffs, and changelog inputs |
| Tacit knowledge stays invisible | build_knowledge_index.py turns genome, role docs, decisions, commits, and configs into .codex/knowledge/INDEX.md |
| Fullstack prototypes start from vague prompts | codex-spec-driven-development forces spec-first acceptance criteria before $plan and implementation |
| Scrum roles live only in people's heads | codex-scrum-subagents installs project .agent kits and native .codex/agents custom agents |
| Skills only work in one agent app | Dual Codex + Claude plugin metadata lets both agents load the same skills/<name>/SKILL.md contracts |
Pull request and release automation use GitHub CLI (gh). Install and authenticate once before using commit/PR helpers or wrapping this pack in a project CLI:
gh auth login
gh auth statusUse GitHub CLI credential storage locally, or GH_TOKEN / GITHUB_TOKEN in CI. Never commit tokens into plugin manifests, skill docs, generated artifacts, or source files.
The repository ships a senior baseline GitHub Actions setup:
ci.yml: plugin validators, pack health, tool contracts, prompt-router corpus, memory-at-scale (medium), Python 3.12–3.13 × Linux/Windows matrix, Python 3.11 onmain, trust harness smoke, advisory security scan, and GitHub CLI contract checks.scale-nightly.yml: weekly large-tier memory scale gate (8000 synthetic files) with JSON report artifact.release.yml: optional manual ZIP build (workflow_dispatchonly).
CI validates this plugin pack only. CI/CD scripts and plugin-tools.json are capabilities for your Project CLI to invoke locally against any project-root — not a production deploy pipeline for this repo.
Local pack check (optional, before sharing a ZIP):
python skills/.system/scripts/local_release_gate.py --format json
python skills/.system/scripts/local_release_gate.py --apply --format jsonSee skills/.system/references/deploy-promotion.md.
codex-master-instructionsGlobal operating rules, evidence policy, completion discipline.codex-intent-context-analyzerParse request -> classify intent -> confirm when risky or ambiguous.codex-plan-writerBreak medium/large work into small, verifiable steps.codex-workflow-autopilotRoute into build, fix, debug, review, docs, deploy, teach, or Scrum overlays.- Domain routing Load only relevant knowledge from domain and security packs.
- Implementation Execute with bounded scope and explicit evidence.
codex-execution-quality-gateEnforce lint, tests, security, output rigor, editorial review, and trend logging.codex-role-docs+codex-project-memory+codex-git-autopilotPersist what matters, then commit and ship with discipline.
The pack now supports additive agent routing without breaking the old flow:
codex-intent-context-analyzerclassifies the request and may emitsuggested_agent.codex-master-instructionsloadsskills/.agents/<agent>.mdwhen that file exists.- The loaded agent contributes behavioral rules plus
file_ownershipboundaries. - If the agent file or
.agents/folder is missing, the pack falls back to legacy routing throughcodex-domain-specialist. codex-workflow-autopilotthen routes execution mode as usual, optionally loading a workflow alias file.
This keeps the pack fully backward compatible: if you never use agents or workflow aliases, the previous skill-only pipeline still works exactly the same way.
codex-role-docs creates durable project-local docs under .codex/project-docs/ so each specialist can preserve the context it owns:
- Frontend: UI/UX, design system, design tokens, reusable components, routing, accessibility, frontend tests.
- Backend: architecture, API contracts, database design, domain model, auth/security, integrations, logging, backend tests.
- DevOps: environments, CI/CD, deployment runbook, observability, incidents, secrets/config, rollback.
- Admin: scope, roles/permissions, admin flows, audit logs, data management, dashboards/reports.
- QA: test strategy, regression map, end-to-end flows.
auto_gate.py now runs a lightweight runtime preflight in quick/full/deploy modes, then runs role-doc checks as advisory warnings in full/deploy mode. Missing docs never block unless a project explicitly makes documentation mandatory.
For MVP, fullstack prototype, "from scratch", or "build whole app" requests, the pack now routes through $prototype:
$hook -> $init-profile -> $genome -> $init-docs -> $spec -> $plan -> $sdd or inline -> $knowledge -> $check-full
This makes requirements, acceptance criteria, FE/BE/data/QA impact, and verification visible before implementation. The spec layer is advisory in auto_gate.py, but $prototype treats spec-first work as mandatory.
| Alias | File | Equivalent |
|---|---|---|
$plan |
skills/.workflows/plan.md |
$codex-plan-writer + BMAD Phase 1-2 |
$debug |
skills/.workflows/debug.md |
workflow-debug.md + 4-phase |
$create |
skills/.workflows/create.md |
workflow-create.md |
$prototype |
skills/.workflows/prototype.md |
$spec + $plan + role docs + full gate |
$review |
skills/.workflows/review.md |
workflow-review.md + output-guard + editorial |
$deploy |
skills/.workflows/deploy.md |
workflow-deploy.md + full gate |
$handoff |
skills/.workflows/handoff.md |
workflow-handoff.md + session summary |
Aliases are shortcuts, not replacements. All legacy triggers such as $codex-plan-writer, $codex-workflow-autopilot, and $codex-execution-quality-gate remain supported in parallel.
This is the biggest differentiator of the pack today:
codex-reasoning-rigorforces task contracts, evidence ladders, and monitoring loops.codex-logical-decision-layerforces compact option comparison before ambiguous decisions.codex-document-writerturns reports, memos, guides, and Vietnamese documents into structured reader-first artifacts.output_guard.pyrejects deliverables that are too generic or weakly grounded.editorial_review.pychecks whether the writing sounds decisive, accountable, and scanable instead of model-safe.benchmark_quality.pynow measures output score, editorial score, quality index, and expectation hit rate across a 12-case static corpus.- Benchmark corpus loading returns structured JSON errors for invalid corpus files, so release measurement failures are easier to diagnose.
run_gate.pynow treatsplan,review, andhandoffas strict deliverables by default.quality_trend.pytracks gate pass rate, output score, and editorial score over time.
| Skill | What It Does |
|---|---|
codex-master-instructions |
Global behavior rules and evidence-based completion |
codex-intent-context-analyzer |
Structured intent parsing and confirmation gating |
codex-context-engine |
Project genome loading for large repos |
codex-plan-writer |
Verifiable plan generation |
codex-workflow-autopilot |
Workflow routing and mode selection |
codex-runtime-hook |
One-command project preflight for domain detection and missing FE/BE readiness artifacts |
codex-reasoning-rigor |
Anti-generic reasoning and output contracts |
codex-logical-decision-layer |
Compact option comparison and decision contracts without hidden chain-of-thought |
codex-document-writer |
Professional documents, reports, memos, guides, Vietnamese style, and reliability tone |
codex-role-docs |
Project-local FE/BE/DevOps/Admin/QA docs that preserve role micro-context |
codex-spec-driven-development |
Spec-first requirements, acceptance criteria, traceability, and prototype workflow |
codex-scrum-subagents |
Scrum role kits, workflows, native custom agents, artifact generation |
| Skill | Coverage | Refs | Starters |
|---|---|---|---|
codex-design-system |
Premium UI vocabulary across palettes, typography, layout, motion, composition, trends, and anti-patterns | 7 | 0 |
codex-design-md |
Durable DESIGN.md contracts, lint/diff/export workflows, and design-token source of truth |
3 | 1 |
codex-domain-specialist |
Full-stack engineering | 66 | 19 |
codex-security-specialist |
Network, infra, AppSec, DevSecOps, compliance | 30 | 10 |
| Skill | What It Adds |
|---|---|
codex-execution-quality-gate |
Pre-commit checks, security scan, smart test selection, output guard, editorial review, UX/a11y, Lighthouse, quality trends |
codex-project-memory |
Decision logs, summaries, handoffs, genome, knowledge index, changelog, growth reporting |
codex-docs-change-sync |
Code diff to docs impact mapping |
codex-role-docs |
Role-scoped docs initialization, updates, indexing, and advisory coverage checks |
codex-git-autopilot |
Conventional commits, signing, and gate-aware commit flow |
codex-doc-renderer |
DOCX -> PDF -> PNG rendering helpers |
Preferred: generic CLI/IDE trust harness
Use this when the agent app is not Codex or Claude Code, or when you want one command that installs a portable project adapter and writes evidence:
python ".\skills\.system\scripts\trust_harness.py" --project-root "." --skills-root ".\skills" --setup generic --apply --evidence ".\.codexai\evidence\trust-harness.json" --format textFor a dry-run that does not write files, omit --apply. The generic adapter creates .codexai/skills, merges a bounded AGENTS.md bridge, writes .codexai/hooks/pre_prompt.json for host IDE/CLI pre-prompt integration, validates Codex/Claude packaging, runs the prompt-router corpus, checks release packaging, and stores JSON evidence.
Preferred: Codex-native user install
python ".\skills\.system\scripts\install_codex_native.py" --source ".\skills" --scope user --dry-run --format text
python ".\skills\.system\scripts\install_codex_native.py" --source ".\skills" --scope user --apply --format textRepo-local install
python ".\skills\.system\scripts\install_codex_native.py" --source ".\skills" --scope repo --repo-root "." --apply --format textThe repo also ships a native plugin manifest at .codex-plugin/plugin.json and a local marketplace entry at .agents/plugins/marketplace.json.
Claude Code user install
python ".\skills\.system\scripts\install_claude_native.py" --source ".\skills" --scope user --dry-run --format text
python ".\skills\.system\scripts\install_claude_native.py" --source ".\skills" --scope user --apply --format textClaude Code plugin mode
python ".\skills\.system\scripts\validate_claude_plugin.py" --plugin-root "." --format text
claude --plugin-dir .Claude Code uses .claude-plugin/plugin.json, skills/<skill>/SKILL.md, and hooks/hooks.json. In plugin mode, skills are namespaced as /codexai-agentic-workflow:<skill-name>.
Windows (PowerShell)
python ".\skills\.system\scripts\sync_global_skills.py" --source-root ".\skills" --global-root "$env:USERPROFILE\.codex\skills" --dry-run --format text
python ".\skills\.system\scripts\sync_global_skills.py" --source-root ".\skills" --global-root "$env:USERPROFILE\.codex\skills" --apply --format textmacOS / Linux
python ./skills/.system/scripts/sync_global_skills.py --source-root ./skills --global-root "$HOME/.codex/skills" --dry-run --format text
python ./skills/.system/scripts/sync_global_skills.py --source-root ./skills --global-root "$HOME/.codex/skills" --apply --format textThe legacy sync commands copy dot directories such as .system, .agents, and .workflows. Sync is dry-run by default; use --apply only after reviewing the preview. Do not install with skills/*, because that can omit required runtime metadata on some systems.
# Unit tests
python -m pytest skills/tests -q
# Smoke checks
python skills/tests/smoke_test.py
# Pack operation health
python skills/.system/scripts/check_pack_health.py --skills-root skills --format text
python skills/.system/scripts/validate_codex_plugin.py --plugin-root . --format text
python skills/.system/scripts/validate_claude_plugin.py --plugin-root . --format text
python skills/.system/scripts/trust_harness.py --project-root . --skills-root skills --setup generic --evidence .codexai/evidence/trust-harness.json --format text
# Clean release archive preview/build
python skills/.system/scripts/build_release_zip.py --project-root . --dry-run --format text
python skills/.system/scripts/build_release_zip.py --project-root . --apply --format text| Command | Purpose |
|---|---|
$codex-genome |
Build project context document |
$codex-intent-context-analyzer |
Parse a request into structured intent |
$codex-plan-writer |
Create an implementation plan |
$codex-workflow-autopilot |
Route work into the right execution flow |
$hook / $preflight |
Run one-command project readiness preflight |
$health |
Check pack manifest, registry, aliases, dot directories, global sync, and markdown encoding |
$init-profile |
Create .codex/profile.json for stable routing and user preferences |
$think / $decide |
Build compact multi-option decision surface |
$codex-reasoning-rigor |
Force deeper, less generic reasoning |
$role-docs |
Load role documentation workflow |
$init-docs |
Initialize .codex/project-docs/ |
$check-docs |
Check role-doc coverage and suggested updates |
$spec |
Create or check .codex/specs/<slug>/SPEC.md |
$prototype |
Run the full spec-first prototype workflow |
$knowledge |
Build .codex/knowledge/INDEX.md from context, docs, decisions, commits, and config |
$design |
Load premium visual vocabulary before UI work |
$design-md |
Scaffold, lint, diff, and export DESIGN.md contracts |
$codex-execution-quality-gate |
Run verification before completion |
$output-guard |
Score specificity and evidence |
editorial_review.py |
Check whether a deliverable reads like a human-made artifact |
$scrum-install |
Install Scrum kit plus native .codex/agents |
$story-ready-check |
Validate user story readiness |
$release-readiness |
Run ship or no-ship release ceremony |
$log-decision |
Persist an architecture decision |
$session-summary |
Create end-of-session handoff summary |
$codex-doctor |
Check runtime installation health |
- Parse intent.
- Run
$hook/$preflightfor medium or large work. - Generate a plan when the task is not tiny.
- Route only the needed domain context.
- Implement in small verified slices.
- Run the quality gate before saying "done".
- Log decisions and generate a session summary when context matters.
Use the full output-quality stack:
codex-reasoning-rigoroutput_guard.pyeditorial_review.pyrun_gate.py --strict-output
This is the path that pushes outputs away from generic AI prose and toward human-grade engineering deliverables.
CodexAI---Skills/
|-- README.md
|-- LICENSE
|-- docs/
| `-- huong-dan-vi.md
`-- skills/
|-- VERSION
|-- CHANGELOG.md
|-- README.md
|-- pytest.ini
|-- requirements.txt
|-- .agents/
|-- .workflows/
|-- .system/
| |-- OPERATION_RUNBOOK.md
| |-- REGISTRY.md
| `-- manifest.json
|-- tests/
|-- codex-master-instructions/
|-- codex-intent-context-analyzer/
|-- codex-context-engine/
|-- codex-plan-writer/
|-- codex-workflow-autopilot/
|-- codex-reasoning-rigor/
|-- codex-role-docs/
|-- codex-design-system/
|-- codex-design-md/
|-- codex-domain-specialist/
|-- codex-security-specialist/
|-- codex-execution-quality-gate/
|-- codex-project-memory/
|-- codex-docs-change-sync/
|-- codex-git-autopilot/
|-- codex-doc-renderer/
`-- codex-scrum-subagents/
- Public usage guide: docs/huong-dan-vi.md
- Technical internals: skills/README.md
- Operation runbook: skills/.system/OPERATION_RUNBOOK.md
- Version history: skills/CHANGELOG.md
MIT