home / skills / yeachan-heo / oh-my-claudecode / ask-codex

ask-codex skill

/skills/ask-codex

This skill helps you query Codex via a local CLI and capture reusable artifacts for multi-agent workflows.

npx playbooks add skill yeachan-heo/oh-my-claudecode --skill ask-codex

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
664 B
---
name: ask-codex
description: Ask Codex via local CLI and capture a reusable artifact
---

# Ask Codex

Use Codex as an external advisor through OMC's ask command.

## Usage

```bash
/oh-my-claudecode:ask-codex <question or task>
```

## Routing

Preferred path:

```bash
omc ask codex "{{ARGUMENTS}}"
```

Wrapper alias (compatibility):

```bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/ask-codex.sh" "{{ARGUMENTS}}"
```

## Requirements

- Local Codex CLI must be installed and authenticated.
- Verify with:

```bash
codex --version
```

## Artifacts

`omc ask` writes artifacts to:

```text
.omc/artifacts/ask/codex-<slug>-<timestamp>.md
```

Task: {{ARGUMENTS}}

Overview

This skill lets you query Codex from your local CLI and saves the response as a reusable artifact. It integrates with the Oh My Claude Code (omc) tooling so teams can capture external advice in a consistent, timestamped format. Use it to turn ad-hoc Codex outputs into shareable documents for later reference or automation.

How this skill works

Invoke the ask command with a natural-language question or task and the skill routes the request to the local Codex CLI. The cli must be installed and authenticated on the host; the skill detects and calls the codex binary to get a response. Each response is written as a markdown artifact into the artifacts directory with a slug and timestamp for easy retrieval and reuse.

When to use it

  • You need quick coding suggestions or transformation rules from Codex during a workflow.
  • Capturing reproducible advice or code snippets for team review and archival.
  • In pipelines where external model output must be stored as a formal artifact.
  • When integrating human-in-the-loop guidance into multi-agent or automated tasks.
  • For compatibility with legacy scripts that expect a codex CLI invocation.

Best practices

  • Ensure the local Codex CLI is installed and authenticated before running ask.
  • Phrase prompts clearly and include expected output format to make artifacts reusable.
  • Use consistent naming and tags in questions to make artifact slugs easy to find.
  • Review and sanitize model responses before using them in production code.
  • In CI or automation, fail gracefully if the codex binary is missing or returns an error.

Example use cases

  • Ask Codex to refactor a function and save the suggested implementation for team review.
  • Request a regex or parsing rule and archive the output as a spec artifact for downstream agents.
  • Generate unit test templates from a prompt and store them alongside the codebase for later execution.
  • Iteratively refine a code snippet with Codex, preserving each versioned artifact for audit and rollback.
  • Automate documentation snippets by asking Codex for concise explanations and saving them as markdown notes.

FAQ

What do I need installed locally?

You must have the Codex CLI installed and authenticated. Verify with codex --version before using the ask command.

Where are responses saved?

Responses are saved as markdown artifacts in .omc/artifacts/ask with a codex-<slug>-<timestamp>.md filename for easy tracking.