# ax-add-ingest-stage

Guides the addition of SurrealDB tables and pipeline ingest stages in the ax repository. Keeps changes aligned with strict CI verification gates.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 121
- Author: Necmttn
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Necmttn/ax/tree/HEAD/.ax/skills/ax-add-ingest-stage/SKILL.md
- Updated: 2026-10-07
- HTML: https://affpapa.org/en/nevibecode/skills/ax-add-ingest-stage

## What it does

This skill enforces project-specific conventions when updating the `ax` graph codebase. When you declare a SurrealDB table, the skill guides adding `DEFINE TABLE ... SCHEMAFULL` into `packages/schema/src/schema.surql`, serializing nested payloads to JSON strings, and updating `SCHEMA_TABLES`. A missed registration breaks CI immediately. Running `bun install` inside your worktree is mandatory so schema packages resolve locally instead of pointing to main-tree symlinks.

For ingest steps, the skill outlines co-locating `StageDef` with stage code and appending keys to `apps/axctl/src/ingest/stage/registry.ts`. You also need to increment stage counts in `effect-cli.test.ts` and sort entries under `--derive-only`. Stage execution must sit inside `Effect.catchCause` to prevent individual errors from aborting the pipeline. It also covers Effect v4 beta patterns, such as using `Schema.Literals` instead of collapsed literals.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Necmttn/ax --skill ax-add-ingest-stage -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ax-add-ingest-stage/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ax-add-ingest-stage/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Necmttn/ax --skill ax-add-ingest-stage -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ax-add-ingest-stage/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Necmttn/ax --skill ax-add-ingest-stage -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ax-add-ingest-stage/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Necmttn/ax ax-add-ingest-stage
```

2. **Manually: put the files in place**
- File: `.github/skills/ax-add-ingest-stage/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Necmttn/ax --skill ax-add-ingest-stage -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Necmttn/ax --path .ax/skills/ax-add-ingest-stage
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ax-add-ingest-stage/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Necmttn/ax --skill ax-add-ingest-stage -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Necmttn/ax/tree/HEAD/.ax/skills/ax-add-ingest-stage/SKILL.md

## When to use it
- add a new SurrealDB table to the schema without breaking mirror tests
- register ingest stages in the central axctl registry
- update CLI test expectations for the --derive-only option
- keep documentation in sync across llms.txt and cli.md for new subcommands

## Example prompts
- Add a new SurrealDB user_sessions table to packages/schema/src/schema.surql and register it
- Create a new derive-metrics ingest stage in axctl and update the stage registry
- Document the new axctl subcommands so they pass check-cli-reference CI gates

## Similar
- [xlsx](https://affpapa.org/en/nevibecode/skills/xlsx.md) — skill · 187223 installs
- [google-agents-cli-observability](https://affpapa.org/en/nevibecode/skills/google-agents-cli-observability.md) — skill · 511300 installs
- [caveman-evidence-review](https://affpapa.org/en/nevibecode/skills/caveman-evidence-review.md) — skill · 104500 installs
- [migration](https://affpapa.org/en/nevibecode/skills/migration.md) — skill · 103900 installs
- [performance-optimization](https://affpapa.org/en/nevibecode/skills/performance-optimization.md) — skill · 65200 installs
- [supabase](https://affpapa.org/en/nevibecode/skills/supabase.md) — skill · 8 installs

From the same set: [necmttn/ax](https://affpapa.org/en/nevibecode/by/necmttn/ax.md) — 11 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
