[OMX] Run an anti-slop cleanup/refactor/deslop workflow
日本語の概要は準備中です。原文の説明を表示しています。
Create a library-grade Vue composable that accepts maybe-reactive inputs (MaybeRef / MaybeRefOrGetter) so callers can pass a plain value, ref, or getter. Normalize inputs with toValue()/toRef() inside reactive effects (watch/watchEffect) to keep behavior predictable and reactive. Use this skill when user asks for creating adaptable or reusable composables.
日本語の概要は準備中です。原文の説明を表示しています。
実行スコア 未検証
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Adaptable composables are reusable functions that can accept both reactive and non-reactive inputs. This allows developers to use the composable in a variety of contexts without worrying about the reactivity of the inputs.
Steps to design an adaptable composable in Vue.js:
toValue() or toRef() to normalize inputs inside reactive effects./**
* value or writable ref (value/ref/shallowRef/writable computed)
*/
export type MaybeRef<T = any> = T | Ref<T> | ShallowRef<T> | WritableComputedRef<T>;
/**
* MaybeRef<T> + ComputedRef<T> + () => T
*/
export type MaybeRefOrGetter<T = any> = MaybeRef<T> | ComputedRef<T> | (() => T);
MaybeRefOrGetterMaybeRefMaybeRefOrGetter, or you may accidentally invoke it as a getter.MaybeRefOrGetter.When MaybeRefOrGetter or MaybeRef is used:
toRef() (e.g. watcher source)toValue()Adaptable useDocumentTitle Composable: read-only title parameter
import { watch, toRef } from 'vue'
import type { MaybeRefOrGetter } from 'vue'
export function useDocumentTitle(title: MaybeRefOrGetter<string>) {
watch(toRef(title), (t) => {
document.title = t
}, { immediate: true })
}
Adaptable useCounter Composable: two-way writable count parameter
import { watch, toRef } from 'vue'
import type { MaybeRef } from 'vue'
function useCounter(count: MaybeRef<number>) {
const countRef = toRef(count)
function add() {
countRef.value++
}
return { add }
}
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
[OMX] Run an anti-slop cleanup/refactor/deslop workflow
日本語の概要は準備中です。原文の説明を表示しています。
[OMX] 只读调查跨文件的行为、原因或架构问题,提供源码证据与不确定性。单文件查找无需此流程。
日本語の概要は準備中です。原文の説明を表示しています。
[OMX] Ask a local external advisor CLI (Claude or Gemini) and capture a reusable artifact
日本語の概要は準備中です。原文の説明を表示しています。
[OMX] Supervise deep interview, consensus planning, and durable goal execution for explicit hands-off delivery.
日本語の概要は準備中です。原文の説明を表示しています。
[OMX] Stateful validator-gated research loop with native-hook persistence
日本語の概要は準備中です。原文の説明を表示しています。
[OMX] Bounded best-practice research wrapper using official/upstream evidence first
日本語の概要は準備中です。原文の説明を表示しています。