trove-typescript
TypeScript type-system discipline for any .ts/.tsx file: make illegal states unrepresentable, validate at boundaries, avoid as/any.
Skill by bravew
Chalk Labs
Need help deploying trove-typescript?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/bravew-trove-typescript
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/trove-typescript
What's inside
- Skill name
trove-typescript- Description
- TypeScript type-system discipline for any .ts/.tsx file: make illegal states unrepresentable, validate at boundaries, avoid as/any. Use when reading or editing TypeScript that isn't covered by a framework-specific skill. Defers to trove-react / trove-react-best-practices on .tsx component work.
- License
- MIT
- Instructions
- 56 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- patterns.md · references/
SKILL.md (first lines)
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
<!-- Regenerate: bun run build:skills -->
## Session Init
This skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.
If a sibling skill in this plugin matches the request more directly, defer to it. See `AGENTS.md` (or `docs/routing.md` in the marketplace) for the per-plugin routing index.
# TypeScript Type-System Discipline
The type checker is a proof assistant. Model the domain so wrong states don't compile. On `.tsx`, defer to `trove-react` / `trove-react-best-practices` for component patterns; this skill owns the plain type discipline underneath them.
## Core rules
| Rule | Do | Not |
|---|---|---|
| Illegal states | Discriminated union with a `kind`/`status` tag | `boolean` + optional field pairs |
| Identity | Branded primitives (`string & { readonly __brand: 'UserId' }`) | bare `string` for ids |
| External data | `unknown` + parse at the boundary | `any` |
| Casts | `satisfies` to check shape while keeping literals | `as SomeType` |
| Exhaustiveness | `const _exhaustive: never = x` in the default branch | unhandled union members |
| Type guards | Guards that actually narrow and are verified | `x as Foo` inside the guard |
| Derive | Types derived from a schema (Zod/valibot `infer`) | hand-kept parallel types |
## The canonical example
```ts
// BAD — admits the meaningless { completed: true, completedAt: undefined }
type Task = { completed: boolean; completedAt?: Date };
// GOOD — the bad state cannot be constructed
type Task =
| { status: 'open' }
| { status: 'done'; completedAt: Date };
```
## Boundaries
Validate once, at the edge (network, config, user input). Past the boundary, trust your domain types and keep logic pure. "Parse, don't validate": a parser returns a more precise type or fails; it doesn't just check and discard what it learned.
```ts
function parseUser(raw: unknown): User {
return UserSchema.parse(raw); // unknown -> User, or throws at the boundary
}
```
See [references/patterns.md](references/patterns.md) for the full pattern set with worked examples.
## AI Gotchas
- **`as` to silence an error** hides the bug you'll debug next week. Reach for narrowing or `satisfies` first.
- **`any` on external data** erases the boundary. Use `unknown` and parse.
- **Non-exhaustive `switch`** over a union compiles today and breaks when a variant is added. Add the `never` guard.
- **Parallel hand-maintained types** drift. Derive from the schema.From bravew/trove, MIT.
More from bravew/trove
- 0.635score
trove-react-native
bravew
React Native and Expo best practices for building performant mobile apps.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-typescript
bravew
TypeScript type-system discipline for any .ts/.tsx file: make illegal states unrepresentable, validate at boundaries, avoid as/any.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-react-native
bravew
React Native and Expo best practices for building performant mobile apps.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-react-best-practices
bravew
React and Next.js performance optimization guidelines (Vercel Engineering, 70 rules across 8 categories).
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-react-view-transitions
bravew
Implement smooth, native-feeling animations with React's View Transition API (`<ViewTransition>`, `addTransitionType`, CSS view-transition pseudo-elements).
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-docs-sync-audit
bravew
Read-only documentation drift audit comparing what the docs claim against what the code does.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-test-gap-audit
bravew
Read-only audit for missing, weak, stale, or mis-scoped test coverage.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-react-best-practices
bravew
React and Next.js performance optimization guidelines (Vercel Engineering, 70 rules across 8 categories).
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-react-view-transitions
bravew
Implement smooth, native-feeling animations with React's View Transition API (`<ViewTransition>`, `addTransitionType`, CSS view-transition pseudo-elements).
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-docs-sync-audit
bravew
Read-only documentation drift audit comparing what the docs claim against what the code does.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-test-gap-audit
bravew
Read-only audit for missing, weak, stale, or mis-scoped test coverage.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
trove-visual-parity
bravew
Achieve pixel-exact UI equivalence between two implementations via image diff.
SkillAFreshness: A★ 10Claude Code +9
Signals
- Stars
- 10
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Sep 10, 2026 (1 month ago)
- Last release
- Oct 8, 2026 (23 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/bravew/trove
- Website
- github.com/bravew/trove
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from bravew
- 0.635score
trove-react-best-practices
bravew
React and Next.js performance optimization guidelines (Vercel Engineering, 70 rules across 8 categories).
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-react-native
bravew
React Native and Expo best practices for building performant mobile apps.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-test-gap-audit
bravew
Read-only audit for missing, weak, stale, or mis-scoped test coverage.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-docs-sync-audit
bravew
Read-only documentation drift audit comparing what the docs claim against what the code does.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-test-gap-audit
bravew
Read-only audit for missing, weak, stale, or mis-scoped test coverage.
SkillAFreshness: A★ 10Claude Code +9 - 0.635score
trove-react-view-transitions
bravew
Implement smooth, native-feeling animations with React's View Transition API (`<ViewTransition>`, `addTransitionType`, CSS view-transition pseudo-elements).
SkillAFreshness: A★ 10Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get trove-typescript running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
trove-typescript skill. Agent Mart. https://agentmart.dev/skills/bravew-trove-typescript (last updated 2026-10-24)