A reusable agent skill for OpenAI Codex that guides software design, implementation, bug fixing, refactoring, code review, and testing toward maintainable, secure, well-verified code.
The skill is language- and framework-neutral. It complements repository-specific instructions by adding a consistent engineering workflow: discover the existing system first, define the behavioral contract, make one coherent change, prove the behavior, and independently review the final diff.
- Repository-first discovery before editing
- Explicit inputs, outputs, invariants, ownership, and failure behavior
- Small, coherent changes that preserve compatibility
- Validation and secure handling at trust boundaries
- Behavior-focused unit, integration, and regression tests
- Independent final review for accidental changes, secrets, and stale code
The simplest Codex installation path is to invoke $skill-installer and ask it
to install write-maintainable-code from:
https://github.com/kai-chop/codex-write-maintainable-code/tree/main/skills/write-maintainable-code
For a repository-scoped manual installation, copy the skill directory to:
.agents/skills/write-maintainable-code
For a user-scoped manual installation, copy it to:
$HOME/.agents/skills/write-maintainable-code
Codex detects skill changes automatically. Restart Codex if the skill does not appear.
Invoke it explicitly:
$write-maintainable-code Implement this feature and add regression coverage.
Codex can also invoke it implicitly when a request changes executable behavior, including feature work, bug fixes, APIs, scripts, concurrency, persistence, security boundaries, performance-sensitive code, or tests.
skills/write-maintainable-code/
├── SKILL.md
├── agents/openai.yaml
├── references/engineering-foundations.md
└── scripts/install.ps1
SKILL.md contains the workflow. The reference file records the engineering
sources behind its design and review guidance. agents/openai.yaml provides
Codex UI metadata. The PowerShell script is a deterministic installer/checker
for Codex-home layouts that use a skills directory.
The guidance is derived from public primary sources:
- Google Engineering Practices
- Microsoft unit testing best practices
- NIST Secure Software Development Framework
- OWASP Secure Coding Practices
The package follows the Codex skill structure documented in Build skills.
This repository is licensed under the
PolyForm Noncommercial License 1.0.0
(PolyForm-Noncommercial-1.0.0).
Noncommercial use, study, modification, and redistribution are permitted under the license terms. Commercial use is not granted and requires separate permission from the licensor.
Because commercial use is restricted, this is public source but is not an OSI-approved open-source license.
Codex skill, agent skill, maintainable code, software engineering, clean code, code quality, code review, refactoring, unit testing, regression testing, secure coding, software design, developer tooling.