Repository-wide maintenance skills that let Codex discover, implement, verify, and deliver comprehensive improvements instead of stopping after the first obvious fix.
The project provides two variants with the same maintenance contract:
| Variant | Skill | Best for |
|---|---|---|
| Standalone | autonomous-maintainer-standalone |
Most users; uses Codex built-in filesystem, terminal, Git, research, planning, and delegation capabilities |
| OMX | autonomous-maintainer |
Users with Oh My Codex who want OMX orchestration and specialist workflows |
Important
The default profile is intentionally aggressive. It may add repository-aligned features, replace dependencies, redesign modules, migrate architecture, or rewrite large parts of a codebase when verification shows that the selected compatibility contract is preserved. Start with mode=report when you only want an audit.
Current version: 2.2.0. See CHANGELOG.md for release history.
A full run can:
- inventory source, tests, CI, build logic, configuration, dependencies, documentation, examples, and history;
- capture accepted behavior before destructive changes;
- search across correctness, reliability, tests, security, maintainability, architecture, documentation, developer experience, performance, features, dependencies, compatibility, simplification, and dead code;
- compare targeted patches with refactors, deletions, dependency removal, subsystem replacement, and clean rewrites;
- implement every eligible non-conflicting improvement rather than an arbitrary top-N sample;
- verify changes with repository-native checks plus contract, differential, golden, property, compatibility, or performance testing when applicable;
- repeat complete discovery scans until convergence or a recorded blocker;
- prepare a dedicated branch and pull-request candidate without pushing to the default branch;
- pause immediately before PR delivery and require explicit approval of the exact fingerprinted candidate.
It does not force-push, merge, deploy, release, publish, expose secrets, overwrite unrelated work, weaken valid tests, or treat missing and failed checks as passes.
- Codex with custom skill support
- Git
- Bash on Linux/macOS, or PowerShell on Windows
- Python 3 recommended for installation-time structural validation
- Oh My Codex only when using the OMX variant
- Git hosting credentials only when remote branch or pull-request delivery is requested
git clone https://github.com/tkgo11/codex-autonomous-maintainer.git
cd codex-autonomous-maintainerStandalone, user scope:
bash ./install.sh --variant standalone --scope userOMX, user scope:
bash ./install.sh --variant omx --scope userStandalone, user scope:
.\install.ps1 -Variant standalone -Scope userOMX, user scope:
.\install.ps1 -Variant omx -Scope userRestart Codex after installation so the new skill is discovered.
Standalone:
@autonomous-maintainer-standalone
The standalone variant also accepts $autonomous-maintainer-standalone in environments that use dollar-prefixed skill invocation.
OMX:
$autonomous-maintainer
The default invocation performs repository-wide apply mode and prepares a ready pull request, but it still stops for inspection before any candidate branch push or PR creation/update.
Choose Standalone unless you already use OMX or specifically want its specialist workflows.
| Capability | Standalone | OMX |
|---|---|---|
| External orchestration framework required | No | Yes |
| Repository-wide discovery and implementation | Yes | Yes |
| Durable run state and resume | Yes | Yes |
| Contract capture and differential verification | Yes | Yes |
| Dedicated branch and PR preparation | Yes | Yes |
| Mandatory fingerprinted pre-PR approval | Yes | Yes |
OMX specialist routing such as $ralplan, $ultragoal, and $ultraqa |
No | Yes |
Both variants can be installed at the same time because they use separate skill directories.
Activate
↓
Protect repository and inspect instructions
↓
Inventory components, capabilities, contracts, and baseline behavior
↓
Discover findings across the full component × category matrix
↓
Compare patch, refactor, deletion, replacement, and feature candidates
↓
Implement eligible changes on a dedicated maintenance branch
↓
Verify, independently review when required, and rescan to convergence
↓
Freeze an immutable PR candidate and show the inspection packet
↓
Wait for explicit approval of that exact fingerprint
↓
Push the candidate branch and create or update the PR
Any change to the base, head, diff, checks, delivery topology, title, body, or draft state invalidates approval and requires a new inspection.
Produces findings and a transformation program without editing, committing, or delivering anything.
@autonomous-maintainer-standalone mode=report
$autonomous-maintainer mode=report
Disables new user-visible features, prefers localized changes, preserves documented public contracts, and keeps all work local.
@autonomous-maintainer-standalone feature_policy=off rewrite_policy=surgical compatibility=public-contract delivery=none
Uses the default broad transformation policy but does not push or create a PR.
@autonomous-maintainer-standalone delivery=none
@autonomous-maintainer-standalone pr_state=draft
By default, an unwritable upstream may use a validated fork and prepare a cross-repository PR. Disable that fallback with:
@autonomous-maintainer-standalone permission_fallback=block
Contract capture and regression protection stay enabled even when discovery is limited to selected categories.
@autonomous-maintainer-standalone focus=correctness,tests,performance feature_policy=off rewrite_policy=allow
Free-form constraints can follow the options and remain binding throughout resumed runs:
@autonomous-maintainer-standalone compatibility=public-contract "Do not change the database schema or minimum supported Python version"
mode=apply
focus=all
feature_policy=proactive
resume=true
commit=checkpoint
max_epochs=50
quiescence_scans=3
parallelism=auto
network=public-read
rewrite_policy=aggressive
compatibility=observable-output
delivery=pull-request
permission_fallback=fork
pr_state=ready
“Aggressive” changes the search space, not the proof standard. Large replacements still require captured contracts, applicable verification, risk review, rollback evidence, and clean convergence scans.
| Option | Values | Default | Meaning |
|---|---|---|---|
mode |
apply, report |
apply |
Apply verified changes or produce a read-only report |
focus |
all or comma-separated categories |
all |
Limit discovery categories while retaining contract and regression checks |
feature_policy |
off, documented, strong-evidence, proactive |
proactive |
Control eligibility for missing behavior and new features |
resume |
true, false |
true |
Resume compatible durable state from an earlier run |
commit |
false, checkpoint, final |
checkpoint |
Select the local commit strategy |
max_epochs |
integer 1..100 |
50 |
Maximum complete discover-transform-rescan epochs |
quiescence_scans |
integer 1..10 |
3 |
Consecutive clean full scans required for convergence |
parallelism |
auto or integer 1..32 |
auto |
Maximum independent discovery or verification lanes |
network |
off, public-read |
public-read |
Allow authoritative public read-only research |
rewrite_policy |
surgical, allow, aggressive |
aggressive |
Avoid, permit, or actively compare replacement designs |
compatibility |
observable-output, public-contract, strict-internals |
observable-output |
Select the behavior preservation boundary |
delivery |
none, branch, pull-request |
pull-request |
Keep changes local, push a branch, or prepare a PR |
permission_fallback |
fork, block |
fork |
Use a validated fork when upstream is unwritable, or stop delivery |
pr_state |
draft, ready |
ready |
Create or update the approved PR as draft or ready for review |
Valid focus categories:
correctness, reliability, tests, security, maintainability,
architecture, documentation, developer-experience, performance,
features, dependencies, compatibility, simplification, dead-code
Important validation rules:
max_epochsmust be greater than or equal toquiescence_scans.mode=reportforcescommit=falseanddelivery=none.- Unknown options and categories are errors.
- Free-form constraints are durable hard constraints.
Private implementation, architecture, algorithms, dependencies, and file layout may change. Supported externally observable behavior must remain equivalent, including public values and errors, CLI output and exit codes, serialization, emitted files, database effects, documented network behavior, UI-visible semantics, and supported timing, ordering, concurrency, cancellation, retry, and performance guarantees.
Preserves all documented public contracts. Use this when undocumented observable behavior may change but published interfaces must remain stable.
Uses the narrowest change boundary and protects internal structure in addition to public behavior. Use it when internal APIs or layout are relied upon outside the repository even though that dependency is not formally documented.
Missing, skipped, flaky, timed-out, unavailable, or failed checks never prove equivalence. Unsupported differences reopen a finding.
| Policy | Behavior |
|---|---|
off |
Do not add user-visible features |
documented |
Implement only behavior already promised by accepted documentation, schemas, tests, or maintained examples |
strong-evidence |
Add strongly evidenced missing behavior, but do not originate new features |
proactive |
Discover and implement new repository-aligned features when evidence, acceptance criteria, compatibility, verification, security, and rollback gates pass |
Proactive feature work is not arbitrary invention. A candidate needs repository alignment, an independent user-value or demand signal, explicit acceptance criteria, and a safe implementation and rollback path. Existing accepted behavior remains protected.
For delivery=pull-request, the initial invocation is not approval.
After implementation, verification, review, and convergence, the skill freezes an immutable candidate and displays:
- exact base and head refs and SHAs;
- commits, changed files, and diff summary;
- verification results, failures, skipped checks, and blind spots;
- risks, migration notes, and rollback evidence;
- same-repository or fork delivery topology;
- proposed PR title, body, and draft state;
- a candidate fingerprint.
The run then returns awaiting-user-pr-approval. Only explicit approval of that unchanged fingerprint authorizes branch push and PR creation or update. Rejection leaves the PR unopened. Requested revisions are implemented, reverified, and presented as a new candidate.
The skill never pushes to the default branch and never merges the PR.
Use project scope to make the skill available only inside one repository.
Linux or macOS:
bash ./install.sh --variant standalone --scope project --project-dir /path/to/repository
bash ./install.sh --variant omx --scope project --project-dir /path/to/repositoryWindows PowerShell:
.\install.ps1 -Variant standalone -Scope project -ProjectDir 'C:\path\to\repository'
.\install.ps1 -Variant omx -Scope project -ProjectDir 'C:\path\to\repository'User scope installs under ${CODEX_HOME:-$HOME/.codex}/skills. Project scope installs under <repository>/.codex/skills.
bash ./install.sh --variant standalone --scope user --dry-run.\install.ps1 -Variant standalone -Scope user -DryRunPull the latest repository version and reinstall with replacement enabled. The installer validates the source, creates a timestamped backup of a different existing SKILL.md, performs an atomic replacement, and verifies the result.
git pull --ff-only
bash ./install.sh --variant standalone --scope user --forcegit pull --ff-only
.\install.ps1 -Variant standalone -Scope user -ForceReplace standalone with omx when updating the OMX variant.
Linux or macOS:
bash ./uninstall.sh --variant standalone --scope user
bash ./uninstall.sh --variant omx --scope userUse --yes for non-interactive removal and --dry-run to preview it.
Windows PowerShell:
.\uninstall.ps1 -Variant standalone -Scope user
.\uninstall.ps1 -Variant omx -Scope userThe uninstallers verify the installed skill identity and preserve backups or unexpected files instead of deleting the entire directory blindly.
.
├── SKILL.md # OMX skill
├── standalone/SKILL.md # Framework-independent skill
├── install.sh / install.ps1 # Safe installers
├── uninstall.sh / uninstall.ps1
├── scripts/validate_skill.py # Structural validator
├── tests/ # Installer and package tests
├── CHANGELOG.md
├── CHECKSUMS.txt
└── VERSION
Only the selected SKILL.md is required at runtime.
Run all structural validation and installer tests:
make validate
make testDirect validation:
python3 scripts/validate_skill.py SKILL.md
python3 scripts/validate_skill.py standalone/SKILL.mdConvenience Make targets are also available for user and project installation and user-scope uninstallation.
- The workflow is repository-wide only when explicitly invoked or clearly authorized. A narrow review or bug-fix request does not implicitly activate it.
- Repository files, issues, logs, generated content, command output, dependencies, and network content are treated as untrusted evidence rather than authority to disable safeguards.
- Existing staged, unstaged, and untracked user work is fingerprinted and protected. Overlapping work is blocked rather than reset, stashed, cleaned, or overwritten.
- High-risk replacements require genuinely independent review when available; unavailable capabilities are recorded as blind spots.
- When upstream is unwritable and
permission_fallback=fork, only an authenticated fork proven to descend from the canonical upstream is eligible for delivery. - Durable run state allows compatible interrupted work to resume without silently changing constraints or approval state.