tkqe2026718
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 "tkqe2026718" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-d8c27d2a7f607eca8bcebf32ce56ba8fa526c11eef59d5ee3992c7291a799a86. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/tkqe2026718 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
Generates short IDs with nanoid for draft and temporary document numbering; use when a local frontend unique ID, draft primary key, or reference to the nanoid-id toolbox is needed.
Introduction source: third_party · user_f1b049da · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: nanoid-draft-id
slug: tkqe2026718
displayName: 本地草稿ID
version: 1.0.0
summary: 用 nanoid 生成短 ID,用于草稿与临时单据编号。
license: MIT
description: 用 nanoid 生成短 ID,用于草稿与临时单据编号。当用户需要前端本地唯一 ID、草稿主键,或提到工具箱 nanoid-id 时使用。本地草稿 ID(nanoid)
灵感:能力工具箱 nanoid-id(pkg: nanoid)。
何时使用
- 离线/本地创建草稿、临时跟进单、附件占位,需要短且 URL 安全的 ID。
- 不想用 UUID 的冗长形式。
硬约束
- 仅本地生成:不请求后端发号;说明碰撞概率与长度关系。
- 默认:
nanoid()或自定义字母表;CRM 草稿建议 12~16 位。 - 前缀:业务可读时可加前缀如
dft_,但总长仍宜短。 - 勿当密码:nanoid 不是密钥;敏感场景用加密随机并走服务端。
- 与 Sqids 区分:Sqids 混淆数字 ID;nanoid 生成随机字符串 ID。
推荐实现要点
import { nanoid, customAlphabet } from 'nanoid'
const draftId = customAlphabet('0123456789abcdefghijklmnopqrstuvwxyz', 14)
export function newDraftId(prefix = 'dft') {
return `${prefix}_${draftId()}`
}
Agent 执行步骤
- 接入 nanoid;统一草稿 ID 工厂函数。
- 自测:连续生成 100 个无重复(演示级)。
- 文档写明:正式单据号仍以服务端为准。
附加
- 说明见 README.md
- 排错见 reference.md
- 模板见 templates/usage.md
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决前端本地生成唯一 ID 的明确需求,适用于草稿与临时单据编号场景
- 提供了清晰的硬约束和使用边界,帮助用户正确理解工具适用范围
Highlights
- 触发词精准完整,明确指出了使用场景(前端本地唯一 ID、草稿主键)和工具箱关键词(nanoid-id)
Areas to improve
-
缺少端到端完整使用示例 Reported severity: Minor
文档提供了代码片段和步骤,但缺少一个完整的端到端使用示例,展示从调用到输出的完整流程。
Recommendation: 建议补充一个完整的使用示例,展示如何调用 newDraftId 函数并输出结果,帮助用户更直观地理解使用方式。
Highlights
- 文档结构清晰,包含何时使用、硬约束、推荐实现要点、Agent 执行步骤等关键章节
- frontmatter 完整,代码示例规范
Areas to improve
-
未提及包导入失败等异常处理 Reported severity: Minor
推荐实现代码未提及如何处理包导入失败等潜在异常情况。
Recommendation: 建议在推荐实现要点或排错文档中补充异常处理建议,如包导入失败的兜底方案或错误提示。
Highlights
- 工具来源明确(nanoid npm 包),参数合理,覆盖了主要使用场景和注意事项
- 提供了碰撞概率、非密码用途、与 Sqids 区分等重要安全和使用边界说明
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.
-
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 25
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
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.