fec-state-management

fec-state-management is a skill for Claude Code from bovinphang/frontend-craft. It costs 102 tokens per session (1,344 once invoked), scanned A, original, MIT.

A guide for deciding where an application's changing information should live, such as inside a component, in the URL, in a form, in a browser cache, or in a shared store. A store is a shared place for client-side information used across parts of an app.

In plain words
What is it for?
Choosing and reviewing state arrangements in React, Vue, Next.js, and Nuxt; handling forms, filters, search terms, page numbers, remote data, login details, themes, shopping carts, and data that must survive a page refresh.
Why use it?
Putting everything in one shared store creates duplication and makes updates harder to follow. This helps keep each piece of information in one appropriate place and avoids saving values that can already be calculated.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the frontend-craft plugin — 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers shipped together

Good fit Choosing and reviewing state arrangements in React, Vue, Next.js, and Nuxt; handling forms, filters, search terms, page numbers, remote data, login details, themes, shopping carts, and data that must survive a page refresh.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bovinphang/frontend-craft/fec-state-management
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bovinphang/frontend-craft --skill fec-state-management
Clone the repo
git clone --depth 1 https://github.com/bovinphang/frontend-craft

Made for: Claude Code.

Or install frontend-craft, the plugin that ships this one along with the rest of its 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fec-state-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-state-management/github.svg)](https://agentmods.dev/skills/bovinphang/frontend-craft/fec-state-management)
Your own site
<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-state-management"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-state-management/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fec-state-management

Your own site · 80×15
<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-state-management"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-state-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00102 $0.01344
Opus 5 $0.00051 $0.00672
Sonnet 5 $0.00020 $0.00269
Haiku 4.5 $0.00010 $0.00134

Measured 11d ago against content hash 5eb7029d4b5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

fec-state-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

localized/zh-CN/skills/fec-state-management/SKILL.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

前端状态管理

用途

为前端状态确定清晰归属,避免全局 store 膨胀、重复缓存和派生状态同步错误。

流程

1. 先分类状态来源

不要先选 Redux、Zustand、Pinia 或 Context。先把每个状态标到唯一归属,再决定工具。

状态类型 典型例子 默认归属
本地 UI 状态 弹窗开关、tab、展开行、hover 编辑态 组件内 state / ref
表单状态 输入值、脏字段、校验错误、提交中 表单库或表单组件
服务端状态 列表、详情、分页结果、远程错误 请求缓存库
URL 状态 搜索词、筛选、排序、页码、选中 tab 路由参数 / search params
全局客户端状态 登录用户、主题、权限快照、购物车草稿 全局 store
浏览器持久化状态 跨刷新保留的草稿、偏好、离线队列 存储层 + 状态适配器
type ReportsStateMap = {
  search: "url";
  selectedReportId: "url";
  reports: "server-state-cache";
  isFilterPanelOpen: "local-ui";
  draftColumns: "browser-persistence";
};

2. 保持最小状态

可从 props、server state、URL 或已有 state 推导出来的值,不要另存一份。

interface Invoice {
  id: string;
  status: "draft" | "sent" | "paid";
}

function InvoiceList({ invoices }: { invoices: Invoice[] }) {
  const paidInvoices = invoices.filter((invoice) => invoice.status === "paid");

  return <span>{paidInvoices.length}</span>;
}

3. 选择 React 全局状态方案

React 中优先本地化和组合;只有跨页面、跨 feature 或需要统一动作时才引入全局 store。

import { create } from "zustand";

interface WorkspaceState {
  activeWorkspaceId: string | null;
  setActiveWorkspaceId: (workspaceId: string) => void;
}

export const useWorkspaceStore = create<WorkspaceState>((set) => ({
  activeWorkspaceId: null,
  setActiveWorkspaceId: (activeWorkspaceId) => set({ activeWorkspaceId }),
}));

决策顺序:

  1. 只在一个组件或一个小子树使用:useState / useReducer
  2. 低频全局配置或依赖注入:Context。
  3. 中等复杂业务状态:Zustand 或 Jotai,按仓库现有选型优先。
  4. 大型应用、严格动作流、审计或时间旅行调试:Redux Toolkit。
  5. 远程数据:使用数据获取 skill 管理 query key、缓存和失效策略。

4. 选择 Vue 全局状态方案

Vue 3 中,局部跨层级传递使用 provide/inject;全局业务状态使用 Pinia 或项目既有 store。

import { computed, readonly, ref } from "vue";
import { defineStore } from "pinia";

export const useSessionStore = defineStore("session", () => {
  const userId = ref<string | null>(null);
  const isSignedIn = computed(() => userId.value !== null);

  function signIn(nextUserId: string) {
    userId.value = nextUserId;
  }

  return {
    userId: readonly(userId),
    isSignedIn,
    signIn,
  };
});

Read the full file on GitHub · 141 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 141 lines · 102 tokens per session scan A 5eb7029d4b5c

Subscribe to this mod's changes

fec-state-management is a skill published in the GitHub repository bovinphang/frontend-craft (21 stars, last pushed 9d ago), licensed MIT. It adds 102 tokens to every session and 1,344 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

brand-design

Brand-aware design system generator that acts as Head of Brand. Translates abstract brand language into a mathematically-validated, implementation-ready design system, writes creative-brief.md as the source of truth for all UI/UX in a project, and optionally compiles it to framework tokens (Tailwind v4 @theme, v3…

rfxlamia/pocketto · 146 tokens

mobile-flows-maestro

This skill should be used when Maestro is explicitly requested or already present and the task is to author, run, or debug iOS/Android Maestro flows; use Maestro MCP; or handle Maestro selectors, system UI, permissions, Keychain, JavaScript, waits, device state, flakiness, or CI. Evidence includes a .maestro directory…

johnkozaris/jko-claude-plugins · 102 tokens

ui-ux-pro-max

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…

avelikiy/great_cto · 238 tokens

genpage

Creates, updates, and deploys Power Apps generative pages for model-driven apps using React v17, TypeScript, and Fluent UI V9. Orchestrates specialist agents for planning, entity creation, and code generation. Use it when user asks to build, retrieve, or update a page in an existing Microsoft Power Apps model-driven…

microsoft/power-platform-skills · 140 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

liveview-patterns

Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch. Use when handling interactions, debugging events, or tracking Presence.

oliver-kriska/claude-elixir-phoenix · 51 tokens