codex-deep
Skill1 starsChanged 4 months agoMITView on GitHub
Conducts first-principles technical research, mathematical derivations, algorithm design, and cross-domain invention for complex engineering challenges. Generates timestamped research specifications and mathematical models inside codex-drive/specs/.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- saembit/jefftheir own version, first seen Sep 22, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- saembit/jeff★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- codex-architectureSkill
- codex-brainSkill
- ai-codex-c-cppSkill
- ai-codex-csharp-dotnetSkill
- codex-debugSkill
- codex-elixirSkill
- codex-flutter-dartSkill
- codex-goalSkill
- ai-codex-goSkill
- ai-codex-java-kotlinSkill
- ai-codex-phpSkill
- codex-plansSkill
- ai-codex-pythonSkill
- codex-reviewSkill
- ai-codex-rustSkill
- codex-skillsSkill
- codex-solidity-web3Skill
- codex-sql-databaseSkill
- codex-startSkill
- ai-codex-swiftSkill
- codex-testSkill
- ai-codex-typescript-reactSkill
- ai-codex-ui-ux-designSkill
- codex-zigSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
When confronting hard computational limits (latency, throughput, cache contention, mathematical optimization)
- Very specific: line 66
All research documents generated by codex-deep MUST be Markdown (.md) files with exact date-time metadata.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codex Deep — First-Principles Research & Invention Skill
The deep research and invention engine of AI Codex. Explores theoretical foundations, derives mathematical proofs, invents novel algorithms, and solves problems where no conventional solution exists.
Overview
codex-deep is designed for engineering challenges that require stepping outside standard libraries and patterns. It approaches problems from first principles — stripping away conventional assumptions, analyzing theoretical physics/math/computational limits, designing bespoke data structures or algorithms, and producing rigorous research artifacts in codex-drive/specs/.
When to Trigger
- User runs
/codex-deep(e.g.,/codex-deep invent lock-free ring buffer for GPU-CPU shared memory,/codex-deep mathematical modeling of token bucket rate limiter,/codex-deep design spatial partitioning grid for 1M entities) - When confronting hard computational limits (latency, throughput, cache contention, mathematical optimization)
- Designing custom algorithms, protocols, compression codecs, or memory layouts
Execution Workflow
┌────────────────────────────────────────────────────────┐
│ 1. STRIP TO FIRST PRINCIPLES & FUNDAMENTAL INVARIANTS │
│ Define the problem in terms of physics, math & CLR. │
└──────────────────────────┬─────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ 2. THEORETICAL DERIVATION & MATHEMATICAL PROOF │
│ Formulate formulas, state invariants, complexity. │
└──────────────────────────┬─────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ 3. ALGORITHM & DATA STRUCTURE SYNTHESIS │
│ Design pseudo-code, memory layout, and access paths.│
└──────────────────────────┬─────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ 4. GENERATE TIMESTAMPED RESEARCH SPEC IN CODEX-DRIVE │
│ Write codex-drive/specs/YYYY-MM-DD-<slug>.research.md│
└──────────────────────────┬─────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ 5. TRANSITION TO PROTOTYPING & BENCHMARKS │
│ Recommend verification harness via /codex-test. │
└────────────────────────────────────────────────────────┘Research Spec File Specification (codex-drive/specs/)
All research documents generated by codex-deep MUST be Markdown (.md) files with exact date-time metadata.
Filename Format:
codex-drive/specs/YYYY-MM-DD-<slug>.research.md
Standard Research Document Template:
# [Topic / Invention Name] Technical Research & Proof
> **Created At**: YYYY-MM-DD HH:MM:SS (Local Time)
> **Active Codex Edition**: [`skills/codex/<edition>/`](file:///...)
> **Status**: THEORETICAL_DRAFT | VALIDATED | BENCHMARKED
> **Domain**: [e.g., Lock-Free Concurrency / High-Performance Computing / Algorithmic Geometry]
---
## 1. Problem Statement & First-Principles Framing
- **Surface Problem**: [What is conventionally stated]
- **Fundamental Root Problem**: [Physical / mathematical constraint: memory bus bandwidth, CPU cache line false sharing, $O(N^2)$ algorithmic wall]
- **Conventional Assumptions Rejected**: [Why existing off-the-shelf solutions fail]
## 2. Mathematical Modeling & Theoretical Limits
- **Formulation**:
$$\text{Throughput}(N) = \frac{C \cdot \text{CacheLineSize}}{\text{AtomicContentionTime}(N) + \text{MemoryLatency}}$$
- **Complexity Guarantees**:
- Time Complexity: Best Case $O(1)$, Worst Case $O(1)$ amortized
- Space Complexity: $O(K)$ fixed contiguous buffer (Zero Heap Allocations)
## 3. Algorithm & Memory Layout Synthesis
Cache Line 0 (64 Bytes) Cache Line 1 (64 Bytes) ┌───────────────────────────────────┬───────────────────────────────────┐ │ Head Pointer (Atomic u64, 8B) │ Tail Pointer (Atomic u64, 8B) │ │ Cache Padding (56B) │ Cache Padding (56B) │ └───────────────────────────────────┴───────────────────────────────────┘
### Pseudo-Code / Reference Logic:
```rust
// Core algorithmic state without false sharing
pub struct LockFreeRingBuffer<T, const CAPACITY: usize> {
head: CachePadded<AtomicU64>,
tail: CachePadded<AtomicU64>,
slots: [UnsafeCell<Slot<T>>; CAPACITY],
}4. Invariant Analysis & Safety Proofs
- Invariant 1: Head index never exceeds Tail index plus Buffer Capacity.
- Invariant 2: Atomic memory ordering (Acquire/Release) ensures data visibility before index update.
- Deadlock Freedom: Zero locking primitives; progress is guaranteed by compare-and-swap (CAS) loops.
5. Potential Failure Modes & Mitigation
- ABA Problem: Solved via 64-bit monotonic sequence tags.
- Cache Contention: Solved via explicit hardware cache-line padding (64/128 bytes).
6. Prototyping & Benchmarking Strategy
- Recommendation to execute microbenchmarks and stress tests via
/codex-test.
---
## Response Protocol
When `codex-deep` finishes:
1. Provide a direct link to `[View Research Spec](file:///.../codex-drive/specs/YYYY-MM-DD-<slug>.research.md)`.
2. Summarize the theoretical breakthrough, algorithmic guarantees, or mathematical proofs.
3. Suggest next steps: `/codex-plans` for integration, or `/codex-test` for microbenchmarking.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

