Skip to content
Back to skills

Codegen Sync

ASecurity

Verifies TypeScript codegen is in sync with Elixir protocol definitions. Use this skill after modifying Elixir structs, protocol messages, or RPC types in lib/opal/ to regenerate and verify the TypeScript client SDK types.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
toolstypescriptbash

Works with

  • cli

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill codegen-sync --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codegen Sync?

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

Security grade badge for Codegen Sync
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-codegen-sync/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-codegen-sync)

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: codegen-sync
description: Verifies TypeScript codegen is in sync with Elixir protocol definitions. Use this skill after modifying Elixir structs, protocol messages, or RPC types in lib/opal/ to regenerate and verify the TypeScript client SDK types.
globs: "{lib/opal/rpc/**,lib/opal/agent/**,cli/src/sdk/**}"
---

# Codegen Sync Skill

This project uses code generation to keep TypeScript SDK types in sync with Elixir protocol definitions. When Elixir types change, the TypeScript side must be regenerated.

## When to act

- After modifying any Elixir structs, message types, or RPC definitions in `lib/opal/`.
- After adding or changing tool schemas in `lib/opal/tool/`.
- When CI fails with a codegen drift error.
- When the user asks to sync or regenerate types.

## Commands

```bash
# Run codegen (Elixir -> TypeScript)
mix run scripts/codegen_ts.exs

# Verify codegen is up to date (what CI runs)
mix run scripts/codegen_ts.exs --check
```

## Workflow

1. After modifying Elixir protocol types, run `mix run scripts/codegen_ts.exs`.
2. Review the generated diff in `cli/src/sdk/` to verify correctness.
3. Include the regenerated files in the same commit as the Elixir changes.

## Rules

1. **Never hand-edit generated files.** Always regenerate from the Elixir source.
2. If codegen output looks wrong, fix the Elixir definitions or the codegen script (`scripts/codegen_ts.exs`), not the output.
3. Always commit codegen output alongside the source changes — never in a separate commit.

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.