skills/orixakit-hooks/SKILL.md
--- name: orixakit-hooks description: Use this skill when the user needs React utility hooks from Orixakit: useLocalStorage, useDebounce, useMediaQuery. Trigger on any mention of @orixakit hooks or these hook names. --- # Orixakit Hooks Utility hooks for common React patterns. ## Install ```bash npx shadcn@latest add @orixakit/use-local-storage npx shadcn@latest add @orixakit/use-debounce npx shadcn@latest add @orixakit/use-media-query ``` Or use direct URLs: ```bash npx shadcn@latest add
npx skillsauth add freeonly789-maker/orixakit skills/orixakit-hooksInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Utility hooks for common React patterns.
npx shadcn@latest add @orixakit/use-local-storage
npx shadcn@latest add @orixakit/use-debounce
npx shadcn@latest add @orixakit/use-media-query
Or use direct URLs:
npx shadcn@latest add https://orixakit.dev/r/use-local-storage.json
npx shadcn@latest add https://orixakit.dev/r/use-debounce.json
npx shadcn@latest add https://orixakit.dev/r/use-media-query.json
Type-safe localStorage hook with SSR safety and JSON serialization.
Signature:
function useLocalStorage<T>(
key: string,
initialValue: T
): [T, (value: T | ((prev: T) => T)) => void, () => void]
Returns:
[value, setValue, removeValue]Usage:
import { useLocalStorage } from "@/hooks/use-local-storage"
// Basic usage
const [theme, setTheme, removeTheme] = useLocalStorage<"light" | "dark">(
"theme",
"light"
)
// With component
export function ThemeToggle() {
const [theme, setTheme] = useLocalStorage<"light" | "dark">("theme", "light")
return (
<button onClick={() => setTheme(theme === "light" ? "dark" : "light")}>
Current theme: {theme}
</button>
)
}
// With updater function
const [count, setCount] = useLocalStorage("count", 0)
setCount((prev) => prev + 1)
// Remove value
removeTheme()
Features:
Debounce any value or callback with configurable delay.
Signature:
function useDebounce<T>(value: T, delay?: number): T
Parameters:
value — Value to debouncedelay — Debounce delay in milliseconds (default: 300)Returns:
Usage:
import { useDebounce } from "@/hooks/use-debounce"
import { useEffect, useState } from "react"
// Search input with debounced API call
export function SearchUsers() {
const [searchQuery, setSearchQuery] = useState("")
const [results, setResults] = useState([])
const debouncedSearch = useDebounce(searchQuery, 400)
useEffect(() => {
if (debouncedSearch) {
fetch(`/api/users/search?q=${debouncedSearch}`)
.then((res) => res.json())
.then(setResults)
}
}, [debouncedSearch])
return (
<div>
<input
type="text"
placeholder="Search users..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
/>
<ul>
{results.map((user) => (
<li key={user.id}>{user.name}</li>
))}
</ul>
</div>
)
}
Common Patterns:
// Debounce form input
const [formValue, setFormValue] = useState("")
const debouncedFormValue = useDebounce(formValue, 500)
useEffect(() => {
// Save to database
saveFormData(debouncedFormValue)
}, [debouncedFormValue])
// Debounce window resize
const [windowSize, setWindowSize] = useState({ width: 0, height: 0 })
const debouncedSize = useDebounce(windowSize, 300)
useEffect(() => {
const handleResize = () => {
setWindowSize({
width: window.innerWidth,
height: window.innerHeight,
})
}
window.addEventListener("resize", handleResize)
return () => window.removeEventListener("resize", handleResize)
}, [])
Reactive media query hook. SSR-safe.
Signature:
function useMediaQuery(query: string): boolean
Parameters:
query — CSS media query string (e.g., "(max-width: 768px)")Returns:
boolean — Whether the media query matchesUsage:
import { useMediaQuery } from "@/hooks/use-media-query"
// Responsive layout
export function ResponsiveLayout() {
const isMobile = useMediaQuery("(max-width: 768px)")
const isTablet = useMediaQuery("(max-width: 1024px)")
return (
<div>
{isMobile && <MobileNav />}
{!isMobile && <DesktopNav />}
</div>
)
}
// Dark mode preference
export function DarkModeToggle() {
const prefersDark = useMediaQuery("(prefers-color-scheme: dark)")
return (
<button>
{prefersDark ? "🌙 Dark Mode" : "☀️ Light Mode"}
</button>
)
}
// Landscape orientation
export function OrientationDetector() {
const isLandscape = useMediaQuery("(orientation: landscape)")
return (
<div>
{isLandscape ? "Landscape" : "Portrait"}
</div>
)
}
Common Media Queries:
// Breakpoints
const isMobile = useMediaQuery("(max-width: 640px)")
const isTablet = useMediaQuery("(max-width: 1024px)")
const isDesktop = useMediaQuery("(min-width: 1025px)")
// Device features
const prefersDark = useMediaQuery("(prefers-color-scheme: dark)")
const prefersLight = useMediaQuery("(prefers-color-scheme: light)")
const prefersReducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)")
// Orientation
const isPortrait = useMediaQuery("(orientation: portrait)")
const isLandscape = useMediaQuery("(orientation: landscape)")
// Touch capability
const isTouchDevice = useMediaQuery("(hover: none)")
const hasHover = useMediaQuery("(hover: hover)")
Features:
import { useMediaQuery } from "@/hooks/use-media-query"
export function ResponsiveGrid() {
const isMobile = useMediaQuery("(max-width: 640px)")
const isTablet = useMediaQuery("(max-width: 1024px)")
const cols = isMobile ? 1 : isTablet ? 2 : 4
return (
<div style={{ display: "grid", gridTemplateColumns: `repeat(${cols}, 1fr)` }}>
{/* Grid items */}
</div>
)
}
import { useLocalStorage } from "@/hooks/use-local-storage"
import { useDebounce } from "@/hooks/use-debounce"
import { useEffect, useState } from "react"
export function SearchWithHistory() {
const [query, setQuery] = useState("")
const [history, setHistory, clearHistory] = useLocalStorage<string[]>(
"search_history",
[]
)
const debouncedQuery = useDebounce(query, 300)
useEffect(() => {
if (debouncedQuery && !history.includes(debouncedQuery)) {
setHistory([debouncedQuery, ...history.slice(0, 9)])
}
}, [debouncedQuery])
return (
<div>
<input
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Search..."
/>
<div>
{history.map((item) => (
<button key={item} onClick={() => setQuery(item)}>
{item}
</button>
))}
<button onClick={clearHistory}>Clear History</button>
</div>
</div>
)
}
import { useMediaQuery } from "@/hooks/use-media-query"
export function AdaptiveUI() {
const isMobile = useMediaQuery("(max-width: 768px)")
const prefersDark = useMediaQuery("(prefers-color-scheme: dark)")
const prefersReducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)")
return (
<div
style={{
backgroundColor: prefersDark ? "#1a1a1a" : "#ffffff",
animation: prefersReducedMotion ? "none" : "fadeIn 0.3s",
padding: isMobile ? "1rem" : "2rem",
}}
>
{isMobile ? <MobileLayout /> : <DesktopLayout />}
</div>
)
}
development
--- name: orixakit-components description: Use this skill whenever the user wants to use, install, or learn about Orixakit UI primitive components: OrixButton, OrixInput, OrixCard. Trigger on any mention of @orixakit primitives, installing orix-button, orix-input, or orix-card, or building UI with Orixakit. --- # Orixakit UI Components ## Install ```bash # Namespace method (requires components.json setup — see below) npx shadcn@latest add @orixakit/orix-button npx shadcn@latest add @orixakit/
testing
--- name: orixakit-blocks description: Use this skill when the user wants to scaffold auth pages, dashboards, or sidebars using Orixakit blocks. Triggers on: orix-login-01, orix-dashboard-01, orix-sidebar-01, login block, dashboard block, @orixakit blocks. --- # Orixakit Blocks Full-page blocks. Each block installs as complete files into your app directory. ## Install ```bash npx shadcn@latest add @orixakit/orix-login-01 npx shadcn@latest add @orixakit/orix-dashboard-01 npx shadcn@latest add
testing
--- name: orixakit-ai description: Use this skill when the user needs AI-specific UI components from Orixakit: OrixChatInput or OrixAiCard. Trigger on chat UI, AI response display, streaming UI, @orixakit ai components, orix-chat-input, orix-ai-card. --- # Orixakit AI Components UI components designed for AI-powered applications. ## Install ```bash npx shadcn@latest add @orixakit/orix-chat-input npx shadcn@latest add @orixakit/orix-ai-card ``` Or use direct URLs: ```bash npx shadcn@latest
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.