create-data-context — Codex skill: build a data semantic layer
Builds and maintains a semantic layer that records how data should be read, which metric counts as canonical, and what caveats to check.
npx skills add openai/plugins --skill create-data-context -a codexWhat create-data-context does
The skill produces a separate artifact you can open and point to in later prompts. It records which metric definition to treat as canonical, which dashboard or table is the source of truth, and which caveats deserve a look before an answer goes out.
It runs only when someone asks to save data context or to create, update, inspect, or repair a semantic layer. Ordinary data work — a metric question, a report, a dataset check — belongs to the index skill. One layer covers a single product, business, metric, source, or reporting area unless a broader shared layer is requested.
Before crawling, the skill drafts a source list: what was checked, what is missing, where confidence is lower. Durable evidence wins — transformation code, tests, maintained metric docs, verified dashboards. When sources disagree, the conflict stays visible rather than being resolved quietly. On ChatGPT Desktop it writes to $CODEX_HOME/skills/<area>-semantic-layer by default; if that variable is unavailable and the local setup plainly uses the standard home directory, the path becomes ~/.codex/skills/<area>-semantic-layer. Generated skills stay compact: definitions, tables, query patterns, and evidence live in linked files, while raw sensitive data, credentials, and row-level examples are kept out.
What it helps with
- pin down which metric definition is canonical
- name the dashboard or table that counts as source of truth
- list sources and flag where coverage is thin
- keep disagreements between sources visible
- refresh the semantic layer when understanding of the data shifts
Example prompts for the agent
- Save the data context for revenue: which metric is canonical and what to check first
- Create a semantic layer for the orders reporting area
- Inspect the semantic layer and add the sources it is missing
How to install create-data-context
1Skills CLI (Vercel)
npx skills add openai/plugins --skill create-data-context -a codex2Manually: put the files in place
.agents/skills/create-data-context/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openai/plugins --skill create-data-context -a claude-code2Manually: put the files in place
~/.claude/skills/create-data-context/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/create-data-context/
Manually: put the files in place
.cursor/skills/create-data-context/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openai/plugins create-data-context2Manually: put the files in place
.github/skills/create-data-context/SKILL.mdPlatform CLI
gemini skills install https://github.com/openai/plugins --path plugins/data-analytics/skills/create-data-contextManually: put the files in place
.devin/skills/create-data-context/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: Codex skills: how to install, where they live, how to call them
Questions about create-data-context
How do I install create-data-context in Claude?
Run npx skills add openai/plugins --skill create-data-context, then npx skills add openai/plugins --skill create-data-context -a codex. The skill then sits at .agents/skills/create-data-context/SKILL.md.
What does create-data-context do?
It creates, updates, inspects, or repairs a Data Analytics semantic layer. That layer spells out how the data should be interpreted, which metric is canonical, and which caveats matter.
How is it different from the index skill?
index routes data tasks and kicks off work right away. create-data-context takes over when the goal is saving context or working on the semantic layer itself.