enterprise-contract SKILL.md skillA

This file is byte-identical to the first copy the registry indexed. Same content hash, so the same checks give both the same grade.

enterprise-contract from liujh0729-jpg/ai-enterprise-oem is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add liujh0729-jpg/ai-enterprise-oem/enterprise-contract@git:20261121.9f89a22

Pins git:20261121.9f89a22 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 19 of 19 checks passed
Kind
SKILL.md skill
Repository
liujh0729-jpg/ai-enterprise-oem
Path
.claude/skills/enterprise-contract/SKILL.md
Versions recorded
1
Latest version
git:20261121.9f89a22, committed Nov 21, 2026
Size
2,089 bytes
Repository stars
508
License
AGPL-3.0

Add or change an HTTP endpoint in this repository. Use when the task touches packages/contracts/src, API paths, request/response schemas, or error codes. Covers contract purity, backend moduleHandlers dispatch, frontend endpoint() calls, OpenAPI/Index regeneration, and the mandatory architecture check.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# enterprise-contract

## 何时用

- 新增 / 修改 / 删除 HTTP 接口。
- 调整请求参数、查询、请求体或响应结构。
- 新增错误码或改变错误语义。

## 步骤

1. **改契约**:在 `packages/contracts/src/<domain>.ts` 定义端点,汇总进 `endpoints.ts`。
   - 只 import `zod` 与相对路径模块。
   - 类型由 schema 推导,禁止 `as` 断言(`as const` 除外)。
   - 响应统一使用 `code / message / data` 信封(页面接口按既有范式)。
2. **改后端**:
   - 控制器方法名 = operationId 去掉前缀后首字母小写。
   - 方法参数顺序:`user → 路径参数 → query(有则传)→ body(有则传)`。
   - 在 `backend/src/http/automation-routes.ts` 用 `moduleHandlers('<前缀>_', controller)` 注册。
   - 管理员端点在控制器里调用注入的 `requireAdmin`。
   - 领域错误用 `BusinessException` + 统一错误码。
3. **改前端**:
   - 业务方法放 `frontend/src/api/<domain>.ts`,用 `endpoint(endpoints.Xxx_yyy)`。
   - 页面与 Hook 不得直接调用 `http` 或手写 `/api/backend`。
4. **重生成与校验**:

```bash
pnpm --filter @enterprise/contracts build
pnpm api:docs
pnpm api:index
pnpm check:architecture
```

5. **安全**:涉及租户、顾客态、管理员身份的端点,至少验证一条拒绝路径。
   顾客态数据必须同时带站点/店铺标识与顾客标识。

## 反模式

- 在 README 或后台页手写接口清单 / 错误码表。
- 在契约里 import 后端服务或数据库类型。
- 为了少改一个文件,绕过 `moduleHandlers` 直接手写路由且不做契约校验。
- 改完契约不重生成 `openapi.json` 与分域索引。

Read the whole file at its exact version.

How to install

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_k5xisakyxdqsetik/0e689915226ce7f3a721279365d18904086c2f2a95b87e51a70c7e11936604c8.json

Then /plugin install enterprise-contract@markdownregistry-k5xisakyxdqsetik in Claude Code. It installs git:20261121.9f89a22, the one graded A here, pinned to the commit it was graded at, and leaves it there.

The exact contents, by fingerprint
mdr add liujh0729-jpg/ai-enterprise-oem/enterprise-contract@sha256:0e689915226ce7f3

