v3-use-utils

v3-use-utils is a skill for Claude Code, Codex from un-pany/v3-admin-vite. It costs 113 tokens per session (1,124 once invoked), scanned A, original, MIT.

Documentation for reusable utility functions in a project, including validation, date formatting, CSS variables, permissions, local storage, and tokens.

In plain words
What is it for?
Use it to validate data, format dates, read or change CSS variables, check permissions, identify external links, and store or retrieve tokens and local data.
Why use it?
It helps developers reuse established helpers for common tasks and follow the project's expected behavior for invalid values and shared settings.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to validate data, format dates, read or change CSS variables, check permissions, identify external links, and store or retrieve tokens and local data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/un-pany/v3-admin-vite/v3-use-utils
About the project

V3 Admin Vite is a Vue 3 administrative dashboard template built with Vite, TypeScript, Element Plus, Pinia, Vue Router, and Axios. Developers use it as a starting point for creating web-based administration interfaces, and it is designed to support AI-assisted coding tools. The catalogue entries are skills, rules, and instructions for working with the template.

un-pany/v3-admin-vite · 7,058 stars · on GitHub · un-pany.github.io

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 un-pany/v3-admin-vite --skill v3-use-utils
Clone the repo
git clone --depth 1 https://github.com/un-pany/v3-admin-vite

Made for: Claude Code, Codex.

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 v3-use-utils

README.md
[![agentmods](https://agentmods.dev/badge/skills/un-pany/v3-admin-vite/v3-use-utils/github.svg)](https://agentmods.dev/skills/un-pany/v3-admin-vite/v3-use-utils)
Your own site
<a href="https://agentmods.dev/skills/un-pany/v3-admin-vite/v3-use-utils"><img src="https://agentmods.dev/badge/skills/un-pany/v3-admin-vite/v3-use-utils/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 v3-use-utils

Your own site · 80×15
<a href="https://agentmods.dev/skills/un-pany/v3-admin-vite/v3-use-utils"><img src="https://agentmods.dev/badge/skills/un-pany/v3-admin-vite/v3-use-utils.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,124 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.00113 $0.01124
Opus 5 $0.00056 $0.00562
Sonnet 5 $0.00023 $0.00225
Haiku 4.5 $0.00011 $0.00112

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

Security

Grade A, and why

v3-use-utils 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 10d 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.

.agents/skills/v3-use-utils/SKILL.md · 118 lines

How it starts

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

内置工具函数使用教程

项目在 src/common/utils 目录下提供了一组通用工具函数,通过路径别名 @@/utils/ 导入。

本 Skill 定义的是项目内置的工具函数,当这些函数不存在时,以用户需求为准,新增对应函数。

验证工具 @@/utils/validate

import { isArray, isString, isExternal } from "@@/utils/validate"

// 判断是否为数组
isArray([1, 2, 3]) // true

// 判断是否为字符串
isString("hello") // true

// 判断是否为外链(以 http(s)://、mailto:、tel: 开头)
isExternal("https://example.com") // true
isExternal("/dashboard") // false

日期格式化 @@/utils/datetime

基于 dayjs 封装,无效日期返回 "N/A"

import { formatDateTime } from "@@/utils/datetime"

// 默认格式 YYYY-MM-DD HH:mm:ss
formatDateTime("2026-01-15T10:30:00") // "2026-01-15 10:30:00"

// 自定义格式
formatDateTime("2026-01-15", "YYYY/MM/DD") // "2026/01/15"

// 支持时间戳
formatDateTime(1737000000000) // 格式化后的日期时间

// 无效输入
formatDateTime("invalid") // "N/A"

CSS 变量 @@/utils/css

读取和设置 CSS 变量(变量名必须以 -- 开头)。getCssVar 未找到变量时返回空串 "",不是 undefined

import { getCssVar, setCssVar } from "@@/utils/css"

// 获取全局 CSS 变量
const color = getCssVar("--el-color-primary")

// 设置全局 CSS 变量
setCssVar("--el-color-primary", "#409eff")

// 操作指定元素上的 CSS 变量
const el = document.querySelector(".container") as HTMLElement
setCssVar("--bg-color", "#fff", el)

权限判断 @@/utils/permission

基于当前用户角色或权限判断是否拥有指定权限,内部读取 useUserStore().rolesuseUserStore().permissions

import { checkPermission } from "@@/utils/permission"

// 判断当前用户是否拥有 admin 或 editor 角色
if (checkPermission(["admin", "editor"])) {
  // 有权限
}

// 判断当前用户是否拥有指定权限
if (checkPermission(["permission:button-level"])) {
  // 有权限
}

适用于模板中 v-permission 指令无法覆盖的场景(如在 TS 逻辑中做条件判断)。

本地存储 @@/utils/local-storage

对 localStorage 的类型安全封装,所有 key 统一由 @@/constants/cache-key 中的 CacheKey 管理。

import { getToken, setToken, removeToken } from "@@/utils/local-storage"

// Token 操作
setToken("eyJhbGciOiJIUzI1NiJ9...")
const token = getToken()
removeToken()

可用函数一览:

分组 函数 说明
Token getToken / setToken / removeToken 用户认证令牌
布局配置 getLayoutsConfig / setLayoutsConfig / removeLayoutsConfig 系统布局设置
侧边栏 getSidebarStatus / setSidebarStatus 侧边栏展开/收起状态
主题 getActiveThemeName / setActiveThemeName 当前主题名称
标签栏 getVisitedViews / setVisitedViews / getCachedViews / setCachedViews 标签页缓存

Read the full file on GitHub · 118 lines

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. 10d ago First seen · 118 lines · 113 tokens per session scan A 8e46554e6971

Subscribe to this mod's changes

v3-use-utils is a skill published in the GitHub repository un-pany/v3-admin-vite (7,058 stars, last pushed 2mo ago), licensed MIT. It adds 113 tokens to every session and 1,124 once invoked, about $0.0006 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.