ワンクリックで
tanstack-query
Create TanStack Svelte Query hooks following Hope:RE patterns with createQuery and createMutation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create TanStack Svelte Query hooks following Hope:RE patterns with createQuery and createMutation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Primary skill for the Hope:RE AI art protection desktop application. Covers project overview, Zen design language, key conventions, and common workflows.
UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, and check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, and mobile app. Elements: button, modal, navbar, sidebar, card, table, form, and chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, and flat design. Topics: color systems, accessibility, animation, layout, typography, font pairing, spacing, interaction states, shadow, and gradient. Integrations: shadcn/ui MCP for component search and examples.
Handle ONNX model distribution via Git LFS, GitHub Releases, and runtime downloading in Hope:RE
Convert JAX/Python ML models to ONNX format following the Hope:RE notebook pipeline for Google Colab
Load and run ONNX models in the Rust Tauri backend using the ort crate with platform-specific execution providers
Implement the SPSA-PGD adversarial perturbation pipeline for image protection in Rust
| name | tanstack-query |
| description | Create TanStack Svelte Query hooks following Hope:RE patterns with createQuery and createMutation |
When creating query hooks in Hope:RE, follow these conventions:
import type { MyDataType } from "./types";
import { createQuery } from "@tanstack/svelte-query";
import { invoke } from "@tauri-apps/api/core";
export function useMyData() {
return createQuery(() => ({
queryKey: ["my-data"],
queryFn: async () => await invoke<MyDataType>("get_my_data"),
staleTime: 30 * 1000,
gcTime: 60 * 1000,
retry: 1,
}));
}
import type { MyInput, MyResult } from "./types";
import { createMutation } from "@tanstack/svelte-query";
import { invoke } from "@tauri-apps/api/core";
export function useMyAction() {
return createMutation(() => ({
mutationFn: async (input: MyInput) =>
await invoke<MyResult>("perform_action", { ...input }),
}));
}
import { useMyData, useMyAction } from "$lib/queries";
import { toast } from "svelte-sonner";
export function useMyFeature() {
const query = useMyData();
const mutation = useMyAction();
const isLoading = $derived(query.isPending || mutation.isPending);
const data = $derived(query.data ?? null);
async function handleAction(input: MyInput) {
try {
await mutation.mutateAsync(input);
toast.success("Action completed");
}
catch (error) {
toast.error("Action failed");
console.error("Action error:", error);
}
}
return {
get data() { return data; },
get isLoading() { return isLoading; },
handleAction,
};
}
src/lib/queries/ (e.g., protection.ts, models.ts)src/lib/queries/index.tsinvoke<T>() from @tauri-apps/api/core to call Rust backendtype (never interface)try/catch with toast.error() + console.error()