uniapp-auth-skill

uniapp-auth-skill is a skill for Claude Code, Codex from jiushiwon/wg-skills. It costs 88 tokens per session (2,845 once invoked), scanned A, original, Apache-2.0.

A security guide for login and access control in uni-app WeChat mini-programs. It covers token storage, login state, logout, redirects, and handling HTTP 401 and 403 responses.

In plain words
What is it for?
Use it to design the authentication service, manage user state, handle expired sessions and denied access, implement logout, and protect request and logging flows.
Why use it?
It removes the need to implement authentication rules separately in every page and helps prevent sensitive data, tokens, and error handling from being scattered or exposed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design the authentication service, manage user state, handle expired sessions and denied access, implement logout, and protect request and logging flows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jiushiwon/wg-skills/uniapp-auth-skill
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 jiushiwon/wg-skills --skill uniapp-auth-skill
Clone the repo
git clone --depth 1 https://github.com/jiushiwon/wg-skills

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 uniapp-auth-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiushiwon/wg-skills/uniapp-auth-skill/github.svg)](https://agentmods.dev/skills/jiushiwon/wg-skills/uniapp-auth-skill)
Your own site
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/uniapp-auth-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/uniapp-auth-skill/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 uniapp-auth-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/uniapp-auth-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/uniapp-auth-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,845 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.
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.00088 $0.02845
Opus 5.5 $0.00035 $0.01138
Sonnet 5.5 $0.00018 $0.00569
Haiku 4.5 $0.00009 $0.00284

Measured 24d ago against content hash 89498f64ed6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

uniapp-auth-skill 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 24d 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.

frontend/uniapp/uniapp-auth-skill/SKILL.md · 400 lines

How it starts

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

uniapp 登录鉴权与安全规范 Skill

Overview

本 skill 提供 uniapp 微信小程序项目的登录鉴权与安全规范,不包含业务逻辑。

前置依赖:建议配合 uniapp-standard-skill 使用(红线规则、目录结构、接口规范)

When to Use

  • "登录鉴权怎么做"
  • "uniapp 登录"
  • "token 管理"
  • "401 处理"
  • "403 处理"
  • "登出流程"
  • "安全规范"
  • "接口安全"

快速索引

规范主题 位置 说明
红线规则 #一-红线规则 专属强制规范
认证服务 #二-认证服务架构 Bootstrap、登录态判断
Token 管理 #三-Token 管理 获取 Token、用户上下文
401 处理 #四-401-处理 并发去重、统一跳转
403 处理 #五-403-处理 权限不足处理
登出流程 #六-登出流程 清理状态、回跳
登录回跳 #七-登录回跳 保存/消费回跳地址
用户状态 #八-用户状态管理 Pinia Store
安全规范 #九-安全规范 接口/数据/代码安全

一、红线规则

编号 规则 说明
A01 认证服务收口 登录态统一走 auth.service.ts,禁止在各页面散落 Token 读写
A02 Token 只存 Storage 禁止在内存变量、组件 data、Storage 之外持久化 Token
A03 禁止明文存敏感信息 Storage 中禁止明文存储密码、身份证、银行卡
A04 401 统一处理 所有请求统一通过响应拦截器处理 401,禁止各页面各自跳转
A05 登出必清理 登出时必须清理所有登录态,保留回跳地址
A06 日志脱敏 禁止在日志中输出密码、Token、完整手机号

二、认证服务架构

2.1 核心模块

src/
├── services/
│   └── auth.service.ts    # 认证服务
├── stores/
│   └── user.ts           # 用户状态
├── utils/
│   └── auth.ts          # 鉴权工具
└── constants/
    └── storage.ts       # 存储 Key

2.2 bootstrap 启动引导

// src/services/auth.service.ts

export interface BootstrapResult {
  needLogin: boolean;
  isGuest: boolean;
  profileComplete?: boolean;
}

export async function bootstrap(): Promise<BootstrapResult> {
  const store = useUserStore();
  store.initUser();

  if (!store.isLoggedIn) {
    return { needLogin: true, isGuest: true };
  }

  const results = await Promise.allSettled([
    store.fetchUserProfile({ skipAuthHandler: true }),
    loadAllDictionaries(),
  ]);

  if (results[0].status === 'rejected') {
    const err = results[0].reason;
    if (err?.message?.includes('登录已过期')) {
      store.logout();
      return { needLogin: true, isGuest: true };
    }
  }

  return {
    needLogin: false,
    isGuest: false,
    profileComplete: isProfileComplete(),
  };
}

Read the full file on GitHub · 400 lines

Files

What ships with it

4 files 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. 24d ago Changed 89498f64ed6d
  2. 2mo ago First seen · 400 lines · 88 tokens per session scan A 041db06200e8

Subscribe to this mod's changes

uniapp-auth-skill is a skill published in the GitHub repository jiushiwon/wg-skills (154 stars, last pushed 7d ago), licensed Apache-2.0. It adds 88 tokens to every session and 2,845 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-09-30.

Related

uniapp-auth-skill compared with skills from other repositories

uniapp-auth-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
uniapp-auth-skilljiushiwon/wg-skillsSkill1547d agoApache-2.0A88Claude Code, Codex
orca-emulator-androidstablyai/orcaSkill147ktodayMITA102Claude Code, Codex
glance-canonical-layoutsandroid/skillsSkill11k8d agoApache-2.0A56Claude Code
android-tombstone-symbolicationdotnet/skillsSkill6.4ktodayMITA176Claude Code
dogfoodcallstack/agent-deviceSkill5.6ktodayMITA55Claude Code
winapp-mauimicrosoft/winappCliSkill1.4ktodayMITA68Claude Code
flutter-devMiniMax-AI/skillsSkill14k21d agoMITA83Claude Code