state — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited state (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
UI state only. Server data lives in React Query. Auth tokens live in SecureStore. URL state lives in Expo Router.
| State type | Where it lives |
|---|---|
| Server data (posts, users, products) | React Query |
| Auth tokens | SecureStore |
| Current user/session object | React Query cache |
| URL params, current route | Expo Router |
| Form values | react-hook-form |
| UI state (sidebar, modals, filters, theme) | zustand-x |
// src/stores/ui-store.ts
import { createStore } from 'zustand-x'
type UIState = {
sidebarOpen: boolean
activeModal: string | null
theme: 'light' | 'dark' | 'auto'
}
export const uiStore = createStore<UIState>(
{ sidebarOpen: false, activeModal: null, theme: 'auto' },
{ name: 'ui', mutative: true },
)export const uiStore = createStore<UIState>(
{ sidebarOpen: false, activeModal: null, theme: 'auto' },
{ name: 'ui', mutative: true },
)
.extendSelectors((state) => ({
isDark: () => state.theme === 'dark' ||
(state.theme === 'auto' && Appearance.getColorScheme() === 'dark'),
}))
.extendActions((set) => ({
openModal: (id: string) => set.activeModal(id),
closeModal: () => set.activeModal(null),
toggleSidebar: () => set.sidebarOpen((prev) => !prev),
setTheme: (theme: UIState['theme']) => set.theme(theme),
}))import { useStoreValue, useStoreState, useTracked } from 'zustand-x'
// Read a single value
const sidebarOpen = useStoreValue(uiStore, 'sidebarOpen')
// Read + setter tuple (like useState)
const [theme, setTheme] = useStoreState(uiStore, 'theme')
// Proxy-based -- for nested objects, only re-renders when accessed property changes
const profile = useTracked(uiStore, 'profile')
const name = profile.name // only re-renders if profile.name changes// src/stores/theme-store.ts
import { Appearance } from 'react-native'
import { createStore } from 'zustand-x'
type ThemeState = { mode: 'light' | 'dark' | 'auto' }
export const themeStore = createStore<ThemeState>(
{ mode: 'auto' },
{ name: 'theme', mutative: true },
)
.extendSelectors((state) => ({
isDark: () => {
if (state.mode === 'light') return false
if (state.mode === 'dark') return true
return Appearance.getColorScheme() === 'dark'
},
}))In root _layout.tsx -- listen to system theme:
useEffect(() => {
const sub = Appearance.addChangeListener(() => {
// Re-render when system theme changes
themeStore.set.mode(themeStore.get.mode())
})
return () => sub.remove()
}, [])src/stores/
├── ui-store.ts ← sidebar, modals, loading states
├── theme-store.ts ← dark/light/auto mode
├── filter-store.ts ← list filters, sort order
└── player-store.ts ← media player state (if applicable)mutative: true always for immer-style mutations~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.