← Back to list

pattern-schema
by commontoolsinc
⭐ 24🍴 10📅 Jan 23, 2026
SKILL.md
name: pattern-schema description: Design schemas.tsx with Input/Output types for patterns user-invocable: false
Use Skill("ct") for ct CLI documentation when running commands.
Schema Design Phase
Goal
Create schemas.tsx with all data types and Input/Output types BEFORE any pattern code.
Read First
docs/common/concepts/types-and-schemas/default.mddocs/common/concepts/types-and-schemas/writable.mddocs/common/concepts/pattern.md(Input/Output section)
Rules
- ALWAYS use
pattern<Input, Output>()- Never use single-typepattern<State>(). Single-type patterns cannot be tested via.send(). - Every editable field needs
Writable<>in Input type (for write access) - Output types never use
Writable<>- they reflect returned data shape - Fields that could be undefined initially: use
Default<T, value> - Actions in Output type:
Stream<T>(enables testing and linking) - Sub-patterns need
[NAME]: stringand[UI]: VNodein Output type
Template
import { Default, NAME, Stream, UI, VNode, Writable } from "commontools";
// ============ DATA TYPES ============
export interface Item {
name: Default<string, "">;
done: Default<boolean, false>;
}
// ============ PATTERN INPUT/OUTPUT ============
export interface ItemInput {
item: Writable<Item>; // Writable in Input = pattern will modify
}
export interface ItemOutput {
[NAME]: string; // Required for sub-patterns
[UI]: VNode; // Required for sub-patterns
item: Item; // No Writable in Output
toggle: Stream<void>; // Actions as Stream<T>
}
Done When
- All data types defined with correct Writable/Default wrapping
- All Input/Output types defined for each sub-pattern
- No TypeScript errors:
deno task ct check schemas.tsx --no-run
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
✓フォーク
10回以上フォークされている
+5
○Issue管理
オープンIssueが50未満
0/5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon