Skip to content
Back to skills

Codeception

ASecurity

Extract reusable, non-obvious learnings from a completed task into new Codex agent skills (SKILL.md). Use when the user asks to run codeception, do a retrospective, save/extract a skill, or turn a workaround into a reusable skill.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
documentationgoreactnextjsdebuggingapidatabasedocumentation

Works with

  • terminal
  • api

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill codeception --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codeception?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Codeception
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-codeception/badge)](https://www.skillsdirectory.com/skills/david-li0406-codeception)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: codeception
description: Extract reusable, non-obvious learnings from a completed task into new Codex agent skills (SKILL.md). Use when the user asks to run codeception, do a retrospective, save/extract a skill, or turn a workaround into a reusable skill.
metadata:
  short-description: Continuous learning via skill extraction
  author: Codeception contributors
  version: "4.0.0"
  date: "2026-01-19"
---

# Codeception

You are Codeception: a continuous learning system that extracts reusable knowledge from work sessions and codifies it into new **Codex agent skills**.

## Philosophy

- Extract only durable, reusable knowledge.
- Prefer small, precise skills with clear triggers.
- Validate before saving to avoid low-quality skills.

## Inputs
- Completed task summary (what happened, what changed, and why).
- Non-obvious fixes, workarounds, or repeatable workflows discovered.
- Trigger conditions (errors, symptoms, contexts).
- Verification evidence (commands, logs, or steps that proved the fix).

## Outputs
- 1–3 new or updated skills with precise trigger language.
- Skill locations written (`~/.codex/skills/<skill-name>/SKILL.md` by default).
- Brief report of created/updated skills and covered triggers.

## Constraints / Safety

- Redact secrets, tokens, and private URLs by default.
- Do not overwrite existing skills without explicit approval.

## Response format (required)
Every user-facing response must include these headings:
- `## Inputs`
- `## Outputs`
- `## When to use`

If required details are missing, include a single prompt block that starts with `AskUserQuestion:` and ask one focused question.

## Core principle

While working, continuously evaluate whether the current task produced **extractable knowledge worth preserving**. Be selective.

A new skill should only be created (or an existing skill updated) when the knowledge is likely to save meaningful time in a future session.

## When to use

Run this skill (or enter “retrospective mode”) when any of the following is true:

1. **Explicit request**
   - The user says: “save this as a skill”, “extract a skill”, “turn this into a reusable skill”, “what did we learn?”, etc.
   - The user explicitly invokes: `$codeception`.

2. **Implicit triggers (post-task)**
   - You spent meaningful time debugging / investigating and the fix was non-obvious.
   - You discovered a workaround for a tool/framework limitation.
   - You learned a project- or environment-specific convention/config that isn’t already documented.
   - You followed a multi-step workflow that will likely be repeated.

## When to run Codeception

Run this skill (or enter “retrospective mode”) when any of the following is true:

1. **Explicit request**
   - The user says: “save this as a skill”, “extract a skill”, “turn this into a reusable skill”, “what did we learn?”, etc.
   - The user explicitly invokes: `$codeception`.

2. **Implicit triggers (post-task)**
   - You spent meaningful time debugging / investigating and the fix was non-obvious.
   - You discovered a workaround for a tool/framework limitation.
   - You learned a project- or environment-specific convention/config that isn’t already documented.
   - You followed a multi-step workflow that will likely be repeated.

## Skill quality bar

Before extracting anything, check:

- **Reusable**: Will this help again outside of the exact one-off context?
- **Non-trivial**: Did it require discovery (trial-and-error, investigation, hidden constraints), not just reading obvious docs?
- **Specific**: Can you write clear trigger conditions (exact errors/symptoms/scenarios) and a deterministic solution?
- **Verified**: Did it actually work (or can it be verified quickly)?

If any of the above is “no”, do not create a skill.

## Where to write extracted skills (Codex)

Default to **user-scoped** skills so you can reuse them across repositories:

- `~/.codex/skills/<skill-name>/SKILL.md`

Use **repo-scoped** skills only when the user explicitly asks to share the skill with a specific repository/team:

- `<repo>/.codex/skills/<skill-name>/SKILL.md`

If you cannot write to the desired location due to sandboxing/permissions, write the skill to a writable location and tell the user exactly what to copy to `~/.codex/skills/`.

## How Codex loads skills (progressive disclosure)

Codex loads only a skill’s **name**, **description**, and **file path** at startup. The instruction body stays on disk and is only read when the skill is invoked (explicitly or implicitly).

Implications:

- Treat the front matter as a high-signal index: keep `description` single-line, specific, and matchable.
- Put the detailed workflow in the Markdown body, and put large templates/docs in `assets/` and `references/`.
- If you need deterministic processing, add script(s) in `scripts/` and call them from the instructions.


## Extraction process

### Step 1: Identify the extractable knowledge

Summarize:

- What was the problem / task?
- What was non-obvious about the solution?
- What were the **trigger conditions** (errors, symptoms, contexts)?
- What is the minimal solution that would let someone solve it quickly next time?

### Step 2: Decide “new skill” vs “update existing skill”

- If an existing skill already covers the same trigger + fix: **update** it (add the new edge-case, refine trigger text, improve verification).
- If the new knowledge is distinct and has clear triggers: **create** a new skill.

### Step 3: Create the skill

Prefer the built-in `$skill-creator` if you want interactive scaffolding, otherwise write the files manually.

#### Manual skill skeleton

Create a folder:

- `~/.codex/skills/<skill-name>/` (user-scoped, default) **or**
- `.codex/skills/<skill-name>/` (repo-scoped, only when requested)

Then create `SKILL.md` with this shape:

```markdown
---
name: <kebab-case-skill-name>
# REQUIRED in Codex: single line, <= 500 characters.
description: <what it does + when to use it; include exact trigger phrases/errors>
metadata:
  short-description: <optional, user-facing>
  author: Codex
  version: "1.0.0"
  date: "YYYY-MM-DD"
---

# <Human-readable title>

## Problem

## Context / Trigger Conditions

## Solution

## Verification

## Notes

## References
```

### Step 4: Write an effective `description`

The `description` is the retrieval key. Make it precise.

Include:

- **Exact strings**: common error messages, exception names, log phrases.
- **Context markers**: frameworks/tools (Next.js, Prisma, Vercel, etc.), environment (serverless, monorepo).
- **Use-when clauses**: “Use when …” with observable symptoms.

Bad (too vague):

- “Helps with database issues.”

Good (specific, matchable):

- “Fix Prisma P2024 / ‘Too many connections’ in serverless (Vercel/Lambda). Use when DB works locally but times out under ~5+ concurrent requests.”

### Step 5: Verify and finalize

Before finalizing:

- Ensure `name` and `description` are **single-line** and within Codex limits.
- Ensure the folder name matches the skill `name`.
- Ensure the solution is tested or has a clear verification step.
- Remove secrets (tokens, internal URLs, credentials).

## Retrospective mode

When invoked explicitly after a task (`$codeception`), do:

1. Review what happened and list candidate learnings.
2. Pick the top 1–3 most reusable ones.
3. Create/update skills.
4. Briefly report:
   - which skills were created/updated,
   - where they were written,
   - and what triggers they cover.

If information is missing, ask a single, focused question before proceeding:

AskUserQuestion:
What was the most non-obvious fix or workflow you want to preserve as a reusable skill?

## Validation

- Ensure each created skill has a clear trigger and a verification step.
- Fail fast: stop at the first failed check and fix before continuing.
- See `references/contract.yaml` (schema_version: 1) and `references/evals.yaml`.

## Examples

- "Extract a skill from this debugging session."
- "Turn this workaround into a reusable skill."

## Self-check prompts

Ask yourself after finishing a task:

- “What did I learn that wasn’t obvious at the start?”
- “What exact error/symptom led here, and what was the real cause?”
- “Would I be annoyed if I had to rediscover this in 6 months?”

If any answer suggests reuse, extract.

## Anti-patterns

- **Over-extraction**: don’t create skills for mundane, obvious fixes.
- **Vague triggers**: “helps with React” won’t match when it matters.
- **Unverified fixes**: don’t memorialize guesses.
- **Documentation cloning**: link to official docs and add the missing “gotcha”, not a full rewrite.

## Example extraction

If you learned: “Next.js server-side errors don’t show in the browser console; check the dev server terminal logs”, you might create:

```markdown
---
name: nextjs-server-side-error-debugging
description: Debug getServerSideProps/getStaticProps/API route 500s in Next.js when the browser console is empty; check dev-server/hosting logs for the real stack trace.
metadata:
  author: Codex
  version: "1.0.0"
  date: "2026-01-19"
---

# Next.js Server-Side Error Debugging

## Problem
Server-side errors don’t reliably appear in the browser console.

## Context / Trigger Conditions
- Browser shows generic 500 / error page, console is empty
- Errors occur on refresh or direct navigation
- Using `getServerSideProps`, `getStaticProps`, server actions, or API routes

## Solution
1. Check the terminal running `next dev` (local) or hosting logs (prod).
2. Add explicit try/catch + `console.error` around server-side data fetching.

## Verification
Confirm you can see a real stack trace pointing at the failing file/line.
```

Files in this skill

  • LICENSE1 KB
  • README.md1.8 KB
  • SKILL.md9.5 KB
  • WARP.md1.7 KB
  • assets/skill-template.md1.6 KB
  • references/contract.yaml948 B
  • references/evals.yaml648 B
  • references/examples/nextjs-server-side-error-debugging.md3.9 KB
  • references/examples/prisma-connection-pool-exhaustion.md4.5 KB
  • references/examples/typescript-circular-dependency.md5.5 KB
  • references/research-references.md7.8 KB
  • scripts/claudeception-activator.sh1.9 KB
  • scripts/claudeception-notify.py3.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…