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.
npx skills add bovinphang/frontend-craft --skill fec-state-managementgit clone --depth 1 https://github.com/bovinphang/frontend-craftWrote 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.
[](https://agentmods.dev/skills/bovinphang/frontend-craft/fec-state-management)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00102 | $0.01344 |
| Opus 5.5 | $0.00041 | $0.00538 |
| Sonnet 5.5 | $0.00020 | $0.00269 |
| Haiku 4.5 | $0.00010 | $0.00134 |
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 1mo 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.
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 }),
}));
决策顺序:
- 只在一个组件或一个小子树使用:
useState/useReducer。 - 低频全局配置或依赖注入:Context。
- 中等复杂业务状态:Zustand 或 Jotai,按仓库现有选型优先。
- 大型应用、严格动作流、审计或时间旅行调试:Redux Toolkit。
- 远程数据:使用数据获取 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,
};
});
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.
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.
- 1mo ago First seen · 141 lines · 102 tokens per session scan A 5eb7029d4b5c
fec-state-management is a skill published in the GitHub repository bovinphang/frontend-craft (22 stars, last pushed 1mo ago), licensed MIT. It adds 102 tokens to every session and 1,344 once invoked, about $0.0004 per session on Opus 5.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.
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…
add-localization
Adds or extends multilingual localization in a Power Pages code-site SPA. Use whenever the user asks to translate, localize, internationalize, support multiple languages, add a language selector, add locale routes, repair an i18n setup, or add languages to an existing React, Vue, Angular, or Astro Power Pages site.
audit
Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.
boundaries
Analyze Phoenix context boundaries and module coupling via mix xref. Use when checking cross-context calls, validating dependencies, before splitting modules, or reviewing architecture.
triage
Triage review findings interactively — approve, skip, or prioritize each issue. Use after /phx:review to filter findings before fixing.
refactoring-patterns
Apply named refactoring transformations to improve code structure without changing behavior. Use when the user mentions "refactor this", "code smells", "extract method", "replace conditional", "technical debt", "move method", "inline variable", "decompose conditional", or "clean up this messy code". Also trigger when…