Collaborating-with-codex enables AI agents to delegate coding tasks to OpenAI Codex CLI. Operations teams benefit from multi-model collaboration on coding tasks. Integrates with Python-based workflows and supports Claude agents.
git clone https://github.com/GuDaStudio/collaborating-with-codex.gitCollaborating-with-codex is a Claude Code agent skill that bridges Claude with OpenAI Codex CLI for multi-model collaboration on coding tasks. The skill enables Claude to delegate algorithm implementation, debugging, and code analysis work to Codex while maintaining orchestration and refinement control. It supports multi-turn sessions with SESSION_ID, three sandboxed security levels (read-only, workspace-write, danger-full-access), and structured JSON output for easy integration into Python-based workflows. Operations teams and developers benefit from combining Claude's orchestration capabilities with Codex's specialized code execution abilities. Setup requires Codex CLI installed locally and copying the skill to your Claude Code directory.
[{"step":"Define the task clearly. Specify the programming language, coding standards (e.g., PEP 8, Google Style Guide), and any testing requirements (e.g., unit tests, integration tests).","tip":"Use specific keywords like 'REST API', 'database schema', or 'data processing pipeline' to guide Codex toward the right solution."},{"step":"Use the OpenAI Codex CLI to delegate the task. Run `codex run --language [LANGUAGE] --task '[TASK_DESCRIPTION]'` in your terminal. For example: `codex run --language python --task 'Create a FastAPI endpoint to fetch user data from PostgreSQL'`.","tip":"Include the project path or repository URL if Codex needs to reference existing code. For example: `codex run --language python --task 'Add a new feature to /src/utils/helpers.py' --project-path /path/to/project`."},{"step":"Review the generated code for correctness, security, and adherence to standards. Check for edge cases, error handling, and performance considerations.","tip":"Use tools like `pylint`, `flake8`, or `bandit` to automate code quality checks. For example: `pylint generated_code.py` or `bandit -r .`."},{"step":"Integrate the code into your project. Merge it into the appropriate branch, run tests, and deploy to staging or production.","tip":"Use CI/CD pipelines to automate testing and deployment. For example, set up GitHub Actions to run tests on every pull request."},{"step":"Document the changes. Update the project’s README or documentation to reflect the new feature or fix. Include examples of how to use the new code.","tip":"Use tools like `mkdocs` or `Sphinx` to generate documentation automatically from code comments."}]
Security code review with multi-turn follow-up analysis and fix suggestions
Algorithm implementation delegation while Claude handles workflow orchestration
Debugging and code analysis on codebases with visual context via image support
Cross-platform coding tasks with automatic Windows path handling
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/GuDaStudio/collaborating-with-codexCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use the OpenAI Codex CLI to [TASK] in [PROGRAMMING_LANGUAGE]. Ensure the code follows [CODING_STANDARDS] and includes [TESTING_REQUIREMENTS]. Delegate the task to Codex with the following instructions: [SPECIFIC_INSTRUCTIONS]. After Codex generates the code, review it for [KEY_CONSIDERATIONS] and integrate it into [PROJECT_PATH].
The OpenAI Codex CLI successfully generated a Python script for a REST API endpoint that fetches user data from a PostgreSQL database. The code follows PEP 8 standards, includes unit tests using pytest, and integrates with the existing FastAPI project in `/src/api/v1/`. Here’s a summary of the generated code:
```python
# Generated by Codex CLI - User Data API Endpoint
from fastapi import FastAPI, HTTPException
from sqlalchemy.orm import Session
from . import models, schemas
from .database import SessionLocal, engine
app = FastAPI()
# Dependency
async def get_db():
db = SessionLocal()
try:
yield db
finally:
db.close()
@app.get("/users/{user_id}", response_model=schemas.User)
async def read_user(user_id: int, db: Session = Depends(get_db)):
db_user = db.query(models.User).filter(models.User.id == user_id).first()
if db_user is None:
raise HTTPException(status_code=404, detail="User not found")
return db_user
```
The code includes:
- A FastAPI endpoint `/users/{user_id}` that returns a user’s data.
- SQLAlchemy ORM integration for database operations.
- Dependency injection for database sessions.
- Error handling for missing users.
- Unit tests generated in `/tests/test_api.py`:
```python
from fastapi.testclient import TestClient
from ..api.v1.main import app
client = TestClient(app)
def test_read_user():
response = client.get("/users/1")
assert response.status_code == 200
assert response.json()["id"] == 1
```
The integration was seamless, and the endpoint was deployed to the staging environment without errors. The team reviewed the code for security vulnerabilities and confirmed it met the project’s requirements.Automate your browser workflows effortlessly
Get more done every day with Microsoft Teams – powered by AI
Automate security compliance and monitor real-time security posture seamlessly.
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan