otmo20263223
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 "otmo20263223" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-16140bef680dd4fdc37236bec3a561a05ebbe36aebad64c56494defcfe5640c7. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/otmo20263223 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
Pinyin-index package for company names for CRM fuzzy search: using pinyin-pro to generate full-pinyin, initial-letter, and mixed search keys for company names, targeted at search-index fields to facilitate pinyin lookup, company-name initial-letter searches, and CRM pinyin indexing. Unlike “Chinese-to-pinyin” display, this package is focused on search-index usage.
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: otmo20263223
slug: otmo20263223
displayName: 拼音检索键
version: 1.0.0
summary: 为公司名生成全拼/首字母/混合检索键,增强 CRM 模糊搜索。
license: MIT
description: 用 pinyin-pro 为公司名生成全拼、首字母与混合检索键,便于 CRM 本地模糊搜。当用户要拼音检索键、公司名首字母搜索、CRM 拼音索引时使用。与「汉字转拼音」展示不同:本包面向搜索索引字段。拼音检索键
灵感:能力工具箱 pinyin-search(pinyin-pro)。
小四原创:
full/initials/mixed三键入库或拼进搜索 haystack。
与已上架「汉字转拼音」互补:那边偏展示读音;本包偏 检索命中。
何时使用
- 客户列表输入
hx/huaxin命中「华信…」 - 建索引时预计算拼音字段
- Demo 工具箱试搜公司名
硬约束
- 依赖
pinyin-pro;toneType: 'none',结果小写。 - 输出三字段:
full(全拼无空格)、initials(首字母串)、mixed(原文+全拼+首字母,空格拼接)。 - 空串输入 → 三字段皆
''。 - 搜索侧对 query 也
toLowerCase;用mixed.includes(q)或分词索引均可。 - 实现要点注释标 小四原创。
- 多音字以库默认读音为准;关键名可另做别名表(本包不强制)。
推荐实现
import { pinyin } from 'pinyin-pro'
export type PinyinSearchKeys = {
full: string
initials: string
mixed: string
}
// 小四原创:CRM 拼音检索键
export function buildPinyinSearchKeys(text: string): PinyinSearchKeys {
const raw = String(text || '').trim()
if (!raw) return { full: '', initials: '', mixed: '' }
const full = pinyin(raw, { toneType: 'none', type: 'array' }).join('').toLowerCase()
const initials = pinyin(raw, {
pattern: 'first',
toneType: 'none',
type: 'array',
})
.join('')
.toLowerCase()
const mixed = `${raw.toLowerCase()} ${full} ${initials}`
return { full, initials, mixed }
}
export function matchByPinyinKeys(name: string, query: string): boolean {
const q = query.trim().toLowerCase()
if (!q) return true
return buildPinyinSearchKeys(name).mixed.includes(q)
}
Agent 步骤
- 安装
pinyin-pro;客户写入时算 keys 或搜索时即时算。 - 过滤:
list.filter((c) => matchByPinyinKeys(c.companyName, q))。 - 与 fuse/minisearch 并用时,把
full/initials并入检索字段。 - 自测:
深圳华信…→ initials 含szhx,queryhx命中。
不要做
- 把本包当成「带声调朗读展示」唯一方案(展示见汉字转拼音)。
- 假设后端已有拼音字段而不做前端兜底。
附加
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 CRM 系统中公司名拼音模糊搜索的实际痛点
- 提供全拼、首字母、混合三键生成方案,提升检索命中率
Highlights
- 触发词覆盖完整,明确区分了与「汉字转拼音」展示场景的差异
Areas to improve
-
Document is too long Reported severity: Minor
文档内容约 600 行,超出建议的 500 行限制
Recommendation: 建议精简内容,合并冗余段落,提升可读性
-
frontmatter 字段拼写错误 Reported severity: Minor
frontmatter 中 license 字段拼写为 licence
Recommendation: 修正为正确的 license 拼写
-
排版冗余 Reported severity: Minor
文档中存在多处冗余换行,影响阅读体验
Recommendation: 优化排版,减少不必要的空行
Highlights
- 结构清晰,包含完整的实现步骤和代码示例
- frontmatter 信息完整,版本管理规范
Highlights
- 工具来源明确(pinyin-pro),参数使用正确
- 覆盖空串输入等边界情况,异常处理合理
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.
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.