Logo Hor Bank Id

Hor Bank Id

Tổ chức
openreachtech
hor-bank-id

Allocate an exclusive, collision-free row-id prefix for a requester inside one backend repository, so two writers never pick the same id. Use it before writing an explicit id into a seeder or a test that creates its own rows.

Tổng quan

Nhà phát hànhopenreachtech
Kho mãhora-skills-ort-renchan
Tên kỹ nănghor-bank-id
Sao
32
Bản fork
0
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được openreachtech công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Hor Bank Id trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-bank-id
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openreachtech/hora-skills-ort-renchan.git /tmp/hora-skills-ort-renchan
mkdir -p .claude/skills
cp -r /tmp/hora-skills-ort-renchan/kit/skills/hor-bank-id .claude/skills/hor-bank-id
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Hor Bank Id trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Hor Bank Id ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Hor Bank Id với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

hor-bank-id

Hand this skill a requester id and it returns an id prefix you may use, exclusively, for every row you create in this repository — in any table, in any seeder or test — for as long as this project exists.

Why

Several writers touch the same backend repository over time: a human team may split work by hand, and an agent building one feature after another writes into the same tables. When two of them pick the same explicit row id, whichever runs its seeder last silently overwrites or collides with the other's data. hor-bank-id gives each requester its own slice of the id space, once.

Being serial does not remove the need. A seeder written for feature A is still in the tree when feature B writes its own, and both are loaded together on the next database refresh. What has to be exclusive is the id space across time, not across concurrent processes.

The id shape

Every explicit id is an 8-digit integer, split into two parts.

1  0  0  0  0  0  0  1
└──┬──┘ └────┬────┘
 prefix    free (yours alone)
(100-999)  (00000-99999)
  • The first 3 digits (100-999, 900 values) are the prefix this skill hands out. One requester, one prefix, forever
  • The last 5 digits (00000-99999) are yours to use however you like, in whatever order is convenient
  • A prefix is not scoped to one table. Once you hold 137, you may use 13700001 in users and 13700001 in reservations — different tables have independent primary keys

900 prefixes comfortably exceeds the number of features any one project realistically produces. Overflow is not handled.

The requester id

Whatever uniquely names the caller, chosen by the caller:

  • a human working by hand picks their own name (alice), or a per-feature name for more than one slice
  • an orchestrator driving one feature at a time passes the feature's id, once per feature, and hands the prefix it gets back to every agent working in that repository. The agents themselves never call this skill — several units of one feature run at once, and each asking for itself would queue them behind one another's mkdir for no gain. In Hora Kit that orchestrator is /hora-build's own main session

The same requester id always gets back the same prefix. Asking twice, or retrying after a crash, is always safe.

State

Both live directly under the backend repository's own root — never under the outer app repository's .hora/, which belongs to /hora and means something unrelated there.

<backend-repo>/.hora/id-bank.json     the registry
<backend-repo>/.hora/id-bank.lock/    the lock (a directory — mkdir is atomic on POSIX)

id-bank.json is a flat object, requester id to prefix, as a string so a leading 1 is never mistaken for an octal digit:

json
{
  "sign-up": "100",
  "verify-two-factor": "101",
  "alice": "102"
}

Allocating (the normal call)

  1. Try mkdir <backend-repo>/.hora/id-bank.lock.
  2. If it fails because the directory already exists, wait 1 second and retry. Stop retrying after 5 attempts (5 seconds total) and go to "A lock that will not clear" — do not remove the lock yourself here.
  3. Once mkdir succeeds, you hold the lock. Read id-bank.json (treat a missing file as {}).
  4. If the requester id is already a key, that value is the answer. Go to step 6.
  5. Otherwise, pick the lowest integer in 100..999 not already used as a value, add { "<requester id>": "<that number>" }, and write the whole file back (rewrite it whole — a partial write would corrupt the JSON for the next reader).
  6. rmdir <backend-repo>/.hora/id-bank.lock to release the lock, then return the prefix.

Never skip the lock, even to only read the file — a reader running concurrently with a writer's rewrite can observe a half-written file.

A lock that will not clear

Reaching the retry limit means another writer is either still working or died mid-update. From outside these look identical, so never remove the lock yourself to force through. Report the failure instead:

  • An orchestrator stops the whole session and states plainly: "the lock hor-bank-id uses did not clear, so this session is ending. Starting it again will clear it automatically and continue" (see "Clearing a stale lock"). This should be rare — the lock is taken once per feature, by the main session, for the few seconds one allocation takes. In Hora Kit the command to start again is /hora
  • A human running this by hand may wait and retry, or run the clearing step below themselves

Clearing a stale lock

A lock still standing at the very start of a fresh run cannot belong to anything still alive — nothing in this project holds it across separate invocations. Clearing it is therefore safe at that moment, and only then.

rm -rf <backend-repo>/.hora/id-bank.lock

An orchestrator runs this, unconditionally, as its very first action against the backend row on any invocation; in Hora Kit that is /hora-build. A human recovering from the failure above runs the same command by hand.

Using the prefix once you have it

Combine it with your own 5 digits when you write an explicit id — in a seeder, or inside a test that creates its own fixture. Do not derive ids from anything but your own prefix, and do not read or reason about another requester's rows.

Câu hỏi thường gặp

Kỹ năng AI Hor Bank Id làm được gì?

Allocate an exclusive, collision-free row-id prefix for a requester inside one backend repository, so two writers never pick the same id. Use it before writing an explicit id into a seeder or a test that creates its own rows.

Vì sao nên dùng Hor Bank Id trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Hor Bank Id là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Hor Bank Id trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-bank-id. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Hor Bank Id?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Hor Bank Id với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Hor Bank Id với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Hor Bank Id có miễn phí không?

Có. Kỹ năng này được openreachtech phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