otmo20263223

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.

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.

0 Downloads

Introduction source: third_party · user_f1b049da · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
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 工具箱试搜公司名

硬约束

  1. 依赖 pinyin-pro;toneType: 'none',结果小写。
  2. 输出三字段:full(全拼无空格)、initials(首字母串)、mixed(原文+全拼+首字母,空格拼接)。
  3. 空串输入 → 三字段皆 ''。
  4. 搜索侧对 query 也 toLowerCase;用 mixed.includes(q) 或分词索引均可。
  5. 实现要点注释标 小四原创。
  6. 多音字以库默认读音为准;关键名可另做别名表(本包不强制)。

推荐实现

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 步骤

  1. 安装 pinyin-pro;客户写入时算 keys 或搜索时即时算。
  2. 过滤:list.filter((c) => matchByPinyinKeys(c.companyName, q))。
  3. 与 fuse/minisearch 并用时,把 full/initials 并入检索字段。
  4. 自测:深圳华信… → initials 含 szhx,query hx 命中。

不要做

  • 把本包当成「带声调朗读展示」唯一方案(展示见汉字转拼音)。
  • 假设后端已有拼音字段而不做前端兜底。

附加

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 解决 CRM 系统中公司名拼音模糊搜索的实际痛点
  • 提供全拼、首字母、混合三键生成方案,提升检索命中率
Trigger Precision85/100

Highlights

  • 触发词覆盖完整,明确区分了与「汉字转拼音」展示场景的差异
Structure and Standards75/100

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 信息完整,版本管理规范
Execution Reliability88/100

Highlights

  • 工具来源明确(pinyin-pro),参数使用正确
  • 覆盖空串输入等边界情况,异常处理合理
Evidence Verifiability (mean of the first four)82/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.