ワンクリックで
pattern-schema
Design schemas.tsx with Input/Output types for patterns
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Design schemas.tsx with Input/Output types for patterns
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Review a changeset for the Common Fabric repo — the local branch diff vs main, or a GitHub PR. Flags correctness and regression bugs loudly, checks that runtime-semantics changes stay coherent across docs/comments/examples, catches duplicated core machinery (hashing, serialization, cloning, identity) and code fighting the transformer/reactive model, and scrutinizes whether the tests guard the right principles. Report-first; offers to post a self-signed PR review. Use when asked to review code, review a PR, review the current branch or diff, or self-review before pushing. Invoke as /cf-review or /cf-review <PR#>.
Agent-specific interaction patterns for working with FUSE-mounted spaces. Use when deploying patterns via FUSE, working with Activity Logs, Annotations, or coordinating agent workflows that read/write pieces through the filesystem. Triggers include "deploy a pattern", "log an event", "create annotation", "agent workflow", or managing piece lifecycle via FUSE.
Critic agent that reviews pattern code for violations of documented rules, gotchas, and anti-patterns. Produces categorized checklist output with [PASS]/[FAIL]/[WARN] for each rule.
Guide for developing Common Fabric patterns (TypeScript modules that define reactive data transformations with UI). Use this skill when creating patterns, modifying existing patterns, or working with the pattern framework. Triggers include requests like "build a pattern", "fix this pattern error", "deploy this piece", or questions about handlers and reactive patterns.
Build Common Fabric patterns and sub-patterns
Guide for using the cf (Common Fabric) CLI to interact with pieces, patterns, and the Common Fabric. Use this skill when deploying patterns, managing pieces, linking data between pieces, or debugging pattern execution. Triggers include requests to "deploy this pattern", "call a handler", "link these pieces", "get data from piece", or "test this pattern locally".
| name | pattern-schema |
| description | Design schemas.tsx with Input/Output types for patterns |
| user-invocable | false |
Use the cf skill, or read skills/cf/SKILL.md, for CLI documentation when
running commands.
Create schemas.tsx with all data types and Input/Output types BEFORE any
pattern code.
docs/common/concepts/types-and-schemas/default.mddocs/common/concepts/types-and-schemas/writable.mddocs/common/concepts/pattern.md (Input/Output section)pattern<Input, Output>() - Never use single-type
pattern<State>(). Single-type patterns cannot be tested via .send().Writable<> in an Input type only for values the pattern receives and
intends to mutate.Writable<> - they reflect returned data shapeDefault<T, value>Stream<T> (enables testing and linking)[NAME]: string and [UI]: VNode in Output typePerSpace<> / PerUser<> /
PerSession<> for every Input field at schema time; see the pattern-dev
skill for the new-tab test. Transient UI state (selected tab, filter text,
open modal) defaults to PerSession<>.Pattern Factory create-mode deliverables are usually top-level patterns. A top-level pattern should be usable by itself with sensible defaults and should usually own its local state unless the brief explicitly describes caller-owned cells, linking, or embedding.
Do not create required caller-provided Writable<> inputs solely because the UI
edits that field. If the top-level pattern owns the state, model that ownership
in the pattern implementation and expose the user-visible shape through the
Output type.
Use caller-provided writable inputs by default for nested sub-patterns that edit
state owned by a parent pattern. Those sub-patterns also need [NAME] and
[UI] when rendered by composition.
import {
Default,
NAME,
type PerSession,
Stream,
UI,
VNode,
Writable,
} from "commonfabric";
// ============ DATA TYPES ============
export interface Item {
name: Default<string, "">;
done: Default<boolean, false>;
}
// ============ TOP-LEVEL PATTERN (typical deliverable) ============
// Usable standalone: no required caller-provided Writable<> inputs.
// Optional Writable<... | Default<...>> lets callers link state while the
// pattern still works alone; scope wrappers set each field's boundary.
export interface ItemListInput {
items?: Writable<Item[] | Default<[]>>; // optional + Default = standalone-safe
filterText?: PerSession<string | Default<"">>; // transient UI state
}
export interface ItemListOutput {
[NAME]: string;
[UI]: VNode;
items: Item[]; // No Writable in Output
addItem: Stream<{ name: string }>; // Actions as Stream<T>
}
// ============ SUB-PATTERN (edits parent-owned state) ============
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>
}
deno task cf check schemas.tsx --no-run