bcjd2026445
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "bcjd2026445" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-f3e1d7c8ec7dc3f8fd31668df99b9b8e19c9e1150808455451dec4b682900033. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/bcjd2026445 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
UA parsing tool based on ua-parser-js: parses user-agent strings into structured browser and operating system information for UA parsing and device recognition scenarios. Emphasizes lightweight integration and does not perform full telemetry or fingerprinting for risk control.
Introduction source: third_party · user_f1b049da · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: bcjd2026445
slug: bcjd2026445
displayName: 浏览器系统识别
version: 1.0.0
summary: 用 ua-parser-js 识别浏览器与操作系统,便于 Demo 排障。
license: MIT
description: 用 ua-parser-js 识别浏览器与系统。当用户要 UA 解析、设备识别、浏览器系统识别时使用。轻量接入:UA 字符串 → 结构化结果;不做完整埋点/风控指纹。浏览器系统识别
灵感:能力工具箱 ua-parse(ua-parser-js 识别浏览器与系统)。
小四原创:
navigator.userAgent→UAParser→{browser,os,device}。
仅本地解析,不上传 UA。
何时使用
- Demo「当前环境」信息条
- 附件预览兼容性提示(Safari / 旧 Chrome)
- 跟进记录附带访问端摘要
硬约束
- 依赖:
ua-parser-js。 - 输入可为自定义 UA 字符串,默认取当前页 UA。
- 输出至少含浏览器名/版本、系统名(缺省用「未知」)。
- 实现要点注释标 小四原创。
- 不做 Canvas 指纹、不做风控评分。
推荐实现
import { UAParser } from 'ua-parser-js'
export type ClientEnv = {
browser: string
os: string
device: string
raw: string
}
// 小四原创:UA → 可读环境摘要
export function parseClientEnv(ua?: string): ClientEnv {
const raw = ua ?? (typeof navigator !== 'undefined' ? navigator.userAgent : '')
const r = new UAParser(raw).getResult()
const browser = [r.browser.name, r.browser.version].filter(Boolean).join(' ') || '未知浏览器'
const os = [r.os.name, r.os.version].filter(Boolean).join(' ') || '未知系统'
const device = r.device.type || r.device.model || 'desktop'
return { browser, os, device, raw }
}
export function formatClientEnv(env: ClientEnv = parseClientEnv()): string {
return `${env.browser} · ${env.os} · ${env.device}`
}
Agent 步骤
npm i ua-parser-js。- 在设置/关于页或排障面板展示
formatClientEnv()。 - 自测:Chrome/Windows 或当前环境可读;空 UA 不崩。
不要做
- 把 UA 当唯一身份去鉴权。
- 收集并上传完整 UA 到第三方。
附加
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 UA 解析功能,适用于 Demo 环境展示、兼容性提示等明确场景
- 轻量接入,不上传 UA,符合隐私规范
Highlights
- 触发词清晰明确,覆盖 UA 解析、设备识别、浏览器系统识别等核心场景
Areas to improve
-
缺少端到端完整示例 Reported severity: Minor
文档提供了代码实现和 Agent 步骤,但缺少一个完整的端到端调用示例展示
Recommendation: 建议补充一个完整的使用示例,展示从输入 UA 到输出结构化结果的完整流程
Highlights
- 文档结构完整,包含 frontmatter、何时使用、实现代码、Agent 步骤等必要部分
- 代码实现规范,有明确注释和类型定义
Highlights
- 依赖 ua-parser-js 明确,参数处理合理
- 覆盖空 UA 等异常情况,无不可逆操作
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 61
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.