spa20269450

Uses IMask to provide input masks and real-time formatting for phone numbers, ID numbers, amounts, and similar fields; suitable for scenarios requiring IMask, input masking, or segmented phone-number entry.

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 "spa20269450" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-e36f4455e0d9911bdd759189c0412a0a39aa191bab1c97d927798e3a73d10274. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/spa20269450 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

Uses IMask to provide input masks and real-time formatting for phone numbers, ID numbers, amounts, and similar fields; suitable for scenarios requiring IMask, input masking, or segmented phone-number entry.

0 Downloads

Introduction source: third_party · user_f1b049da · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: spa20269450
slug: spa20269450
displayName: 输入掩码IMask
version: 1.0.0
summary: 用 IMask 为手机、证件、金额等输入做实时格式化掩码。
license: MIT
description: 用 imask 为手机号、证件号、金额等字段做输入掩码与实时格式化。当用户要 IMask、输入掩码、手机号分段录入时使用。

输入掩码 IMask(imask)

灵感:能力工具箱 imask(pkg: imask)。

小四原创:边输入边套掩码,提交前取「裸值」,展示用「格式化值」。

何时使用

  • 手机号 138 0000 0000 分段
  • 金额千分位 / 证件号分段录入
  • Element Plus / 原生 input 要输入掩码

硬约束

  1. 使用 imask(或 vue-imask 等官方封装)。
  2. 表单提交用 unmasked 值;展示可用 masked。
  3. 预置:手机 11 位、金额、简易证件;按需扩展。
  4. 销毁组件时 mask.destroy(),防泄漏。
  5. 实现要点注释标 小四原创。

推荐实现

import IMask from 'imask'

// 小四原创:手机号掩码
export function maskMobile(el: HTMLInputElement) {
  return IMask(el, {
    mask: '000 0000 0000',
    lazy: false,
  })
}

// 小四原创:金额(两位小数)
export function maskMoney(el: HTMLInputElement) {
  return IMask(el, {
    mask: Number,
    scale: 2,
    thousandsSeparator: ',',
    radix: '.',
    normalizeZeros: true,
    padFractionalZeros: true,
  })
}

export function readUnmasked(mask: { unmaskedValue: string }) {
  return mask.unmaskedValue
}

Agent 步骤

  1. 给目标 input 挂 IMask;提供 getValue() → unmasked。
  2. 校验:手机去空格后长度 11 再调业务校验。
  3. Vue:优先官方指令/组件,勿重复造轮子。
  4. 自测:输入过程显示掩码,提交为纯数字。

不要做

  • 把掩码显示值直接当唯一存库字段却不说明。
  • 与 cleave 重复造两套同字段(二选一即可)。

附加

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value82/100

Highlights

  • 提供 IMask 输入掩码能力,解决手机号、证件号、金额等字段的实时格式化与分段录入需求
  • 属于明确场景的通用工具,具有广泛受众的实用能力
Trigger Precision88/100

Areas to improve

  • Description in the wrong location Reported severity: Minor

    顶层 frontmatter 中 description 与 skill_body 内重复,但内容完整

    Recommendation: 建议统一 description 位置,避免重复

Highlights

  • 触发词覆盖合理,边界清晰,用户能准确理解使用场景
Structure and Standards92/100

Highlights

  • 结构清晰,包含何时使用、硬约束、推荐实现、Agent 步骤、不要做等章节
  • 有代码示例,frontmatter 完整,单文件未超 500 行
Execution Reliability85/100

Areas to improve

  • 缺少When to Use/示例章节 Reported severity: Minor

    实际有“何时使用”章节,但建议补充更详细端到端示例

    Recommendation: 建议补充更详细的端到端使用示例,提升执行可靠性

Highlights

  • 工具来源明确(imask),参数正确,覆盖主要异常(如销毁防泄漏)
  • 不可逆操作有说明(提交用 unmasked 值)
Evidence Verifiability (mean of the first four)87/100

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.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

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.