Token导航 LogoToken导航

Agent Skill · 研究检索

prefixed-ulids(带前缀的 ulids)

prefixed-ulids 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

prefixed-ulids 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 67,870。

总安装 240周安装 10GitHub Stars 101下载 80核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:prefixed-ulids(带前缀的 ulids)
来源仓库:https://github.com/dvf/opinionated-django
仓库路径:skills/prefixed-ulids
安装命令:
npx skills add https://github.com/dvf/opinionated-django --skill prefixed-ulids
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dvf/opinionated-django --skill prefixed-ulids

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

带前缀的 ulids 技能用于查找、检索和筛选相关信息,支持关键词和场景匹配。适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境。通过 GitHub 安装,使用 npx skills add 命令添加指定仓库的技能。需确认权限范围和维护状态,注意可能触发联网或文件读写操作。

prefixed-ulids 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/prefixed-ulids

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dvf/opinionated-django --skill prefixed-ulids;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

prefixed-ulids 怎么安装?

在终端执行 npx skills add https://github.com/dvf/opinionated-django --skill prefixed-ulids。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

prefixed-ulids 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

prefixed-ulids 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

prefixed-ulids 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

prefixed-ulids 用的人多吗?

公开数据是累计安装 240 次,近一周安装 10 次,下载 80 次,GitHub 101 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

prefixed-ulids 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
prefixed-ulids

带前缀的 ulids · 本页

240101需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Prefixed ULID Primary Keys

This project uses Stripe-style prefixed ULIDs as the primary key for every Django model:

prd_01jq3v8f6a7b2c8d9e0f1g2h3j4k
ord_01jq3v8fgh7x2y5z9a1b2c3d4e5f

A 3-4 character prefix identifies the entity type, followed by an underscore and a lowercase ULID. ULIDs are 128-bit, lexicographically sortable by creation time, URL-safe, and collision-resistant.

Why

  • Debuggable. ord_01jq... in a log line tells you immediately it's an order — no need to cross-reference the column.
  • Safe to expose. Unlike auto-increment integers, prefixed ULIDs leak no ordering or volume information, and unlike opaque UUIDs they remain human-readable.
  • Time-sortable. ULIDs sort chronologically, so ORDER BY id doubles as ORDER BY created_at without a second index.
  • Type-safe across layers. Every ID is a str end-to-end — no UUID / str coercion at the service/API boundary.
  • No integer collisions. Exporting, importing, and sharding are all easier without monotonic counters.

The Generator

Put this in src/project/ids.py:

from ulid import ULID

def prefixed_ulid(prefix: str) -> str:
    return f"{prefix}_{str(ULID()).lower()}"

def _make_generator(prefix: str):
    def generate() -> str:
        return prefixed_ulid(prefix)

    generate.__name__ = f"generate_{prefix}_id"
    generate.__qualname__ = f"generate_{prefix}_id"
    return generate

Then register a generator per aggregate root:

generate_prd_id = _make_generator("prd")
generate_ord_id = _make_generator("ord")
generate_itm_id = _make_generator("itm")

The __name__ / __qualname__ rewrite matters: Django migrations serialize the default callable's fully qualified name, so each generator needs a distinct identity or the autodetector will get confused.

Choosing a Prefix

  • 3 to 4 lowercase letters — short enough to stay readable in logs
  • Must be unique across the whole project
  • Prefer mnemonic, not cryptic: ord for order, inv for invoice, prd for product, usr for user
  • Avoid collisions with existing prefixes — grep src/project/ids.py before inventing a new one
  • Never rename a prefix once it's in production; the prefix is part of the ID

Using it in a Model

from typing import ClassVar

from django.db import models

from project.ids import generate_prd_id

class Product(models.Model):
    __prefix__: ClassVar[str] = "prd"
    id = models.CharField(
        max_length=64,
        primary_key=True,
        default=generate_prd_id,
        editable=False,
    )
    name = models.CharField(max_length=255)

    def __str__(self) -> str:
        return self.name

Rules:

  • CharField(max_length=64) — ULID is 26 chars, prefix + separator adds up to ~10, 64 leaves headroom.
  • primary_key=True and editable=False.
  • The default is the generator function (no parentheses) so Django calls it per row.
  • __prefix__: ClassVar[str] mirrors the generator's prefix — makes the mapping discoverable from the model class alone, and lets tests assert on it.
  • Never override save() to generate the ID; the default handles it.

Using it Across the Stack

Once IDs are strings at the ORM layer, they stay strings everywhere else:

  • DTOs (Pydantic): id: str — never UUID.
  • Repository params: def get(self, product_id: str) -> ProductDTO:...
  • API path params (django-ninja): def get_product(request, product_id: str):...
  • Celery task args: pass the string ID, never a model instance.
  • Tests: assert on the prefix, e.g. assert dto.id.startswith("prd_").

The prefix is also a cheap sanity check on every boundary: if an ID ever shows up without its prefix, something has stripped or regenerated it incorrectly.

Migrating an Existing Table

If the table already has integer or UUID primary keys, don't try to change them in place. Instead:

  1. Add a new CharField column with the prefixed ULID default, nullable at first.
  2. Backfill with a data migration that assigns prefixed_ulid("prd") to every existing row.
  3. Add unique=True and make it non-nullable in a follow-up migration.
  4. Swap it to primary_key=True only after every foreign key has been migrated to reference the new column — this usually means a multi-release cutover.

Prefer doing this on a new table where possible; in-place primary-key swaps in production are a lot of work for limited benefit.

Verify

  • Every model has __prefix__ and a CharField primary key using a generate_*_id default.
  • Every generate_*_id in src/project/ids.py has a unique prefix.
  • No model uses UUIDField, AutoField, or BigAutoField for its primary key.
  • No DTO field, service argument, or API path param types an ID as UUID — they're all str.
uv run ruff check src
uv run pyrefly check src
uv run pytest

平台分布

Codex

35.02%
按下载量换算28

Claude

31.77%
按下载量换算25

Cursor

20.71%
按下载量换算17

Gemini CLI

8.99%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills