Source profileQuality 88/100

commontoolsinc/labs/skills/pattern-implement/SKILL.md

pattern-implement

Build Common Fabric patterns and sub-patterns

Source repository stars
37
Declared platforms
0
Static risk flags
0
Last source update
2026-08-05
Source checked
2026-08-05

Decision brief

What it does—and where it fits

Build Common Fabric patterns and sub-patterns

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/commontoolsinc/labs --skill "skills/pattern-implement"
    Safe inspection promptEditorial

    Inspect the Agent Skill "pattern-implement" from https://github.com/commontoolsinc/labs/blob/b0ff67d2dde1812680849aa2373df1f49b6faa2f/skills/pattern-implement/SKILL.md at commit b0ff67d2dde1812680849aa2373df1f49b6faa2f. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Core Rule

      Match the implementation mode to the task.

      Match the implementation mode to the task.For Pattern Factory Build, implement the top-level pattern deliverable described by the brief, spec, UX design, and UI design. Use sub-patterns only when they make the implementation clearer.For an isolated sub-pattern task, write one sub-pattern with minimal UI first so data flow can be verified before polish.
    2. 02

      Order

      1. Leaf patterns first (no dependencies on other patterns) 2. Container patterns (compose leaf patterns) 3. main.tsx last (composes everything)

      Leaf patterns first (no dependencies on other patterns)Container patterns (compose leaf patterns)main.tsx last (composes everything)
    3. 03

      Read First

      For Pattern Factory Build, do not start implementation until you have read the Build guide plus the two foundational reactivity/local-cell references above.

      The reads mandated by pattern-dev:docs/common/patterns/ - generalizable pattern idiomsdocs/common/concepts/action.md - action() for local state
    4. 04

      Key Patterns

      action() - Closes over local state in pattern body:

      Primary pattern state: expose it in the Input/Output contract withStatic local UI state: create it with new Writable(...) from static literalsDraft/editing state: create it from a static value, then copy from input state
    5. 05

      Done When

      Pattern compiles: deno task cf check pattern.tsx --no-run

      Pattern compiles: deno task cf check pattern.tsx --no-runThe top-level UI or sub-pattern UI renders the behavior needed for the taskNew behavior is structured so tests can exercise it through typed streams,

    Permission review

    Static risk signals and limitations

    No configured static risk pattern was detected

    This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score88/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars37SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    commontoolsinc/labs
    Skill path
    skills/pattern-implement/SKILL.md
    Commit
    b0ff67d2dde1812680849aa2373df1f49b6faa2f
    License
    0BSD
    Collected
    2026-08-05
    Default branch
    main
    View the original SKILL.md

    Use the cf skill, or read skills/cf/SKILL.md, for CLI documentation when running commands.

    Implement Pattern

    Core Rule

    Match the implementation mode to the task.

    For Pattern Factory Build, implement the top-level pattern deliverable described by the brief, spec, UX design, and UI design. Use sub-patterns only when they make the implementation clearer.

    For an isolated sub-pattern task, write one sub-pattern with minimal UI first so data flow can be verified before polish.

    Always use pattern<Input, Output>() - expose actions as Stream<T> for testability.

    Order

    1. Leaf patterns first (no dependencies on other patterns)
    2. Container patterns (compose leaf patterns)
    3. main.tsx last (composes everything)

    Read First

    • The reads mandated by pattern-dev: docs/common/ai/pattern-development-guide.md (especially the SES authoring limits and escape-hatch guidance), docs/common/concepts/reactivity.md, docs/common/patterns/new-cells.md, and — in a Pattern Factory Build workspace — docs/common/ai/pattern-factory-build-guide.md
    • docs/common/patterns/ - generalizable pattern idioms
    • docs/common/concepts/action.md - action() for local state
    • docs/common/concepts/handler.md - handler() for reusable logic
    • docs/common/concepts/identity.md - equals() for object comparison
    • docs/common/patterns/multi-user-patterns.md - Presenting Identity (viewer via #profile, every participant rendered with cf-profile-badge bound to their stored profile cell — cf-avatar + snapshot only as an offline fallback, roster built by join storing the live profile cell) when the pattern has multiple people or a current-user concept

    For Pattern Factory Build, do not start implementation until you have read the Build guide plus the two foundational reactivity/local-cell references above.

    Key Patterns

    action() - Closes over local state in pattern body:

    const inputValue = new Writable("");
    const submit = action(() => {
      items.push({ text: inputValue.get() });
      inputValue.set("");
    });
    

    Use new Writable() only for pattern-owned local cells initialized from static values. Do not pass an input prop, mapped field, computed value, or other reactive value into new Writable(). If the pattern receives writable state, use that input cell directly; if a draft needs to copy from input state, copy in an action or another valid reactive/event context.

    For Pattern Factory Build, this rule applies to the top-level pattern input object too. Do not initialize local state with new Writable(input.name || ""), new Writable(input.items || []), new Cell(input.field), or helper calls around input.field. First decide whether each field is primary pattern state, static local UI state, or draft/editing state:

    • Primary pattern state: expose it in the Input/Output contract with Default<> and Writable<> as needed, then use the reactive input directly.
    • Static local UI state: create it with new Writable(...) from static literals only.
    • Draft/editing state: create it from a static value, then copy from input state inside an action() or another valid event/reactive context.

    Transient UI state (active tab, selected item, filter text, open modal): apply the PerSession new-tab test from the pattern-dev skill.

    When a pattern needs explicit time or randomness, call the JavaScript built-ins directly: Date.now() (or new Date()) for the clock and Math.random() for entropy. These are gated inside a pattern sandbox — allowed only inside a handler, where the clock is coarsened to one-second resolution — and throw a TimeCapabilityError in a computed()/lift() or at pattern-body level. To read a live clock reactively in a computed(), use the #now wish instead. If a control is already bound to a cell, usually via $value or $checked, let that binding own the control value. Use oncf-change / oncf-input only for dependent state or other side effects.

    Do not invoke streams or writes while assigning JSX event props. For example, onClick={selectItem.send(index)} runs during render; use onClick={() => selectItem.send(index)} or a bound handler() instead. This is especially important inside .map() bodies because render-time writes can make raw:map non-idempotent.

    handler() - Reused with different bindings:

    const deleteItem = handler<void, { items: Writable<Item[]>; index: number }>(
      (_, { items, index }) => items.set(items.get().toSpliced(index, 1)),
    );
    // In JSX: onClick={deleteItem({ items, index })}
    

    Rendering sub-patterns - Function calls and JSX both work (verified: both forms pass cf check with a typed Output interface):

    // ✅ Function call form
    return <>{items.map((item) => ItemPattern({ item, allItems: items }))}</>;
    
    // ✅ JSX form
    return <>{items.map((item) => <ItemPattern item={item} />)}</>;
    

    The sub-pattern's Output type must include [UI]: VNode — see docs/common/patterns/composition.md.

    Done When

    • Pattern compiles: deno task cf check pattern.tsx --no-run
    • The top-level UI or sub-pattern UI renders the behavior needed for the task
    • New behavior is structured so tests can exercise it through typed streams, handlers, or observable state
    • Ready for testing