miw20269889

For cases requiring Cleave.js formatting of amounts, dates, bank card numbers, etc.; supports Cleave input formatting, card-number grouping, and date masks, to be used as an alternative to IMask.

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

For cases requiring Cleave.js formatting of amounts, dates, bank card numbers, etc.; supports Cleave input formatting, card-number grouping, and date masks, to be used as an alternative to IMask.

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: miw20269889
slug: miw20269889
displayName: 输入格式化Cleave
version: 1.0.0
summary: 用 cleave.js 为金额、日期、卡号等做分段录入格式化。
license: MIT
description: 用 cleave.js 格式化金额、日期、银行卡号等输入。当用户要 Cleave、输入格式化、卡号分段、日期掩码录入时使用。与 IMask 二选一即可。

输入格式化 Cleave(cleave.js)

灵感:能力工具箱 cleave(pkg: cleave.js)。

小四原创:金额/日期/卡号边输边分段;与 IMask 同属输入美化,项目内二选一,勿双挂同一字段。

何时使用

  • 银行卡号四位一段
  • 日期 YYYY/MM/DD 录入
  • 金额千分位(或简单 numeral)

硬约束

  1. 使用 cleave.js(注意维护状态;新项目可优先评估 IMask)。
  2. 提交取 rawValue(去格式);展示用格式化值。
  3. 组件卸载时调用 destroy()。
  4. 实现要点注释标 小四原创。
  5. 已接 IMask 的字段不要再套 Cleave。

推荐实现

import Cleave from 'cleave.js'

// 小四原创:卡号四位分段
export function cleaveCard(el: HTMLInputElement) {
  return new Cleave(el, {
    creditCard: true,
  })
}

// 小四原创:日期
export function cleaveDate(el: HTMLInputElement) {
  return new Cleave(el, {
    date: true,
    datePattern: ['Y', 'm', 'd'],
    delimiter: '-',
  })
}

// 小四原创:千分位整数金额
export function cleaveAmount(el: HTMLInputElement) {
  return new Cleave(el, {
    numeral: true,
    numeralThousandsGroupStyle: 'thousand',
  })
}

export function rawOf(cleave: Cleave) {
  return cleave.getRawValue()
}

Agent 步骤

  1. 按字段类型选 card / date / numeral。
  2. 表单提交用 getRawValue()。
  3. 在 README/注释写明:与 IMask 勿叠用。
  4. 自测:显示有分隔符,提交无分隔符。

不要做

  • 用 Cleave 做复杂校验逻辑(校验另接 validator/zod)。
  • 假装库仍高频维护而不提备选方案。

附加

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value72/100

Highlights

  • 提供 cleave.js 输入格式化能力,覆盖金额、日期、银行卡号等常见场景
  • 明确标注与 IMask 二选一,避免重复使用
Trigger Precision92/100

Highlights

  • 触发词精准完整,覆盖多种变体,边界清晰
Structure and Standards95/100

Highlights

  • 文档结构完整,包含何时使用、硬约束、推荐实现、Agent 步骤等章节
  • 提供了清晰的代码示例和出口条件
Execution Reliability90/100

Highlights

  • 提供了具体的实现代码和注意事项
  • 工具来源明确,参数正确,覆盖了主要使用场景和异常规避
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.