report-builder
Skill13 starsChanged 33 days agoMITView on GitHub
Tạo, cấu hình, cập nhật và kiểm chứng Report Type cùng saved report Cogover qua Public Report API `/bapi/v1/report` (hoặc `/api/v1/report` bằng phiên Web App): báo cáo 1–5 object, chọn relation và kiểu join, report field/section, cột hiển thị, group, aggregate, filter, sort, formula, preview và xác minh dữ liệu; chẩn đoán báo cáo không trả đúng dữ liệu. Phối hợp $object-info.
- Reads credentials
7 other projects use a version of this.
Adopted by
Most recently taken up by
- databricks-industry-solutions/hls-skillstheir own version, first seen Nov 1, 2026
- Big-LAORE/Biblioth-que-de-skillstheir own version, first seen Nov 1, 2026
- anthropics/knowledge-work-pluginstheir own version, first seen Oct 13, 2026
- GarphenGate/moltline-osstheir own version, first seen Sep 19, 2026
- kevin-burns/claude-skillstheir own version, first seen Aug 13, 2026
- magiskboy/agent-skillstheir own version, first seen Jun 15, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- anthropics/knowledge-work-plugins★ 35ksame name
- kevin-burns/claude-skills★ 10same name
- databricks-industry-solutions/hls-skills★ 6same name
- Big-LAORE/Biblioth-que-de-skills★ 1same name
- Pascal-Neubauer/Claude_Skills★ 1same name
- GarphenGate/moltline-oss★ 0same name
- magiskboy/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
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-formSkill
- object-history-trackingSkill
- object-infoSkill
- object-layoutSkill
- object-path-componentSkill
- object-recordSkill
- object-transition-ruleSkill
- process-creatorSkill
- record-emailSkill
- user-permissionSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
Create response không có ID ở path rõ ràng: không đoán path.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Report Builder
- Phiên bản:
1.2.1 - Ngày phát hành:
2026-10-06
Tạo và kiểm chứng báo cáo Cogover qua Public Report API: mọi service gọi POST https://{WORKSPACE_DOMAIN}/bapi/v1/report (API Key Bearer) với envelope { "service": <number>, "payload": <object> }. Trang hoặc Custom Frontend Module chạy trong Workspace gọi cùng service bằng phiên của người dùng đang đăng nhập qua /api/v1/report (x-req-type: 9) theo Gọi bằng phiên Web App. Chuỗi phụ thuộc: phân tích nghiệp vụ → khám phá object → Report Type → relation/section/field → saved report → preview và xác minh. Skill dừng ở saved report đã chạy đúng; dashboard thuộc $dashboard-builder và chỉ làm khi người dùng yêu cầu.
Chuẩn bị
- Credential, header và quy ước response/lỗi chung: theo $cogover-api-auth. Riêng skill này: xác nhận workspace bằng một probe chỉ đọc (ví dụ service
215) và đối chiếuworkspaceDomaintrong response nếu có; dừng khi domain/token không khớp hoặc response không chứng minh được workspace mục tiêu. Không gửiworkspace_id, personnel ID hay thông tin xác thực trongpayload: token đã xác định workspace và người dùng. - Đọc references/api-contract.md trước khi gọi Report API; references/report-modeling.md trước khi chọn primary object, relation, join hoặc dựng graph
meta_data; references/report-settings.md trước khi dựng/cập nhậtsetting, filter, group, aggregate, formula hoặc gọi service200. - Endpoint, envelope, payload và ràng buộc: chỉ theo Public Report API contract, không suy từ ví dụ. ID và resource backend tự sinh: theo response thực tế của workspace mục tiêu. Tài liệu và response mâu thuẫn: dừng mutation, nêu rõ phạm vi mâu thuẫn, không tự trộn hai contract.
- Object, field, option và related list thực tế: lấy qua
$object-info(includeFields,includeRelatedLists,includeOptions,includeMetaData); không dùng ID mẫu trong tài liệu. - Kiểm tra trùng trước mọi create. Không tự xóa để rollback: lỗi giữa chừng thì giữ nguyên resource đã tạo và báo ID/trạng thái để người dùng quyết định; delete chỉ khi người dùng nêu rõ resource ID và đã xác nhận phạm vi ảnh hưởng.
Quy trình
1. Chuẩn hóa yêu cầu
Chuyển yêu cầu thành report contract ngắn: câu hỏi nghiệp vụ và đơn vị đo; population/mẫu số và event/tử số nếu là tỷ lệ; grain (một row đại diện record nào); dimension group theo hàng, theo cột và kỳ thời gian; metric cùng phép aggregate; cột chi tiết, filter, sort, top-N và detail row; dạng output (detail list, summary, pivot hay tỷ lệ); quyền xem/sửa và thư mục đích nếu người dùng nêu; tiêu chí nghiệm thu bằng một hoặc hai kết quả mong đợi.
- Saved report làm nguồn cho chart cột, đường hoặc tròn của dashboard: tối đa 1 group hàng theo Lỗi hiển thị đã gặp; cần bản 2 cấp để xem dạng bảng thì tạo saved report riêng trên cùng Report Type.
- Report đặt vào App menu hoặc dashboard cho người dùng nghiệp vụ: ghi role, phòng ban hoặc nhân sự được xem vào report contract.
Nêu giả định có thể đảo ngược. Hỏi lại trước mutation khi join, population, công thức tỷ lệ hoặc quyền chia sẻ còn mơ hồ và có thể làm sai kết quả.
2. Khám phá object và thiết kế graph
Theo references/report-modeling.md:
primary_objectlà object chứa population gốc. Primary object đã đủ field cần thiết thì dùng Report Type 1 object; nếu không, chọn số object ít nhất đủ trả lời yêu cầu, không thêm object chỉ vì có relation. Tối đa 5 object nối bằng tối đa 4 relation; graph liên thông từ primary object, không lặp relation. Quan hệ bổ sung có thể tăng chi phí truy vấn: đo bằng preview với dữ liệu và bộ lọc đại diện, không giả định một tỷ lệ chậm cố định.- Xác minh
object_relation_id, chiềusrc_object_id → dst_object_idvà field nối bằng service223hoặc metadata quan hệ chính thức; không biến ID related-list thành ID relation bằng phỏng đoán. - Với từng cạnh, xác định object cha trên graph rồi gán
lookup_typevàsource_nametheo Hướng lookup trong graph UI. Thiếu hai key này, UI có thể đảo "Tra cứu từ" thành "Tra cứu tới" dù service221vẫn trả relation đúng. - Chọn
relation_type:1Inner khi chỉ cần bản ghi khớp,2Left khi phải giữ toàn bộ population bên trái. Kiểm tra cardinality trước khi tính count/tỷ lệ: API chỉ hỗ trợcount, không có distinct count, nên không tuyên bố tỷ lệ conversion chính xác khi quan hệ one-to-many làm trùng mẫu số. - Lập danh sách field tối thiểu cho group, aggregate, filter, sort, công thức và cột hiển thị.
3. Tìm và tái sử dụng Report Type
Dùng service 215 tìm Report Type cùng mục đích. Chỉ tái sử dụng khi cùng primary object, relation graph, field cần thiết và trạng thái phù hợp, xác minh bằng 215 (detail), 221 (relation), 211 (section), 222 (report field). Không tương thích thì tạo Report Type mới thay vì làm hỏng báo cáo đang dùng chung.
4. Tạo Report Type
Theo thứ tự, ghi lại ID sau mỗi bước:
212tạo Report Type: slug ổn định,category: "OTHER", trạng thái có chủ đích (0draft,1development,2deployed). Public API không nhậnmeta_dataở bước này.202khởi tạo Report Config, gọi đúng một lần kể cả khi không có relation. Một object:relations: [],src_object_idlà primary object, root graph trongmeta_data. Nhiều object: toàn bộrelationscùng graph node/edge đầy đủ; không gửisrc_object_idchỉ để thay relation. Không dùngmeta_data: "{}": root graph tối thiểu cónodeRoot,edges: []và viewport; graph nhiều object theo Payload nhiều object.- Đọc
211và đủ các trang của222(mặc định 50 dòng; gửisizehoặc lặppagetừ1). Sau202, backend đã tạo một section cho mỗi object trong graph và report field cho mọi field của các object đó, gồm field hệ thốngworkspace_id,object_type: tái sử dụng chúng, không gọi227tái tạo, mặc định loại field hệ thống khỏi display, group, filter và aggregate. Chỉ gọi208khi thật sự cần thêm section, vớisection_index: 1000và để backend quyết định index persisted. 227chỉ cho field nghiệp vụ chưa có trong222(ví dụ field đã xoá bằng228); field đã có trảr: -1already exists. Giữ thứ tựindex_in_section; chỉ lấy object field active.field_namelà displaynamemà object API trả về (translation metadata chỉ làm fallback; không tự dịch hoặc đổi nhãn).field_type: 0cho field trực tiếp, vớiobject_type_idcủa object sở hữu field và slug trực tiếp;field_type: 1chỉ với dotted lookup path được object metadata hoặc Public Report API xác nhận.field_data_typetrong response không thay thế discriminatorfield_type. Ghi mapping{object_id, object_field_slug} → report_field_idtừ response227/222.- Đọc lại
215,221,211,222: xác minh root metadata, relation, default section, field hệ thống và mapping field nghiệp vụ. Với mỗi edge kiểm tralookup_type,source_name, parent/child object và biểu thức UI tương đươngsource.field = destination.id; không chỉ dựa vào221. Chỉ sang saved report khi mọi field nghiệp vụ có ID report field thực (FRP...hoặc prefix thực tế của response).
Create response không có ID ở path rõ ràng: không đoán path; resolve bằng slug/name ổn định qua API list/detail.
5. Dựng setting cho saved report
Ánh xạ object field sang report field ID vừa tạo, dựng setting đầy đủ theo references/report-settings.md và rà Checklist. Operator/params của filter, key sort hoặc formula chưa được contract hay response thực tế xác nhận: dừng trước mutation và nêu chính xác phần contract còn thiếu, không tự sáng tác shape.
6. Tạo và hoàn thiện saved report
- Kiểm tra slug bằng service
239:data.exists: falselà slug còn trống;msg: "Failed"đi kèmr: 0không phải lỗi. 201vớireport_type,name, slug/description và basesettingđầy đủ. Chỉ truyền ACL/folder khi đã xác định chính xác.- Resolve saved report bằng ID trả về hoặc
229theo slug. - Khi cần cập nhật group/aggregate/filter/view: đọc detail hiện tại, merge cấu hình cuối vào toàn bộ
settinghiện có (giữ cả key chưa biết, không dựng lại từ base template) rồi gọi207.aclvàfolder_idcó semantics thay thế: gửi lại giá trị hiện tại nếu muốn giữ nguyên, ACL chuyển về write shape tương đương về semantics; không sao chépcreated,updated,created_by,updated_by, ACL ID hay field server-managed từ response/payload mẫu vào update. Chia sẻ cho người xem theo report contract cũng theo quy trình này: thêm phần tửacl(ví dụtype: "role",option: 2,functions: ["VIEW"]) vào ACL hiện có rồi gửi lại đủsetting,folder_id,acl. - Gọi lại
229và đối chiếu từng phần củasettingvới report contract.
7. Chạy và xác minh dữ liệu
Gọi service 200 với report_id là Report Type ID (saved report chỉ cung cấp setting và tham chiếu report_type); payload chuyển đổi theo Chuyển setting thành service 200. Kiểm tra: rows/summary đúng với kiểu báo cáo, kể cả khi kết quả hợp lệ là rỗng; group, aggregate, sort, filter và total khớp contract; không còn warning hoặc mã cấu hình không hợp lệ chưa xử lý; kết quả thỏa ví dụ nghiệm thu, với tỷ lệ thì kiểm tra numerator/denominator riêng trước khi tính phần trăm.
8. Trả kết quả
Ngắn gọn nhưng đủ audit: workspace domain (không kèm token); Report Type (ID, tên, slug, primary object, relation, join); section và mapping object field → report field ID; saved report (ID, tên, slug, folder/ACL ở mức mô tả); cấu hình display, group, aggregate, filter, sort, formula, detail row; kết quả preview và warning còn lại; resource đã tạo dở nếu có lỗi. Khi resource đã tạo và xác minh, bắt buộc kèm hai link bấm được, dùng Report Type ID và report slug thực tế (không dùng URL trang danh sách hay giá trị phỏng đoán) và ghép từ hostname đã chuẩn hóa để không sinh https://https://...:
- Report Type:
https://{WORKSPACE_DOMAIN}/settings/report-types/{REPORT_TYPE_ID} - Saved report:
https://{WORKSPACE_DOMAIN}/settings/reports/{REPORT_SLUG}
Báo ACL người xem của saved report. Quyền xem của persona chỉ xác nhận bằng phiên của chính persona theo Gọi bằng phiên Web App; chưa chạy thì ghi "chưa kiểm chứng quyền xem persona".
Dùng công cụ API đi kèm
scripts/report_api.py dựng envelope, validate payload (key bắt buộc theo service; relation_type, lookup_type, filter_type, size, số relation/group; graph meta_data: mỗi edge khớp đúng một relation, source_name khớp alias node cha, lookup_type khớp hướng parent/child) rồi gọi API với output đã redact token.
- Tham số:
--service <số>;--payload '<JSON>'hoặc--payload-file <path|->(-đọc stdin);--workspace-domain(mặc định lấyCOGOVER_BASE_URL, rồiCOGOVER_WORKSPACE_DOMAIN; chỉ nhậnhttps://<host>, không path/query);--timeoutgiây (mặc định 60);--executeđể gửi thật, mặc định chỉ dry-run inendpoint,request,warnings;--applybắt buộc thêm với mọi service ngoài nhóm đọc (gồm200,211,215,220,221,222,223,229,230,239,246).COGOVER_API_KEYđọc từ môi trường khi--execute; đặt qua secret store hoặc phiên shell riêng, không paste vào command/log. - Exit code:
0thành công;2payload/cấu hình không hợp lệ;3HTTP lỗi hoặcr != 0;4lỗi mạng. - Warning dry-run phải xử lý trước khi gửi:
212cómeta_data;207thiếufolder_id/acl;202/231có relation nhưng thiếumeta_data;200filter_type: 3thiếulogic_sequence. --applykhông thay thế kiểm tra precondition. Luôn đọc response thô và xác minh postcondition bằng service đọc.
export COGOVER_BASE_URL='https://workspace.example.com'
python3 scripts/report_api.py --service 215 --payload '{"page":0,"size":20}' --execute
python3 scripts/report_api.py --service 212 --payload-file /path/to/report-type.json --execute --applyXử lý lỗi và retry
Ngoài quy ước chung của $cogover-api-auth:
429: chờ theoRetry-After; không đổi payload, không gửi song song, không tạo vòng retry nhanh.- Timeout/network khi đọc: retry tối đa một lần. Timeout khi ghi (
201,202,207,208,212,227...): không retry ngay; tìm resource bằng slug/name/ID và kiểm tra relation/field trước khi gọi lại. r != 0: đọcmsg, giữ nguyên resource đã tạo, sửa đúng payload rồi mới tiếp tục.- Response shape lạ: lưu output đã redacted; không tự chọn một ID "có vẻ đúng".
- Service
200chạy bất đồng bộ: không cósetting: truethì trảr: 32(Wait for response) kèmdata.idvà kết quả không nằm trong response, không phải lỗi cấu hình; gửisetting: truekhi cần đọc kết quả ngay. Cácr != 0khác đọcmsgvà chỉ theo cơ chế hoàn tất mà response hoặc contract hiện tại chứng minh.
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.

