baig20263717
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 "baig20263717" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-56c626c29ffc0962706cfa30b274ab31b082d6e7b12239606362a42a7db2244a. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/mzq20265882 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 pinyin-match to locally filter customer names by full pinyin or initials. Lightweight integration: implements keyword → filtered-list approach without building a full search engine. Intended for scenarios needing pinyin filtering, initial matching, or calling the pinyin-match function; complements the “pinyin search key” feature as the matching side.
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: baig20263717
slug: baig20263717
displayName: 客户拼音筛选
version: 1.0.0
summary: 用 pinyin-match 按拼音或首字母本地筛选客户名。
license: MIT
description: 用 pinyin-match 按拼音/首字母本地筛客户名。当用户要拼音筛选、首字母匹配、pinyin-match 时使用。轻量接入:关键字 → 过滤列表;不做完整搜索引擎。与「拼音检索键」互补:那边生成检索键,这边做匹配判定。客户拼音筛选
灵感:能力工具箱 pinyin-match(按拼音/首字母本地筛客户名)。
小四原创:
pinyinMatch.match(name, keyword)→ 过滤客户列表。
纯本地,不请求后端。
何时使用
- 客户下拉输入
zs匹配「张三」 - 列表搜索支持拼音首字母
- Demo 无后端模糊搜
硬约束
- 依赖:
pinyin-match。 - 空关键字返回原列表(或全量,按产品约定)。
- 匹配失败不得抛错中断渲染。
- 实现要点注释标 小四原创。
- 不做服务端索引、不做拼音分词平台。
推荐实现
import PinyinMatch from 'pinyin-match'
export type Named = { name: string }
// 小四原创:拼音/首字母过滤
export function filterByPinyin<T extends Named>(
rows: T[],
keyword: string,
): T[] {
const q = String(keyword ?? '').trim()
if (!q) return rows
return rows.filter((row) => {
try {
return Boolean(PinyinMatch.match(row.name ?? '', q))
} catch {
return false
}
})
}
export function nameHitsPinyin(name: string, keyword: string): boolean {
const q = String(keyword ?? '').trim()
if (!q) return true
try {
return Boolean(PinyinMatch.match(name ?? '', q))
} catch {
return false
}
}
Agent 步骤
npm i pinyin-match。- 客户搜索框
watch关键字调用filterByPinyin。 - 自测:
zs命中「张三」;空关键字恢复全量。
不要做
- 与
pinyin-search-keys混为一谈却不装pinyin-match。 - 把全量客户拉到前端却无分页/上限(大数据需另案)。
附加
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供本地拼音/首字母筛选能力,解决客户名搜索的实际痛点
- 轻量接入设计,无需构建完整搜索引擎,易于集成
Highlights
- 触发场景描述清晰,覆盖拼音筛选、首字母匹配等核心用例
- 与「拼音检索键」功能边界明确,避免混淆
Areas to improve
-
Document is too long Reported severity: Minor
主文档内容超过 500 行限制,影响阅读体验
Recommendation: 建议将部分实现细节移至单独的技术文档或示例文件
Highlights
- 文档结构完整,包含使用场景、约束条件、实现方案和操作步骤
- 提供了完整的 TypeScript 代码示例和异常处理
Highlights
- 工具依赖明确(pinyin-match),参数处理正确
- 包含完善的异常处理机制,匹配失败不会中断渲染
- 空关键字处理逻辑清晰,符合用户预期
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 68
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.