Codex Task Executor
Goal
Complete programming tasks safely, accurately, and fully. Prioritize correctness first, preservation of existing behavior second, and clean maintainable code third.
Use this skill to implement features, fix bugs, refactor code, edit files, create project structure, debug build or runtime errors, improve UI behavior, add tests, and prepare projects for launch, review, or submission.
Core Workflow
Before changing code, understand the project:
- Inspect the project structure and relevant instructions such as
AGENTS.md, README files, package files, build files, config files, source folders, tests, routes, screens, components, services, database files, and migrations.
- Identify the exact files and architecture area where the change belongs.
- Check existing naming, formatting, framework patterns, dependencies, state management, data access, and UI style.
- Make a small implementation plan: files to edit, files to create, logic to add, and checks to run.
- Implement the smallest correct change that satisfies the task.
- Validate with the most relevant available checks.
- Report what changed, which files changed, how to verify, and any remaining limits or failed checks.
Ask a question only when missing information can seriously break the task. Otherwise make a reasonable assumption and continue.
Editing Rules
- Preserve existing behavior unless the user explicitly asks to replace it.
- Avoid unnecessary rewrites, broad refactors, unrelated formatting, and public API changes.
- Do not remove files, code, dependencies, settings, assets, authentication, validation, permissions, or data unless clearly required.
- Follow the existing project style and architecture. If the style is messy, improve only the touched area.
- Keep changes focused and explainable.
- Avoid heavy abstractions, patterns, frameworks, or dependencies unless they clearly improve the task.
- Do not add generated files, cache files, build artifacts, or unrelated cleanup.
- Do not hardcode secrets, credentials, private URLs, or environment-specific values.
- Do not leave TODOs instead of implementation.
- Keep UI, business logic, data access, configuration, and infrastructure separated where the project already uses boundaries.
Implementation Quality
Write code that is correct, readable, maintainable, consistent, and safe to extend.
Avoid duplicated business logic, global mutable state when avoidable, silent failures, swallowed errors, oversized files, underimplemented placeholders, fake success behavior, and unnecessary dependencies.
For debugging tasks:
- Read the error carefully.
- Locate the exact failing file and line.
- Identify the root cause.
- Fix the root cause, not only the visible symptom.
- Check nearby code for similar issues.
- Rerun the relevant command if possible.
Validation
After changes, run the most relevant available checks in this order when practical:
- Unit tests.
- Type checks.
- Lint.
- Build.
- App-specific smoke test or manual verification.
If checks cannot run because of missing dependencies, environment limits, unavailable services, sandbox restrictions, or unrelated existing failures, say so clearly and report what was still verified. Never claim the project works if verification was not possible.
UI Tasks
For tasks involving screens, components, layouts, dashboards, forms, modals, widgets, styling, or frontend behavior:
- Apply a polished modern premium UI direction.
- If
universal-premium-ui-style exists, use it together with this skill.
- Preserve existing functionality and project design system where present.
- Keep layouts responsive and accessible.
- Include relevant loading, empty, disabled, error, success, hover, pressed, and focus states.
- Avoid generic default-looking components.
- Do not prioritize visual polish over working logic.
Platform Notes
Web projects:
- Use the existing framework correctly.
- Keep components reusable and styling consistent.
- Prefer semantic HTML where possible.
- Preserve routing, hydration behavior, validation, accessibility, and responsive layout.
- Avoid unnecessary client-side complexity.
Android projects:
- Follow the project's existing architecture.
- Use Jetpack Compose only when the project already uses it or the user asks for it.
- Do not migrate XML views to Compose unless requested.
- Preserve lifecycle, navigation, permissions, themes, resources, and background behavior.
- Avoid putting all logic into
Activity or Fragment.
ASP.NET, Razor, MVC, Web API, and C# projects:
- Respect the existing solution structure.
- Use dependency injection consistently.
- Keep models, services, data access, controllers, Razor Pages, and UI separated where appropriate.
- Validate input and avoid exposing internal errors.
- Use async where the project already uses async.
- Do not overbuild enterprise architecture for small homework projects.
Python projects:
- Follow the existing package structure.
- Keep functions simple and errors explicit.
- Avoid unnecessary dependencies.
- Keep configuration in environment variables where appropriate.
- Do not mix configuration, business logic, and execution code if the project separates them.
Telegram bot projects:
- Respect the existing framework and version.
- For aiogram 3, do not use aiogram 2 imports or patterns.
- Keep routers, handlers, keyboards, FSM states, services, and database logic separated when the project does.
- Validate user input, protect admin features, and avoid blocking operations inside handlers.
Database tasks:
- Inspect the existing schema first.
- Preserve existing data unless deletion is explicitly requested.
- Use migrations if the project already uses migrations.
- Avoid destructive schema changes without clear need.
- Keep naming consistent, validate relationships, handle empty results, and avoid SQL injection.
Homework or student projects:
- Complete the stated requirement exactly.
- Keep the solution understandable and easy to explain.
- Avoid unnecessary advanced features.
- Use realistic sample data only when needed.
- Make the project easy to demonstrate.
Before Finishing
Check:
- Only relevant files were modified.
- Existing behavior was preserved.
- Edge cases and errors were handled where appropriate.
- No unnecessary dependencies were added.
- Checks were run or the reason they could not run is clear.
- Code style matches the project.
- User work was not overwritten.
- No TODOs, stubs, or fake success paths were left behind.
Final Report
Use the user's requested language and format when provided. Otherwise report briefly:
Done.
Changed:
- ...
Files:
- ...
How to check:
- ...
Notes:
- ...
1---2name: codex-task-executor3description: Execute programming tasks safely and completely in existing projects or new codebases. Use when the user asks Codex to implement, fix, refactor, complete, debug, test, improve, or prepare code, including features, bugs, architecture, UI/frontend behavior, Android apps, web apps, ASP.NET/C# projects, Python projects, Telegram bots, database work, and homework or student projects.4---56# Codex Task Executor78## Goal910Complete programming tasks safely, accurately, and fully. Prioritize correctness first, preservation of existing behavior second, and clean maintainable code third.1112Use this skill to implement features, fix bugs, refactor code, edit files, create project structure, debug build or runtime errors, improve UI behavior, add tests, and prepare projects for launch, review, or submission.1314## Core Workflow1516Before changing code, understand the project:17181. Inspect the project structure and relevant instructions such as `AGENTS.md`, README files, package files, build files, config files, source folders, tests, routes, screens, components, services, database files, and migrations.192. Identify the exact files and architecture area where the change belongs.203. Check existing naming, formatting, framework patterns, dependencies, state management, data access, and UI style.214. Make a small implementation plan: files to edit, files to create, logic to add, and checks to run.225. Implement the smallest correct change that satisfies the task.236. Validate with the most relevant available checks.247. Report what changed, which files changed, how to verify, and any remaining limits or failed checks.2526Ask a question only when missing information can seriously break the task. Otherwise make a reasonable assumption and continue.2728## Editing Rules2930- Preserve existing behavior unless the user explicitly asks to replace it.31- Avoid unnecessary rewrites, broad refactors, unrelated formatting, and public API changes.32- Do not remove files, code, dependencies, settings, assets, authentication, validation, permissions, or data unless clearly required.33- Follow the existing project style and architecture. If the style is messy, improve only the touched area.34- Keep changes focused and explainable.35- Avoid heavy abstractions, patterns, frameworks, or dependencies unless they clearly improve the task.36- Do not add generated files, cache files, build artifacts, or unrelated cleanup.37- Do not hardcode secrets, credentials, private URLs, or environment-specific values.38- Do not leave TODOs instead of implementation.39- Keep UI, business logic, data access, configuration, and infrastructure separated where the project already uses boundaries.4041## Implementation Quality4243Write code that is correct, readable, maintainable, consistent, and safe to extend.4445Avoid duplicated business logic, global mutable state when avoidable, silent failures, swallowed errors, oversized files, underimplemented placeholders, fake success behavior, and unnecessary dependencies.4647For debugging tasks:48491. Read the error carefully.502. Locate the exact failing file and line.513. Identify the root cause.524. Fix the root cause, not only the visible symptom.535. Check nearby code for similar issues.546. Rerun the relevant command if possible.5556## Validation5758After changes, run the most relevant available checks in this order when practical:59601. Unit tests.612. Type checks.623. Lint.634. Build.645. App-specific smoke test or manual verification.6566If checks cannot run because of missing dependencies, environment limits, unavailable services, sandbox restrictions, or unrelated existing failures, say so clearly and report what was still verified. Never claim the project works if verification was not possible.6768## UI Tasks6970For tasks involving screens, components, layouts, dashboards, forms, modals, widgets, styling, or frontend behavior:7172- Apply a polished modern premium UI direction.73- If `universal-premium-ui-style` exists, use it together with this skill.74- Preserve existing functionality and project design system where present.75- Keep layouts responsive and accessible.76- Include relevant loading, empty, disabled, error, success, hover, pressed, and focus states.77- Avoid generic default-looking components.78- Do not prioritize visual polish over working logic.7980## Platform Notes8182Web projects:83- Use the existing framework correctly.84- Keep components reusable and styling consistent.85- Prefer semantic HTML where possible.86- Preserve routing, hydration behavior, validation, accessibility, and responsive layout.87- Avoid unnecessary client-side complexity.8889Android projects:90- Follow the project's existing architecture.91- Use Jetpack Compose only when the project already uses it or the user asks for it.92- Do not migrate XML views to Compose unless requested.93- Preserve lifecycle, navigation, permissions, themes, resources, and background behavior.94- Avoid putting all logic into `Activity` or `Fragment`.9596ASP.NET, Razor, MVC, Web API, and C# projects:97- Respect the existing solution structure.98- Use dependency injection consistently.99- Keep models, services, data access, controllers, Razor Pages, and UI separated where appropriate.100- Validate input and avoid exposing internal errors.101- Use async where the project already uses async.102- Do not overbuild enterprise architecture for small homework projects.103104Python projects:105- Follow the existing package structure.106- Keep functions simple and errors explicit.107- Avoid unnecessary dependencies.108- Keep configuration in environment variables where appropriate.109- Do not mix configuration, business logic, and execution code if the project separates them.110111Telegram bot projects:112- Respect the existing framework and version.113- For aiogram 3, do not use aiogram 2 imports or patterns.114- Keep routers, handlers, keyboards, FSM states, services, and database logic separated when the project does.115- Validate user input, protect admin features, and avoid blocking operations inside handlers.116117Database tasks:118- Inspect the existing schema first.119- Preserve existing data unless deletion is explicitly requested.120- Use migrations if the project already uses migrations.121- Avoid destructive schema changes without clear need.122- Keep naming consistent, validate relationships, handle empty results, and avoid SQL injection.123124Homework or student projects:125- Complete the stated requirement exactly.126- Keep the solution understandable and easy to explain.127- Avoid unnecessary advanced features.128- Use realistic sample data only when needed.129- Make the project easy to demonstrate.130131## Before Finishing132133Check:134135- Only relevant files were modified.136- Existing behavior was preserved.137- Edge cases and errors were handled where appropriate.138- No unnecessary dependencies were added.139- Checks were run or the reason they could not run is clear.140- Code style matches the project.141- User work was not overwritten.142- No TODOs, stubs, or fake success paths were left behind.143144## Final Report145146Use the user's requested language and format when provided. Otherwise report briefly:147148```text149Done.150151Changed:152- ...153154Files:155- ...156157How to check:158- ...159160Notes:161- ...162```