Agent skill

Add Column Type

by simstudioai in simstudioai/sim

Add a new table column type to Sim — registry entry, icon, storage shape, coercion, and the behavioral hooks the grid and API read.

Apache-2.0Auto-check passed

Install Add Column Type

skills CLI
$ npx skills add simstudioai/sim --skill add-column-type -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install simstudioai/sim add-column-type --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/simstudioai/sim.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-column-type .claude/skills/add-column-type && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-column-type
GitHub stars
30k
Token cost
~2.9k tokens
SKILL.md length
1,375 words
Files
1
Skills in repo
40
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add a new table column type to Sim — registry entry, icon, storage shape, coercion, and the behavioral hooks the grid and API read.

  • Works in 5 steps: Pick the storage shape → Add the icon → Write the type file → …
  • Adding a value kind under apps/sim/lib/table/column-types/
  • SKILL.md covers Hard Rule: the compiler tells…, Directory Structure, Step 1: Pick the storage shape and Step 2: Add the icon, plus 8 more sections
  • Calls bun; reaches w3.org

What it does

Add Column Type is an agent skill from simstudioai/sim. Add a new table column type to Sim — registry entry, icon, storage shape, coercion, and the behavioral hooks the grid and API read. Use when adding a value kind under apps/sim/lib/table/column-types/.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Sim is the collaborative workspace to build, deploy, and monitor AI agents and workflows. Used by 100,000+ builders. The licence is Apache-2.0.

When your agent uses it

  • Adding a value kind under apps/sim/lib/table/column-types/

Example prompts

  • “/add-column-type”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Pick the storage shape
  2. Add the icon
  3. Write the type file
  4. Register
  5. Migrations (only if the stored bytes change)

What it can do on your machine

Read from SKILL.md and the folder at commit 546d4e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • w3.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Column Type loads about 2.9k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 1,375 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from simstudioai/sim at commit 546d4e7, republished under its Apache-2.0 licence (© simstudioai). 1,375 words, ~2,924 tokens.

