phoenix-typescript
TypeScript conventions and patterns for any TypeScript code in the Phoenix monorepo — including js/packages/, app/, and any other TS directories. Use this skill whenever writing, reviewing, or modifying TypeScript code — new functions, types, exports, tests, or refactors. Also trigger when the user asks about TS patterns, naming conventions, or best practices for this project.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o phoenix-typescript.zip https://jpskill.com/download/23165.zip && unzip -o phoenix-typescript.zip && rm phoenix-typescript.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23165.zip -OutFile "$d\phoenix-typescript.zip"; Expand-Archive "$d\phoenix-typescript.zip" -DestinationPath $d -Force; ri "$d\phoenix-typescript.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
phoenix-typescript.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
phoenix-typescriptフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
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 | undefined
Reuse
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.