
Phoenix Typescript
- 19 installs
- 10.9k repo stars
- Updated August 4, 2026
- arize-ai/phoenix
phoenix-typescript is a Claude skill that defines TypeScript naming, function, type-safety, and reuse conventions for the Phoenix monorepo.
About
This skill defines TypeScript conventions for all TypeScript in the Phoenix monorepo, spanning the app frontend and the js packages. A developer uses it when writing, reviewing, or refactoring TypeScript such as functions, types, exports, tests, or refactors. It covers self-documenting naming, object-destructured function parameters with JSDoc, type-safety rules, and reuse of shared utilities.
- Self-documenting naming rules (no single-letter vars, verb-prefixed booleans)
- Object-destructuring for 2+ params with JSDoc @param
- Type-safety rules including undefined-in-lookup-maps and no any
Phoenix Typescript by the numbers
- 19 all-time installs (skills.sh)
- +5 installs in the week ending Jul 12, 2026 (Skillselion tracking)
- Ranked #1,568 of 2,245 Frontend Development skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
phoenix-typescript capabilities & compatibility
- Capabilities
- code review · typescript conventions · refactoring
- Use cases
- code review · refactoring · frontend
What phoenix-typescript says it does
TypeScript conventions and patterns for any TypeScript code in the Phoenix monorepo — including js/packages/, app/, and any other TS directories.
Functions with 2+ parameters should use object destructuring over positional args
npx skills add https://github.com/arize-ai/phoenix --skill phoenix-typescriptAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 19 |
|---|---|
| repo stars | ★ 10.9k |
| Last updated | August 4, 2026 |
| Repository | arize-ai/phoenix ↗ |
What it does
Apply Phoenix's TypeScript naming, function, type-safety, and reuse conventions when writing or reviewing TS code.
Who is it for?
Writing or reviewing TypeScript in the Phoenix app frontend and js packages
Skip if: Python server code or tooling migration (covered by other Phoenix skills)
When should I use this skill?
Writing, reviewing, or modifying TypeScript, or when asked about TS patterns and naming conventions for the project
What you get
TypeScript across the monorepo is self-documenting, type-safe, and reuses shared utilities
- TypeScript code following the naming, function, and type-safety conventions
By the numbers
- 4 rule areas (naming, functions, type safety, reuse)
Files
Phoenix TypeScript Conventions
These conventions apply to all TypeScript in the Phoenix monorepo — the app/ frontend, the js/packages/ libraries (phoenix-client, phoenix-cli, phoenix-evals, phoenix-mcp, phoenix-otel, phoenix-config), examples, and benchmarks.
Before writing new code, explore the directory you're working in to understand existing patterns — then follow these rules.
Naming
Self-documenting names eliminate mental parsing for the next reader.
- Variables must not use single letters — even loop counters benefit from
index,row,char. - Complex conditions should be extracted into named booleans so code reads as prose.
- Booleans must use verb prefixes:
isAllowed,hasError,canSubmit— notallowed,error. - Function names must start with an action verb that describes what the function does:
getUser,normalizeTimestamp,logEvent,parseResponse,buildQuery— notuser(),timestamp(),event().
// Bad — single letters and ambiguous names
for (let i = 0; i < s.length; i++) {
const d = s[i].ts - s[i - 1]?.ts;
const r = fn(s[i].v);
}
// Good — self-documenting
for (let index = 0; index < spans.length; index++) {
const elapsed = spans[index].timestamp - spans[index - 1]?.timestamp;
const result = normalizeValue(spans[index].value);
}
// Bad — boolean without verb prefix, condition inline
<Button isDisabled={!permission || submitting}>
// Good — named boolean with verb prefix
const isDisabled = !hasPermission || isSubmitting;
<Button isDisabled={isDisabled}>Functions
- Functions with 2+ parameters should use object destructuring over positional args — this makes call sites readable and resilient to reordering.
- Object parameters should be documented with JSDoc using
@paramdot notation so editors surface descriptions on hover and during autocomplete. - Behavior should be built from composition (functions and hooks), not inheritance.
- Transforms should prefer functional purity over mutation — use
mapnotreducefor element-wise transforms, return new objects instead of mutating.
/**
* Fetch spans matching the given filters.
* @param params - query parameters
* @param params.projectId - project to query
* @param params.timeRange - optional time window to restrict results
* @param params.limit - max rows to return (default 100)
*/
function fetchSpans({
projectId,
timeRange,
limit = 100,
}: {
projectId: string;
timeRange?: TimeRange;
limit?: number;
}) {Type Safety
TypeScript's type system is most valuable when it catches bugs at compile time rather than runtime.
- Type guards must be used to narrow complex union types; edge cases where discriminants might be missing must be tested.
anymust not be used; preferunknownand narrow explicitly. Ifanyis genuinely necessary (e.g., interfacing with an untyped external API), add a comment explaining why.Record<K, V>used as a lookup map (where keys may be absent) must includeundefinedin the value type — the repo does not enablenoUncheckedIndexedAccess, so missing-key lookups silently returnundefinedwhile the type saysV. UsePartial<Record<K, V>>for sparse maps orRecord<K, V | undefined>when the key set is known but values are nullable.
// Bad — lookup returns string at compile time, undefined at runtime
const map: Record<string, string> = {};
const value = map["missing"]; // typed as string, actually undefined
// Good — forces a null check at every access site
const map: Partial<Record<string, string>> = {};
const value = map["missing"]; // typed as string | undefinedReuse
Existing shared utilities must be checked before writing inline helpers. Duplicated logic should be extracted to a shared module. When working in js/packages/, check sibling packages for existing utilities before adding new dependencies or reimplementing.
Related skills
FAQ
How should lookup maps be typed?
A Record used as a lookup map must include undefined in the value type because the repo does not enable noUncheckedIndexedAccess, so use Partial<Record<K, V>> for sparse maps.
When should functions use object destructuring?
Functions with 2 or more parameters should use object destructuring over positional args to make call sites readable and resilient to reordering.