Download SKILL.mdSave it as .claude/skills/add-column-type/SKILL.md (or your agent's skills folder).
name
add-column-type
description
Add a new table column type to Sim — registry entry, icon, storage shape, coercion, and the behavioral hooks the grid and API read. Use when adding a value kind under `apps/sim/lib/table/column-types/`.
argument-hint
<type-name>

Adding a Table Column Type

A column type is one file in apps/sim/lib/table/column-types/ plus a registry entry. Everything that varies per type — label, icon, storage cast, coercion, validation, conversion compatibility, formatting, editor, filter operators — lives on that one object, so no consumer needs editing.

A case 'yourtype': outside column-types/ fails silently when missed (a wrong jsonbCast breaks every filter on the column). The registry exists to make that impossible, so the rule is absolute with one documented exception (import.ts's coerceValue, see "Traps" below): if you find yourself adding a case 'yourtype': anywhere else outside column-types/, the registry is missing a field. Add the field instead.

Hard Rule: the compiler tells you what to do

Do not hunt for places to edit. Append your type's id to the COLUMN_TYPES array in column-types/types.ts first (ColumnType derives from it) and let tsc produce the list:

bash
cd apps/sim && bun run type-check

You will get two errors, naming column-types/registry.ts and column-types/registry.server.ts. Register in both.

If your type owns metadata, adding its key to TYPE_SPECIFIC_COLUMN_KEYS produces two more legitimate errors — FOREIGN_METADATA_VERB in validation.ts (a Record over those keys) and the key's absence from ColumnDefinition. Those are the gate working, not sites to "fix".

Any error beyond those four is a site reading a hardcoded type list that should read the registry — fix that site, don't work around it.

Directory Structure

apps/sim/lib/table/column-types/
├── types.ts             # ColumnTypeDefinition — the contract you implement
├── types.server.ts      # ColumnTypeServerDefinition — cell migrations only
├── registry.ts          # Record<ColumnType, …>  ← client-safe, the gate
├── registry.server.ts   # Record<ColumnType, …>  ← adds migrations (drizzle)
├── index.ts             # barrel + accessors (columnTypeOf, columnTypeById, …)
└── {type}.ts            # one file per type — what you write

Step 1: Pick the storage shape

Decide what a cell literally holds in user_table_rows.data (JSONB). This drives almost everything else:

StoragejsonbCastNotes
number'numeric'Filters/sorts compare numerically. currency does this.
ISO string'timestamptz'date does this.
string / bool / objectnullText comparison is correct.

Prefer an existing primitive over a new shape. currency stores a plain number and keeps its ISO code as display metadata — which is why filtering, sorting, uniqueness, and CSV export all reuse the numeric paths untouched, and why re-denominating a column rewrites zero rows.

Step 2: Add the icon

Create packages/emcn/src/icons/type-{name}.tsx, copying the geometry conventions of its siblings exactly:

tsx
import type { SVGProps } from 'react'

/**
 * Type {name} icon component - {what the glyph is} for {name} columns
 * @param props - SVG properties including className, fill, etc.
 */
export function Type{Pascal}(props: SVGProps<SVGSVGElement>) {
  return (
    <svg
      width='24'
      height='24'
      viewBox='-1.75 -1.5 24 24'
      fill='none'
      stroke='currentColor'
      strokeWidth='1.55'
      strokeLinecap='round'
      strokeLinejoin='round'
      xmlns='http://www.w3.org/2000/svg'
      aria-hidden='true'
      {...props}
    >
      <path d='…' />
    </svg>
  )
}
  • viewBox='-1.75 -1.5 24 24' is the type-* family value, not the set-wide default. Match the family.
  • Center the glyph on the viewBox's optical center (y = 10.5, x = 10.25) — every sibling does, and a few tenths off is visible at size-[14px].
  • Export alphabetically by component name in packages/emcn/src/icons/index.ts.

Step 3: Write the type file

apps/sim/lib/table/column-types/{name}.ts. Copy the closest existing type and change what differs. Required fields are compiler-enforced; optional hooks (isCompatibleWith, salvage, valueForEquality, filterOperatorsFor, …) default sensibly — read the TSDoc in types.ts before overriding.

The three that are easy to get wrong:

  • coerce is the single write-path implementation. The server runs it before persisting and the grid runs it to fill the optimistic cache. Accept every shape the value legitimately arrives in (paste, CSV, tool write), because rejecting means the cell is nulled.
  • isCompatibleWith gates type conversion and must read the value exactly as coerce will, or a conversion will pass its check and then null the cell.
  • ownedMetadata lists the ColumnDefinition keys your type owns. Anything you add must also be added to TYPE_SPECIFIC_COLUMN_KEYS in types.ts and given a phrase in FOREIGN_METADATA_VERB in validation.ts — both are Record-typed, so the compiler will tell you.

Step 4: Register

Add the entry to COLUMN_TYPE_REGISTRY in registry.ts and COLUMN_TYPE_SERVER_REGISTRY in registry.server.ts.

COLUMN_TYPES is declared in types.ts (not derived from the registry — the registry is annotated Record<ColumnType, …> against it, which is the gate). constants.ts re-exports it, so columnTypeSchema = z.enum(COLUMN_TYPES) picks your type up with no edit. Type-specific metadata does not — see the next step.

Step 5: Migrations (only if the stored bytes change)

If converting an existing column to your type must rewrite cells, add migrateCellsTo in registry.server.ts; if converting away must rewrite them, add migrateCellsFrom.

This is load-bearing, not cosmetic: filters and sorts apply jsonbCast to whatever is stored, so leaving a non-castable string behind makes every query on that column fail — not merely render oddly.

Prefer set-based SQL. When the transform genuinely needs JS (currency's separator disambiguation), compute the values during the compatibility scan and pass them through resolved, then apply them in one batched statement.

Naming Convention

  • Type id: lowercase, singular — currency, not Currency or currencies
  • File: column-types/{id}.ts, export const {id}ColumnType
  • Icon: type-{kebab}.tsx, export Type{Pascal}

Watch out

  • Import cycles. column-types/select.ts imports lib/table/select-values.ts, so select-values.ts must not import the registry — that closes a cycle and fails at module init. Inside a type's own helper module the string literal is the implementation, not a config leak.
  • The client-safe boundary. registry.ts and everything it imports must stay free of @sim/db, drizzle-orm, and next/server — the tables grid imports it directly. A React icon is fine (it's a component reference, never called server-side). Only registry.server.ts may touch drizzle.
  • Don't re-export the registry from @/lib/table. Dozens of server modules import that barrel; routing this through it pulls @sim/emcn/icons into all of them. Deep-import @/lib/table/column-types.
  • import.ts's coerceValue is a SECOND write path and is not opt-in. Importing into a column of your type always hits it, and its default arm silently String(value)s — so a missing case stores text in a column whose jsonbCast is numeric, and then every filter and sort on that column errors in Postgres. Add a case, even though the switch compiles without one. (It is deliberately separate from the registry's coerce: an import wants an unparseable value to survive as its raw string so the row error can name it.)
  • CSV inference is an ordered heuristic in import.ts, deliberately not registry-driven. A new type is not inferred from a CSV unless you extend inferColumnType — usually you should not, since inference cannot supply configuration (an option set, a currency code).
Show full SKILL.md (459 more words)Show less

If your type owns metadata, read this

Registering the type is compiler-enforced. Registering its metadata is not, and that is where the remaining manual work lives. A key like precision has to be added in each of these, none of which will fail to compile if you forget:

WhereWhat happens if you forget
lib/table/types.ts ColumnDefinition(this one DOES fail — the ownership loop indexes it)
column-types/types.ts TYPE_SPECIFIC_COLUMN_KEYSit is never stripped on conversion, and poisons the target type
lib/api/contracts/tables.ts — the schema slot in all three column schemas, plus refineColumnOptionszod strips it at the boundary; silently never saved
columns/service.ts addTableColumn param typecallers cannot pass it
A metadata-only update in lib/table/columns/service.ts (updateColumnCurrency is the model) + a branch in performUpdateTableColumn in lib/table/orchestration/columns.tschanging it on an existing column is a silent 200 no-op
column-config-sidebar.tsxno UI to set it
table-grid.tsx delete-column undo + use-table-undo.ts restoreundo silently resets it to the default

normalizeColumn, buildConvertedColumn, and the undo snapshot read TYPE_SPECIFIC_COLUMN_KEYS generically, so those three are already zero-edit.

Copy currency's service function and orchestration branch.

Checklist Before Finishing

  • Id appended to COLUMN_TYPES in column-types/types.ts
  • column-types/{id}.ts created, every required field filled in
  • Registered in both registry.ts and registry.server.ts
  • Icon added, centered on the family's optical center, exported alphabetically
  • migrateCellsTo / migrateCellsFrom added if the stored bytes change
  • New metadata keys added to TYPE_SPECIFIC_COLUMN_KEYS + FOREIGN_METADATA_VERB
  • Unit tests for coerce / isCompatibleWith round-trips only if they pass the test-audit authoring gate, verified to fail without the code
  • Docs row added to apps/docs/content/docs/tables/index.mdx

Final Validation (Required)

  1. cd apps/sim && bun run type-check — must be clean. If any file outside column-types/ errors, that file has a hardcoded type list; fix it to read the registry.
  2. Grep for leaks — grep -rnE "(===|!==) '{id}'|case '{id}':" apps/sim --include='*.ts' --include='*.tsx' | grep -v column-types/. (All three forms: a plain !== and a case are how half of currency's real branches are written.) Hits are expected; judge each. A hit is fine when it mounts a specific React component or encodes a genuinely one-off behavior (json's mono textarea, date's timezone-aware parsing). A hit is a leak when it restates something the registry could answer — an icon, a label, a colour, an operator set, a cast, a coercion. Leaks get a registry field, not a new branch.
  3. Run the suite — bun run --cwd apps/sim test lib/table 'app/workspace/[workspaceId]/tables' lib/api app/api/table app/api/v1. Existing tests must pass unchanged; needing to edit one means you changed behavior for the other types.
  4. bun run lint, bun run check:api-validation:strict, bun run check:client-boundary from the repo root.
  5. Exercise it in the running app on a table with one column of every type: create, edit inline / in the expanded popover / in the row modal, paste from a spreadsheet, filter, sort, convert to and from other types, export CSV, undo a column delete.

© simstudioai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/add-column-type of simstudioai/sim.

Open the folder on GitHubat commit 546d4e7

Compare with similar skills

Add Column Type next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Column Type compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Column Type this skillsimstudioai/sim30k—~2.9kAutomated safety check: PassApache-2.0
Table Fitasgeirtj/system_prompts_leaks69k—~772Automated safety check: PassCC0-1.0
Tablesbrycewang-stanford/Auto-Empirical-Research-Skills4.5k—~2kAutomated safety check: PassCustom licence
Table Headersthedaviddias/Front-End-Checklist74k—~460Automated safety check: PassMIT
Accessible Tablesthedaviddias/Front-End-Checklist74k—~521Automated safety check: PassMIT
Tablebrycewang-stanford/Auto-Empirical-Research-Skills4.5k—~3.3kAutomated safety check: PassCustom licence

Similar skills

  • Table Fit

    asgeirtj/system_prompts_leaks

    Keep a Markdown table readable in a narrow terminal of about 100 display columns - a wide table or one carrying prose in its cells wraps into unreadable ragged rows.

    69k GitHub stars~772 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Tables

    brycewang-stanford/Auto-Empirical-Research-Skills

    Design and format publication-quality tables: column order, row grouping, notes, precision, reproducibility.

    4.5k GitHub stars~2k tokensUpdated 2 days ago
    Research & ScienceAuto-check passed
  • Table Headers

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Define proper table headers.

    74k GitHub stars~460 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Accessible Tables

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Use semantic table markup for screen readers.

    74k GitHub stars~521 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Table

    brycewang-stanford/Auto-Empirical-Research-Skills

    Econometrics skill for creating publication-quality LaTeX regression and summary tables.

    4.5k GitHub stars~3.3k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • Changelog Entry

    sickn33/agentic-awesome-skills

    Generate a properly formatted CHANGELOG.md entry in Keep a Changelog format from a commit range or PR.

    47k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed

More from simstudioai/sim

All 40 skills in this repo
  • Sim Helm

    simstudioai/sim

    Install, upgrade, and operate the Sim Helm chart on Kubernetes.

    30k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Add Enrichment

    simstudioai/sim

    Add a code-defined table enrichment (registry entry) under apps/sim/enrichments/ backed by an ordered provider cascade, ensuring every provider tool it calls has hosted-key support.

    30k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Add Hosted Key

    simstudioai/sim

    Add hosted API key support to a tool so Sim provides the key (metered and billed to the workspace) when a user has not brought their own.

    30k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Add Managed CLI

    simstudioai/sim

    Add or upgrade a curated, immutable managed CLI for Sim Function sandboxes, including client-safe catalog metadata, a pinned server-only installation recipe, checksum and executable verification…

    30k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Add Selector

    simstudioai/sim

    Add or update a Sim dynamic selector using the shared manifest, server attachment, and selectors.execute path.

    30k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Babysit

    simstudioai/sim

    Drive a PR to a clean review (Greptile 5/5, zero open threads) — ships if needed, keeps it mergeable against staging, re-triggers both Greptile and cubic, fixes real findings, replies to and…

    30k GitHub stars~2.9k tokensUpdated today
    Auto-check passed

Questions about Add Column Type

What does Add Column Type do?

Add a new table column type to Sim — registry entry, icon, storage shape, coercion, and the behavioral hooks the grid and API read. Add Column Type is an agent skill from simstudioai/sim. Add a new table column type to Sim — registry entry, icon, storage shape, coercion, and the behavioral hooks the grid and API read.

When should I use Add Column Type?

Add Column Type fits situations like: adding a value kind under apps/sim/lib/table/column-types/.

How do I install Add Column Type in Claude Code?

Run `npx skills add simstudioai/sim --skill add-column-type -a claude-code`. Or copy the skill folder (.agents/skills/add-column-type in simstudioai/sim) into .claude/skills/add-column-type in your project. Claude Code loads it when a task matches its description.

How do I install Add Column Type in Codex?

Run `npx skills add simstudioai/sim --skill add-column-type -a codex`. Or copy the skill folder (.agents/skills/add-column-type in simstudioai/sim) into .agents/skills/add-column-type in your project. Codex loads it when a task matches its description.

Can I use Add Column Type in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add simstudioai/sim --skill add-column-type -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-column-type, .gemini/skills/add-column-type, .github/skills/add-column-type and .opencode/skills/add-column-type in your project.

What does Add Column Type need to run?

Going by SKILL.md and its folder, Add Column Type needs the command-line tools its instructions call (bun).

Does Add Column Type access the network?

SKILL.md names 1 domain. In commands or code: w3.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Add Column Type safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Column Type use?

Add Column Type is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Column Type use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Column Type?

Skills that share tags, products or a category with Add Column Type: Table Fit (asgeirtj/system_prompts_leaks, 69k stars), Tables (brycewang-stanford/Auto-Empirical-Research-Skills, 4.5k stars), Table Headers (thedaviddias/Front-End-Checklist, 74k stars) and Accessible Tables (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Column Type?

simstudioai (a GitHub organization) maintains it in simstudioai/sim, which has 29,785 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 7, 2026.

Source: simstudioai/sim on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.