The line at the top of this page pins the label git:20261121.9f89a22, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_k5xisakyxdqsetik.svg)](https://markdownregistry.com/a/art_k5xisakyxdqsetik)

4 badge image fetches in 30 days. What the badge shows.

Ask from your agent
claude mcp add --transport http markdownregistry https://markdownregistry.com/mcp/registry

Then ask it: what changed in liujh0729-jpg/ai-enterprise-oem/enterprise-contract since the version I have? It reads every saved version here, no key and no account. Any agent that speaks MCP can add it.

Got a copy of enterprise-contract from somewhere else? Ask it: where did my enterprise-contract come from, and what was changed? It names the public original, the version yours is closest to and every changed line. The text is not kept.

Versions

The registry has recorded 1 version of this file, committed on Nov 21, 2026.

Watch this file (sign in, one email per new version)

versioncommittedcommitsizeaudit
git:20261121.9f89a22 latest2026-11-21 9f89a22 2,089 BA view
Keep it current by itself, install once

Committed this skill to a repository? Install the markdownregistry skill updates app on it, or on all of them. When the registry saves a newer version, a pull request brings your copy to it within minutes, the newest version first, then what changed and any check it newly trips. A copy you edited is never touched, and nothing is deleted.

Install on GitHub

It asks to read and write contents and pull requests, and to read metadata. No workflow file, no Actions setting, nothing runs on your runners. Uninstall it and everything the registry kept about your repository is deleted.

Keep it current by itself

Committed this skill to a repository? Add one workflow file, and when a newer version is saved, a pull request brings your copy to it, the newest version first, then what changed and any check it newly trips. A copy you edited is never touched, and nothing is deleted.

mkdir -p .github/workflows && curl -fsSL https://markdownregistry.com/ci/skill-updates.yml -o .github/workflows/skill-updates.yml

It runs daily on GitHub Actions, no key and no account. Read the workflow before you add it.

Check a whole project

From the root of your project, one line hashes each installed skill's SKILL.md, your AGENTS.md and your CLAUDE.md, and asks the registry once. Only the fingerprints and paths are sent.

sha256sum .claude/skills/*/SKILL.md AGENTS.md CLAUDE.md | curl -s --data-binary @- https://markdownregistry.com/api/v1/check-copies

In CI, add --fail-with-body: the answer is 409 when any file is behind, so the step fails and still prints which files.

sha256sum .claude/skills/*/SKILL.md AGENTS.md CLAUDE.md | curl -s --fail-with-body --data-binary @- https://markdownregistry.com/api/v1/check-copies

No sha256sum on your machine? shasum -a 256 prints the same lines.

Audit of the latest version

A  19 of 19 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (2089 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No encoded command decoded and run in a shell
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No decoded text run in a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

liujh0729-jpg/ai-enterprise-oem · 508 stars · license AGPL-3.0 · pushed 2026-11-21 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_k5xisakyxdqsetik
GET https://markdownregistry.com/api/v1/resolve?ref=liujh0729-jpg/ai-enterprise-oem/enterprise-contract
GET https://markdownregistry.com/api/v1/blob/0e689915226ce7f3a721279365d18904086c2f2a95b87e51a70c7e11936604c8
GET https://markdownregistry.com/api/v1/list?kind=skill

Every file of this kind listed here, most starred first, in pages: send each page's next back as cursor. JSON, no key.

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from liujh0729-jpg/ai-enterprise-oem

enterprise-contract SKILL.md skill
liujh0729-jpg/ai-enterprise-oem · .agents/skills/enterprise-contract/SKILL.md · Add or change an HTTP endpoint in this repository. Use when the task touches packages/contracts/src, API paths…
git:20261121.9f89a22 · audit A · 508 stars
enterprise-miniapp SKILL.md skill
liujh0729-jpg/ai-enterprise-oem · .agents/skills/enterprise-miniapp/SKILL.md · Add or extend a mini-program / terminal in this repository. Use when the task touches shared/mini-core, miniprogram-*…
git:20261121.9f89a22 · audit A · 508 stars
enterprise-review SKILL.md skill
liujh0729-jpg/ai-enterprise-oem · .agents/skills/enterprise-review/SKILL.md · Run the pre-commit self-review for this repository. Use before committing or when reviewing a change: check token…
git:20261121.9f89a22 · audit A · 508 stars
ub-mode SKILL.md skill
liujh0729-jpg/ai-enterprise-oem · .agents/skills/ub-mode/SKILL.md · Follow the reduced principles when writing or changing code. Every change follows First Make it Work, then Then Make it…
git:20261121.9f89a22 · audit A · 508 stars
enterprise-miniapp SKILL.md skill
liujh0729-jpg/ai-enterprise-oem · .claude/skills/enterprise-miniapp/SKILL.md · Add or extend a mini-program / terminal in this repository. Use when the task touches shared/mini-core, miniprogram-*…
git:20261121.9f89a22 · audit A · 508 stars
enterprise-review SKILL.md skill
liujh0729-jpg/ai-enterprise-oem · .claude/skills/enterprise-review/SKILL.md · Run the pre-commit self-review for this repository. Use before committing or when reviewing a change: check token…
git:20261121.9f89a22 · audit A · 508 stars
ub-mode SKILL.md skill
liujh0729-jpg/ai-enterprise-oem · .claude/skills/ub-mode/SKILL.md · Follow the reduced principles when writing or changing code. Every change follows First Make it Work, then Then Make it…
git:20261121.9f89a22 · audit A · 508 stars
enterprise Cursor rule
liujh0729-jpg/ai-enterprise-oem · .cursor/rules/enterprise.mdc · aiworkin-enterprise 项目规则入口
git:20261121.9f89a22 · audit A · 508 stars
copilot-instructions.md
liujh0729-jpg/ai-enterprise-oem · .github/copilot-instructions.md
git:20261121.9f89a22 · audit A · 508 stars
AGENTS.md AGENTS.md file
liujh0729-jpg/ai-enterprise-oem · AGENTS.md
git:20261121.9f89a22 · audit A · 508 stars
CLAUDE.md CLAUDE.md file
liujh0729-jpg/ai-enterprise-oem · CLAUDE.md
git:20261121.9f89a22 · audit B · 508 stars
audit SKILL.md skill
liujh0729-jpg/ai-enterprise-oem · awbot-app/.agents/skills/audit/SKILL.md · Audit the ccch1mneyyy/dsh-Go repository or a broad subsystem for security, correctness, and maintainability risks. Use…
git:20261121.9f89a22 · audit A · 508 stars

Every file in liujh0729-jpg/ai-enterprise-oem

Other files named enterprise-contract

enterprise-contract SKILL.md skill
liujh0729-jpg/ai-enterprise-oem · .agents/skills/enterprise-contract/SKILL.md · Add or change an HTTP endpoint in this repository. Use when the task touches packages/contracts/src, API paths…
git:20261121.9f89a22 · audit A · 508 stars

Browse by kind, by grade A, or by owner.