object-form
Skill13 starsChanged 33 days agoMITView on GitHub
Quản lý Object Form/Lead Form Cogover (form công khai thu thập dữ liệu) qua Web App API `/api/v1/objects/forms`: tìm/xem, tạo, sửa, publish, nhân bản, xoá, layout `isForm`, success action, ngôn ngữ/thông báo/chặn email, URL public, URL nội bộ, mã nhúng, đọc responses. Tự gọi $object-layout tạo layout `isForm` khi thiếu; chỉ dùng API công khai.
In this repository23 other files it gives its agents.
- agent-builderSkill
- app-menu-managerSkill
- build-cogover-appSkill
- cogover-api-authSkill
- cogover-custom-moduleSkill
- cogover-iconSkill
- cogover-overviewSkill
- create-cogover-objectsSkill
- dashboard-builderSkill
- document-templateSkill
- layout-scriptingSkill
- object-buttonSkill
- object-filterSkill
- object-history-trackingSkill
- object-infoSkill
- object-layoutSkill
- object-path-componentSkill
- object-recordSkill
- object-transition-ruleSkill
- process-creatorSkill
- record-emailSkill
- report-builderSkill
- user-permissionSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 54
Create: kiểm tra name/slug qua POST /api/v1/objects/forms/{objectSlug}/check-exists, kiểm tra layout, rồi gửi payload đầy đủ theo schema …
- Very specific: line 62
Create POST .../create; update PATCH .../{id}.
- Distinctive: line 64
Create/duplicate post-check xong: thực hiện ngay bước Chia sẻ và trả cả hai link, không chờ người dùng hỏi.
- Very specific: line 80
Read timeout/network error: retry tối đa một lần.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Object Form
- Phiên bản:
1.0.2 - Ngày phát hành:
2026-09-11
Object Form có ba nhóm cấu hình tương ứng Web App: General (name, slug, description, status); Layout (layout nhập liệu, hành động sau submit, layout/URL thành công); Settings (ngôn ngữ, người nhận thông báo, chặn email).
Form không lưu danh sách field hay style riêng: objectLayoutId quyết định field, validation và style; successLayoutId quyết định trang thành công. Đổi cấu trúc field/style: dùng $object-layout rồi gắn ID layout vào form; không đưa cấu hình layout vào payload form.
Giới hạn public-safe
- Chỉ dùng tài liệu trong skill, API công khai đã mô tả, response API, thông tin người dùng cung cấp và cấu hình/metadata ngoài code đã xác minh.
- Tuyệt đối không đọc, tải, tìm kiếm, phân tích hay reverse-engineer mã nguồn ứng dụng, frontend bundle, source map, static JavaScript/CSS, HTML (để truy vết asset/code), repository, container hay filesystem máy chủ; không dùng chúng để suy ra endpoint, payload, domain hoặc hành vi backend.
- Tài liệu/API công khai không đủ: dừng ở precondition liên quan và yêu cầu người dùng cung cấp hoặc xác nhận; không soi code để lách blocker.
Chuẩn bị
- Credential, header và quy ước response/lỗi chung: theo $cogover-api-auth. Skill này chỉ dùng nhóm
/api/v1(phiên Web App), chủ yếu/api/v1/objects/forms; ngoại lệ riêng ở Retry và đối soát. SITE_DOMAIN(host link publicform.{SITE_DOMAIN}) là domain đăng ký gốc (eTLD+1) của hostname workspace, không phải toàn bộ hostname:tenant.example.com→example.com,tenant.example.co.uk→example.co.uk; không lấy máy móc hai label cuối khi public suffix có nhiều label. Hostname là IP,localhosthoặc không chắc domain gốc: yêu cầu người dùng cung cấpSITE_DOMAIN.- Đọc toàn bộ references/api-contract.md (endpoint, schema, payload mẫu, mã lỗi) trước khi dựng request.
Quy trình
1. Resolve tài nguyên thật
- Object: resolve bằng slug; đầu vào là tên hiển thị thì liệt kê/tìm Object và yêu cầu khớp duy nhất, không đoán slug.
objectLayoutId: layout của đúng Object (API layout trong contract) cóisForm: truehoặc numericisForm: 1. VớisuccessAction: 1,successLayoutIdlà layout cùng Object có khả năng View (functionLayout: 2hoặc3).- Cần kiểm tra field, content hoặc style: đọc detail layout; không đoán field nằm trong form chỉ vì field tồn tại trên Object.
notifyRelatedUsers,notifyOtherUsers: ID record Personnel thật; không thay bằng email, account ID hay tên hiển thị.
Không có layout isForm hợp lệ: bắt buộc gọi $object-layout tạo layout nhập liệu trước, rồi mới create form.
- Truyền đúng workspace,
objectTypeSlugđã resolve và yêu cầu tạo layout Web active cho Object Form:functionLayout: 1, quyềnADD,isForm: 1,contenthợp lệ. - Người dùng đã mô tả field/bố cục: chuyển nguyên yêu cầu đó; chưa mô tả: để
$object-layoutdựng layout mặc định hợp lý từ các field có thể nhập của Object. Yêu cầu tạo form là đủ quyền tạo precondition này: không hỏi lại thông tin đã có, không hỏi xác nhận bổ sung. - Không sửa hoặc dùng tạm layout hiện có
isForm: 0; luôn tạo layout mới. - Nhận ID xong, đọc lại layout bằng API trên đúng Object; chỉ dùng khi
objectTypeSlugkhớp exact,isFormlàtrue/1,functionLayout: 1vàstatus: 1. - Tạo layout hoặc post-check thất bại: dừng trước create form và báo rõ bước layout chưa hoàn tất; không create form với layout không hợp lệ.
2. Đọc trạng thái hiện tại
- List:
POST /api/v1/objects/forms/search,objectSlugbắt buộc. Có ID: luônGET /api/v1/objects/forms/{id}trước khi sửa, nhân bản hoặc xoá. - Đối chiếu cả
id,objectSlug,namevàslug; dừng khi không có kết quả hoặc có nhiều kết quả phù hợp.
3. Lập payload
- Create: kiểm tra
name/slugquaPOST /api/v1/objects/forms/{objectSlug}/check-exists, kiểm tra layout, rồi gửi payload đầy đủ theo schema cấu hình. - Update:
PATCHlà partial theo field; trường bỏ qua được giữ nguyên,nullthường cũng không xoá giá trị. Đổi nhiều nhóm: đọc detail rồi merge trên allowlist cấu hình. Không gửi trường server quản lý hayaccessControls. - Xoá chuỗi tùy chọn bằng
"", danh sách bằng[]. Đổi success action thì xoá trường nhánh cũ: action1đặtsuccessRedirectUrl: ""; action2đặtsuccessLayoutId: "". autoCreateRecord: giữ nguyên khi không được yêu cầu đổi (luồng tạo mới Web App mặc định1nhưng không có control riêng).- Không đổi
slugqua update; backend giữ slug hiện tại. Muốn slug khác: tạo hoặc nhân bản form mới với slug mới khi người dùng yêu cầu rõ.
4. Ghi và xác minh
- Create
POST .../create; updatePATCH .../{id}; nhân bảnPOST .../{id}/duplicate. Publish/unpublish làPATCH {"status":1}/{"status":0}; không có endpoint publish riêng. - Sau mutation, đọc lại detail và so sánh chính xác các trường được yêu cầu; create/duplicate lấy
idtừdata[0].idrồi đọc detail. Không dùng public layout endpoint để post-check thông thường (mỗi lần đọc tăngviewCount). - Create/duplicate post-check xong: thực hiện ngay bước Chia sẻ và trả cả hai link, không chờ người dùng hỏi.
5. Chia sẻ và truy cập nội bộ
- Link public:
code = Base64("{workspaceId}&{formId}")rồi ghéphttps://form.{SITE_DOMAIN}/{code}; chỉ dựng sau khi đọc detail cóworkspaceId,formId.status: 1mới gọi là link truy cập được;status: 0vẫn trả URL nhưng nêu rõ chưa truy cập được cho đến khi publish. Chưa chắcSITE_DOMAIN: dừng trước create/duplicate và yêu cầu người dùng cung cấp, trừ khi họ yêu cầu rõ vẫn tiếp tục mà chưa có link. - Link cấu hình nội bộ:
https://{WORKSPACE_DOMAIN}/sales/object/{objectSlug}/form/{formId}(hostname workspace, sau khi resolve exactobjectSlugvà post-check form). Không phụ thuộcstatusnhưng chỉ truy cập được khi đã đăng nhập workspace và có quyền phù hợp; không gọi đây là link public. - Embed code theo mẫu trong contract. Chia sẻ chỉ là dựng URL/HTML; không có API share riêng.
6. Xoá an toàn
- Chỉ xoá khi người dùng yêu cầu rõ. Đọc lại mọi ID, bảo đảm cùng
objectSlug, đọc số response hiện có, nêu danh sách form và ảnh hưởng truy cập sẽ xoá; không mở rộng selection. - Body gửi một chuỗi ID phân cách bằng dấu phẩy. Sau đó search/detail xác minh không còn form.
- Không xoá form responses chỉ vì xoá hoặc sửa cấu hình form; không tuyên bố response bị cascade hay được giữ lại khi API/tài liệu công khai chưa xác nhận chính sách dữ liệu của deployment.
Retry và đối soát
- Read timeout/network error: retry tối đa một lần.
429: tôn trọngRetry-After. - Sau
401/403(tạo lại phiên theo$cogover-api-auth) hoặc timeout của create/duplicate/delete/update: không lặp request ghi mù; đối soát bằng search/detail (create/duplicate: tìm theo cặp exactobjectSlug+slug/nameđể tránh tạo trùng) và chỉ retry khi chứng minh mutation chưa áp dụng. r != 0: đọcmsg, sửa đúng precondition hoặc payload; không đổi ID/layout ngẫu nhiên để thử tiếp.
Kết quả bàn giao
Trả operation, Object slug, form ID/name/slug, trạng thái trước/sau, các trường đã đổi và kết quả post-check. Sau create/duplicate luôn kèm hai link Markdown nhãn Link truy cập biểu mẫu từ bên ngoài và Link cấu hình biểu mẫu nội bộ; thao tác khác trả link public, link nội bộ hoặc embed code khi người dùng yêu cầu. Nêu rõ mọi phần chưa thực hiện do thiếu domain, quyền, ID duy nhất hoặc SITE_DOMAIN.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

