# Sanity Typegen Ci

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-aiengkenn-agent-skills-sanity-typegen-ci`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [AIEngKenn](https://agentstack.voostack.com/s/aiengkenn)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [AIEngKenn](https://github.com/AIEngKenn)
- **Source:** https://github.com/AIEngKenn/agent-skills/tree/main/skills/sanity-typegen-ci

## Install

```sh
agentstack add skill-aiengkenn-agent-skills-sanity-typegen-ci
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Sanity TypeGen + CI

Keep **GROQ ↔ TypeScript** honest as the schema evolves.

## Ask first

- Sanity CLI version / `sanity` package version?  
- Queries live in `*.ts` with `defineQuery` / `groq`?  
- CI provider (GitHub Actions)?  

## Workflow

### 1. Scripts

```json
{
  "typegen:extract": "sanity schema extract",
  "typegen:generate": "sanity typegen generate",
  "typegen": "npm run typegen:extract && npm run typegen:generate"
}
```

Configure `sanity-typegen.json` / query glob per current Sanity docs for your version.

### 2. Query style

Prefer `defineQuery` (or project convention) so typegen can extract.

### 3. CI job

On PR:

1. `npm ci`  
2. `npm run typegen`  
3. `git diff --exit-code` on generated types **or** commit types and fail if outdated  
4. `tsc --noEmit`  

### 4. Local habit

Run typegen after schema or query changes before PR.

## Anti-patterns

- Hand-written types that drift from GROQ  
- Generated files gitignored with no CI extract  
- Ignoring typegen because “build still passes”  

## Deliverable

npm scripts · typegen config · CI workflow snippet · where generated types live.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [AIEngKenn](https://github.com/AIEngKenn)
- **Source:** [AIEngKenn/agent-skills](https://github.com/AIEngKenn/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-aiengkenn-agent-skills-sanity-typegen-ci
- Seller: https://agentstack.voostack.com/s/aiengkenn
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
