# Ts Patterns

> TypeScript patterns and idioms reference. Use when writing TypeScript and need a quick refresher on generics, discriminated unions, builder patterns, or error handling.

- **Type:** Skill
- **Install:** `agentstack add skill-contentful-skill-kit-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [contentful](https://agentstack.voostack.com/s/contentful)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [contentful](https://github.com/contentful)
- **Source:** https://github.com/contentful/skill-kit/tree/main/examples/ts-patterns/skill
- **Website:** https://contentful.github.io/skill-kit/

## Install

```sh
agentstack add skill-contentful-skill-kit-skill
```

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

## About

# ts-patterns

This skill provides reference information on demand.

## MCP mode (preferred)

If you have MCP tools for this skill (e.g., `mcp__ts-patterns__topic`), use them:

- Call `topics` to list available reference topics.
- Call `topic` with a topic name to retrieve its content.

Present the content to the user. Do not show raw tool calls.

## CLI mode (fallback)

Resolve the **absolute path** to `scripts/run`
from this SKILL.md file's directory. Use the absolute path in all commands — do not `cd` into the
skill directory. In the examples below, `/scripts/run` is a placeholder for this absolute path.

- `/scripts/run topic generics` — Generics cheat sheet — constraints, conditional types, mapped types, infer
- `/scripts/run topic discriminated-unions` — Discriminated unions — type narrowing with literal discriminants
- `/scripts/run topic builder-pattern` — Builder pattern — fluent APIs with type accumulation
- `/scripts/run topic error-handling` — Error handling — Result types, custom errors, exhaustive matching

To list all available topics: `/scripts/run`

## Source & license

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

- **Author:** [contentful](https://github.com/contentful)
- **Source:** [contentful/skill-kit](https://github.com/contentful/skill-kit)
- **License:** MIT
- **Homepage:** https://contentful.github.io/skill-kit/

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-contentful-skill-kit-skill
- Seller: https://agentstack.voostack.com/s/contentful
- 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%.
