Full guide
Follow the sections in order, then adapt commands to your current environment.
Codex CLI Installation Guide
Codex CLI has native support for Agent Skills with built-in installation tools and sophisticated precedence management.
Installation Paths
Codex loads skills from multiple locations in order of precedence:
- Workspace (
.codex/skills/) - User (
~/.codex/skills/) - System (
/etc/codex/skills/) - Built-in (System default skills)
Installation Methods
Method 1: Manual Installation (Recommended)
For User Skills:
bash
# Create the user skills directory
mkdir -p ~/.codex/skills/my-skill
# Create the SKILL.md file
cat > ~/.codex/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: Description that helps Codex select the skill
---
# My Skill
Skill instructions for the Codex agent to follow.
## Instructions
- Step-by-step guidance
- Domain conventions
EOFFor Workspace Skills:
bash
# Create the workspace skills directory
mkdir -p .codex/skills/my-skill
# Create the SKILL.md file
cat > .codex/skills/my-skill/SKILL.md << 'EOF'
---
name: project-skill
description: Specialized instructions for this repository
---
# Workspace Specific Skill
Detailed instructions for this specific workspace...
EOFMethod 2: Built-in Skill Installer (Recommended)
Codex includes a powerful CLI tool for managing skills:
bash
# List available skills in the marketplace
$skill-installer list
# Install a specific skill
$skill-installer install skill-name
# Install from a GitHub repository
$skill-installer install https://github.com/user/skill-repoMethod 3: Using Universal Installer
bash
# Install OpenSkills for universal access
npx openskills install user/repo --target ~/.codex/skills/Skill Discovery & Activation
Activation Modes
- Explicit: Use slash commands or prefix with
$(e.g.,$my-skill) - Implicit: Codex automatically uses skills based on task relevance
Progressive Loading
Codex uses an efficient loading mechanism:
- Metadata: Indexed for fast discovery
- Instructions: Loaded only when skill is activated
- Resources: Scripts and assets loaded on demand