{"id":5840,"date":"2026-11-01T03:46:12","date_gmt":"2026-11-01T03:46:12","guid":{"rendered":"https:\/\/aiopsschool.com\/blog\/?p=5840"},"modified":"2026-11-01T03:46:15","modified_gmt":"2026-11-01T03:46:15","slug":"codex-skills-engineering-guide-2026","status":"publish","type":"post","link":"https:\/\/aiopsschool.com\/blog\/codex-skills-engineering-guide-2026\/","title":{"rendered":"Codex Skills Engineering Guide \u2014 2026"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Production-grade tutorial | Codex CLI, IDE extension, repository skills, dynamic intent recognition, lifecycle hooks, and automated validation | November 2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide covers how to create, update, deploy, and test reusable Codex Skills, including two working examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>refactor<\/code> \u2014 an explicitly invoked skill for safe code refactoring.<\/li>\n\n\n\n<li><code>db-performance-review<\/code> \u2014 an implicitly discoverable skill for database performance analysis, with an optional lifecycle hook for automatic file-change checks.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">1. First, understand the actual Codex architecture<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Three distinctions are essential before writing any configuration.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Feature<\/th><th>Correct mechanism<\/th><th>Invocation<\/th><\/tr><tr><td>Explicit reusable skill<\/td><td><code>SKILL.md<\/code><\/td><td><code>$refactor<\/code><\/td><\/tr><tr><td>Automatic intent-based skill selection<\/td><td><code>SKILL.md<\/code> description<\/td><td>Codex chooses a relevant skill<\/td><\/tr><tr><td>Actual custom slash command<\/td><td>Legacy custom prompt<\/td><td><code>\/prompts:refactor<\/code><\/td><\/tr><tr><td>Repository-wide instructions<\/td><td><code>AGENTS.md<\/code><\/td><td>Loaded as project guidance<\/td><\/tr><tr><td>Deterministic event interception<\/td><td>Codex lifecycle hooks<\/td><td>Events such as <code>PostToolUse<\/code><\/td><\/tr><tr><td>Deterministic CI enforcement<\/td><td>GitHub Actions or other CI<\/td><td>Push or pull request<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Important corrections to the proposed architecture:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Codex&#8217;s documented repository skill location is <code>.agents\/skills\/&lt;skill-name&gt;\/SKILL.md<\/code>, not <code>.codex\/skills\/<\/code>. The <code>.codex\/<\/code> directory is useful for repository-specific Codex configuration and hooks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Skills are explicitly invoked with <code>$skill-name<\/code>, rather than automatically becoming <code>\/skill-name<\/code> slash commands. The <code>\/skills<\/code> interface helps discover skills. Legacy custom prompts still provide <code>\/prompts:name<\/code>, but that mechanism is deprecated in favor of skills.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, implicit skill recognition is model-directed, not a guaranteed filesystem event listener. To guarantee a particular validation command runs after a supported edit operation, use a hook or CI pipeline rather than relying on a skill description alone. ChatGPT Learn+2<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These distinctions determine the implementation below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Directory blueprint<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use this structure in the root of a Git repository:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>my-project\/\n\u251c\u2500\u2500 AGENTS.md\n\u2502\n\u251c\u2500\u2500 .agents\/\n\u2502   \u2514\u2500\u2500 skills\/\n\u2502       \u251c\u2500\u2500 refactor\/\n\u2502       \u2502   \u251c\u2500\u2500 SKILL.md\n\u2502       \u2502   \u2514\u2500\u2500 agents\/\n\u2502       \u2502       \u2514\u2500\u2500 openai.yaml\n\u2502       \u2502\n\u2502       \u2514\u2500\u2500 db-performance-review\/\n\u2502           \u251c\u2500\u2500 SKILL.md\n\u2502           \u2514\u2500\u2500 agents\/\n\u2502               \u2514\u2500\u2500 openai.yaml\n\u2502\n\u251c\u2500\u2500 .codex\/\n\u2502   \u251c\u2500\u2500 hooks.json\n\u2502   \u2514\u2500\u2500 hooks\/\n\u2502       \u2514\u2500\u2500 db_performance.py\n\u2502\n\u251c\u2500\u2500 .github\/\n\u2502   \u2514\u2500\u2500 workflows\/\n\u2502       \u2514\u2500\u2500 db-performance.yml\n\u2502\n\u2514\u2500\u2500 tests\/\n    \u2514\u2500\u2500 test_db_performance.py<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">There are three configuration layers to understand:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Layer<\/th><th>Purpose<\/th><\/tr><tr><td><code>~\/.codex\/AGENTS.md<\/code><\/td><td>Global instructions for your local Codex environment<\/td><\/tr><tr><td><code>my-project\/AGENTS.md<\/code><\/td><td>Repository-specific engineering standards and conventions<\/td><\/tr><tr><td><code>my-project\/.agents\/skills\/<\/code><\/td><td>Reusable skills discoverable by Codex within the repository<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can also install personal skills at <code>~\/.agents\/skills\/<\/code>, or organization-managed skills at <code>\/etc\/codex\/skills\/<\/code>. Codex discovers repository skills from the current working directory up through the repository root. ChatGPT Learn+1<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Standard <code>SKILL.md<\/code> blueprint<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The minimum valid skill uses YAML frontmatter with two required fields:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n---\nname: example-skill\ndescription: Describe the task this skill performs and the circumstances in which Codex should select it.\n---\n\n# Example Skill\n\n## Instructions\n\n1. Inspect the relevant project files.\n2. Identify the requested changes.\n3. Apply the required workflow.\n4. Run the appropriate validations.\n5. Report changes, results, and limitations.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>name<\/code> is the skill identifier. <code>description<\/code> is its primary discovery and intent-matching metadata. Instructions in the Markdown body become relevant after the skill is selected.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For Codex-specific presentation and invocation policy, put optional configuration in <code>agents\/openai.yaml<\/code>, not invented frontmatter keys such as <code>hooks<\/code>, <code>triggers<\/code>, <code>on_file_change<\/code>, or <code>file_patterns<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Production-ready explicit skill: <code>$refactor<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Save this source as <code>.agents\/skills\/refactor\/SKILL.md<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n---\nname: refactor\ndescription: Safely refactor existing application code while preserving externally observable behavior, public APIs, and data contracts. Use only when the user explicitly requests the $refactor workflow to improve readability, modularity, maintainability, or complexity without changing features.\n---\n\n# Behavior-Preserving Refactor\n\n## Input contract\n\nAccept a file, module, function, folder, or explicitly\nidentified code region and optional goals.\n\nIf scope is ambiguous, inspect the current changes and ask\nfor a bounded target before touching unrelated code.\n\nTreat the user's requirements as the source of truth.\n\n## Procedure\n\n1. Inspect `AGENTS.md`, nested instructions, relevant files,\n   nearby tests, and `git status --short`. Leave unrelated\n   work untouched.\n\n2. State a concise refactor plan: target, invariants,\n   proposed changes, and verification commands.\n\n3. Identify behavior contracts: return values, errors,\n   side effects, API shape, serialization, persistence,\n   concurrency, performance-critical paths, and security.\n\n4. Establish a baseline by running the narrowest available\n   tests. Add characterization tests when appropriate.\n\n5. Apply the smallest coherent change. Prefer named helpers,\n   clearer control flow, reduced duplication, and bounded\n   functions over broad rewrites.\n\n6. Do not silently add dependencies, modify database schema,\n   change public APIs, or alter runtime behavior.\n\n7. Re-run targeted tests, type checks, and linters.\n   Compare against the baseline where possible.\n\n8. Review `git diff --check` and `git diff` for regressions,\n   unrelated edits, secrets, and formatting churn.\n\n## Safety rules\n\n- Never delete, reset, or overwrite uncommitted user work.\n- Never run destructive commands without authorization.\n- Never claim successful testing when tests were not run.\n- Separate behavior changes from behavior-preserving work.\n- Never commit or push unless explicitly requested.\n\n## Output contract\n\nReturn four sections:\n\n- Scope: what changed and why.\n- Behavior preserved: key invariants.\n- Verification: commands, results, and tests not run.\n- Risks \/ follow-ups: remaining issues.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next, save <code>.agents\/skills\/refactor\/agents\/openai.yaml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\ninterface:\n  display_name: \"Refactor\"\n  short_description: \"Safely refactor existing code without behavior changes\"\n  default_prompt: \"Use $refactor to refactor the specified files while preserving behavior and verifying tests.\"\n\npolicy:\n  allow_implicit_invocation: false\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The documented <code>allow_implicit_invocation: false<\/code> policy makes the skill explicit-only while retaining <code>$refactor<\/code> invocation. Test this behavior against your installed CLI version because some releases have had explicit-skill discovery issues. ChatGPT Learn+1<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Execute it in Codex<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">From the project root:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>codex<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then enter this in the Codex conversation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$refactor Refactor src\/services\/userService.ts.\n\nGoals:\n- Reduce cyclomatic complexity.\n- Extract duplicated validation logic.\n- Preserve all public APIs and return values.\n- Keep the existing error behavior.\n- Run the relevant tests.\n- Show the final diff and verification results.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected behavior: Codex resolves the named skill, follows its instructions, edits only the relevant files, runs supported tests, and reports the result. The outcome still depends on available tools, approvals, and repository state.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Production-ready dynamic skill: <code>db-performance-review<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Unlike <code>$refactor<\/code>, this skill allows implicit invocation. Codex can select it when the user&#8217;s task involves SQL queries, Prisma schemas, migrations, indexes, or ORM operations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Save as <code>.agents\/skills\/db-performance-review\/SKILL.md<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n---\nname: db-performance-review\ndescription: Review database query, SQL migration, ORM query, or schema changes for performance regressions. Use when tasks involve editing or reviewing .sql or .prisma files, database schemas, indexes, query builders, ORM repositories, or data access paths; assess query plans, indexes, cardinality, locks, and migration safety.\n---\n\n# Database Performance Review\n\n## Input contract\n\nAccept a planned or completed change to SQL queries,\nmigration files, Prisma schemas, ORM query builders,\nor data access modules.\n\nDo not treat every code edit as database work.\n\n## Procedure\n\n1. Read repository instructions, schema, and query files.\n   Determine the database engine and deployment context.\n\n2. Find changed database files using `git diff --name-only`,\n   `git status --short`, and the user's specified scope.\n\n3. Run the repository's static checker, when available:\n\n   `python3 .codex\/hooks\/db_performance.py --check-all`\n\n   Treat this as an anti-pattern scan, not a performance\n   benchmark.\n\n4. Inspect filters, joins, sorting, pagination, cardinality,\n   returned columns, N+1 queries, and index coverage.\n\n5. For migrations, assess lock duration, backfills,\n   uniqueness constraints, transactional behavior,\n   deployment compatibility, and recovery strategy.\n\n6. When an authorized non-production database is available,\n   inspect representative query plans with\n   `EXPLAIN (FORMAT JSON)`.\n\n7. Run `EXPLAIN ANALYZE` only when separately authorized\n   and safe. Do not analyze writes against production.\n\n8. Compare actual query plans and benchmarks against\n   verified baselines whenever available.\n\n9. Propose minimal fixes, verify them, and distinguish\n   demonstrated improvements from hypotheses.\n\n## Safety rules\n\n- Never print database credentials or customer records.\n- Never silently connect to a production database.\n- Never execute production migrations as part of a review.\n- Never invent performance metrics.\n- Never present static heuristics as proof of query speed.\n\n## Output contract\n\nReturn:\n\n- Changed paths\n- Findings and severity\n- Index and query-plan recommendations\n- Commands executed and actual results\n- Remaining risks and next actions\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save as <code>.agents\/skills\/db-performance-review\/agents\/openai.yaml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\ninterface:\n  display_name: \"DB Performance Review\"\n  short_description: \"Check database changes for query and schema risks\"\n  default_prompt: \"Use $db-performance-review to inspect the changed SQL, ORM, and schema files for performance risks.\"\n\npolicy:\n  allow_implicit_invocation: true\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Test implicit recognition<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Enter this in a new Codex session, without referencing the skill by name:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>I modified prisma\/schema.prisma and two SQL queries.\nReview these changes for performance regressions,\nmissing indexes, migration risks, and expensive query patterns.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Codex should consider the database review skill because the task matches its description. Whether it selects the skill is a model decision, not a guaranteed event. ChatGPT Learn<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. Deterministic event automation with Codex hooks<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For the stronger requirement \u2014 run a check when Codex updates a database-related file \u2014 use <code>PostToolUse<\/code> hooks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The complete starter implements this sequence:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SessionStart<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Record SHA-256 hashes of monitored database files<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Codex edits a SQL, Prisma, or database module<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Through a supported local tool<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PostToolUse<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Compare hashes and scan changed SQL files<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No flagged patterns<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Report clean static checks<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Potential issue<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Send findings to Codex for review<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Hook registration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Save as <code>.codex\/hooks.json<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n{\n  \"description\": \"Database change detection and static performance review for Codex local sessions.\",\n  \"hooks\": {\n    \"SessionStart\": &#91;\n      {\n        \"matcher\": \"startup|resume|clear|compact|fork\",\n        \"hooks\": &#91;\n          {\n            \"type\": \"command\",\n            \"command\": \"python3 \\\"$(git rev-parse --show-toplevel)\/.codex\/hooks\/db_performance.py\\\" --seed\",\n            \"timeout\": 30,\n            \"statusMessage\": \"Initializing database change detection\"\n          }\n        ]\n      }\n    ],\n    \"PostToolUse\": &#91;\n      {\n        \"matcher\": \"Bash|apply_patch|Edit|Write\",\n        \"hooks\": &#91;\n          {\n            \"type\": \"command\",\n            \"command\": \"python3 \\\"$(git rev-parse --show-toplevel)\/.codex\/hooks\/db_performance.py\\\" --post\",\n            \"timeout\": 45,\n            \"statusMessage\": \"Checking database file changes\"\n          }\n        ]\n      }\n    ]\n  }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The matcher identifies supported tool operations, not filenames. The accompanying Python implementation checks which database-related files actually changed and sends feedback to Codex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The full <code>db_performance.py<\/code> implementation (approximately 300 lines) is included in both downloadable packages. It includes SHA-256 snapshots, session-specific state, basic concurrency protection, file classification, SQL heuristics, and CI operation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Codex hooks support events such as <code>SessionStart<\/code>, <code>PreToolUse<\/code>, and <code>PostToolUse<\/code>, with tool-specific matchers and structured responses. They require an enabled, trusted, supported runtime. They do not monitor every external filesystem write. ChatGPT Learn+2<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">6. Deployment, testing, and deliverables<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Complete 2026 Codex Skills guide<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1,200+ lines of Markdown containing the complete source files, architecture, installation steps, testing matrix, and troubleshooting reference.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Download full Markdown guide<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Deployable repository starter kit<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both skills, metadata, AGENTS.md, hooks, Python checker, tests, CI workflow, safe installer, and the guide.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Download repository starter ZIP<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Individually validated skill packages<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For installing just one skill instead of the whole starter repository.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Refactor skill ZIP<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Database Performance Review skill ZIP<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Quick deployment<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Download and extract the starter ZIP to a temporary directory. Then run the included conflict-aware installer from that directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 scripts\/install.py --repo \/absolute\/path\/to\/my-project<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If your repository already has <code>AGENTS.md<\/code>, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 scripts\/install.py \\\n  --repo \/absolute\/path\/to\/my-project \\\n  --skip-agents<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Manually merge the relevant guidance into the existing <code>AGENTS.md<\/code>. The installer refuses to overwrite differing existing files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Verification commands<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run from the target repository root:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Validate hook configuration\npython3 -m json.tool .codex\/hooks.json\n\n# Compile the checker\npython3 -m py_compile .codex\/hooks\/db_performance.py\n\n# Run the unit test suite\npython3 -m unittest discover -s tests -v\n\n# Static database performance scan\npython3 .codex\/hooks\/db_performance.py --check-all\n\n# Strict scan, suitable for an enforcement gate\npython3 .codex\/hooks\/db_performance.py --check-all --strict\n\n# Check repository changes\ngit diff --check\ngit status --short<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next, start Codex:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>codex<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>\/skills<\/code> to check discovery, <code>\/hooks<\/code> to inspect and trust the configured lifecycle hooks, and <code>$refactor<\/code> to test explicit invocation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Test matrix<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Test<\/th><th>Expected outcome<\/th><\/tr><tr><td>Explicit <code>$refactor<\/code><\/td><td>Refactor skill selected<\/td><\/tr><tr><td>Natural-language database performance request<\/td><td>DB skill considered through intent matching<\/td><\/tr><tr><td>Unrelated UI edit<\/td><td>No database-specific skill needed<\/td><\/tr><tr><td>Codex changes <code>.sql<\/code> file<\/td><td>PostToolUse detects the modified file<\/td><\/tr><tr><td>Codex changes <code>.prisma<\/code> file<\/td><td>Schema change detected<\/td><\/tr><tr><td>Codex edits unrelated file<\/td><td>No DB change report<\/td><\/tr><tr><td>SQL contains <code>SELECT *<\/code><\/td><td>Static checker reports an advisory<\/td><\/tr><tr><td>Pull request introduces a flagged pattern<\/td><td>Strict GitHub Actions check fails<\/td><\/tr><tr><td>Restart after skill update<\/td><td>Updated skill discoverable<\/td><\/tr><tr><td>Hook not trusted<\/td><td>Hook execution not assumed<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Validation results<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">4 of 4 local tests passed<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both skill structures validated successfully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The hook JSON parsed successfully, the Python checker compiled, and the ZIP archive passed its integrity check. I also tested the installer in a disposable Git repository, including its refusal to overwrite an existing modified <code>AGENTS.md<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remaining runtime verification: Codex CLI is not installed in this environment, so live skill invocation, model-driven intent matching, and hook trust\/execution have not been tested here. The Markdown guide provides the exact steps to complete those tests on your machine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The recommended production setup is to use skills for reusable agent behavior, <code>AGENTS.md<\/code> for project policy, trusted lifecycle hooks for immediate local feedback, and CI for independent enforcement. That gives you both the convenience of intelligent skill selection and a reliable validation layer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Behavior-Preserving Refactor<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Safely refactor existing application code while preserving externally observable behavior, public APIs, and data contracts. Use only when the user explicitly requests the $refactor workflow to improve readability, modularity, maintainability, or complexity without changing features.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Try in chat<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Database Performance Review<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Review database query, SQL migration, ORM query, or schema changes for performance regressions. Use when tasks involve editing or reviewing .sql or .prisma files, database schemas, indexes, query builders, ORM repositories, or data access paths; assess query plans, indexes, cardinality, locks, and migration safety.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Try in chat<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Production-grade tutorial | Codex CLI, IDE extension, repository skills, dynamic intent recognition, lifecycle hooks, and automated validation | November 2026 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5840","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/5840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=5840"}],"version-history":[{"count":1,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/5840\/revisions"}],"predecessor-version":[{"id":5841,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/5840\/revisions\/5841"}],"wp:attachment":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=5840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=5840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=5840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}