skills/Parser-AI-Context/SKILL.md
# SKILL: drawio-xml-parser ## Purpose (Mục đích) Phân tích file `.drawio` hoặc xml của sinh viên và đáp án, biến chúng từ dạng nén/mã hoá (hoặc raw) về dạng chuỗi `RawXMLData` (thuần text XML) một cách chính xác. ## Use When (Khi nào dùng skill này) - Vừa mới bắt đầu pipeline so sánh UML. - Cần lập trình module con `IFileParser` bằng Golang. - Cần cung cấp dữ liệu sạch đầu vào (XML thô) cho cụm `IModelBuilder`. ## Required Inputs - Đường dẫn file vật lý trên ổ cứng (`filePath` kiểu String).
npx skillsauth add nguyen-agn/uml_comparator skills/Parser-AI-ContextInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Phân tích file .drawio hoặc xml của sinh viên và đáp án, biến chúng từ dạng nén/mã hoá (hoặc raw) về dạng chuỗi RawXMLData (thuần text XML) một cách chính xác.
IFileParser bằng Golang.IModelBuilder.filePath kiểu String).domain.RawXMLData chứa cấu trúc XML chuẩn của thẻ <mxGraphModel>.error (nếu hỏng file, sai định dạng).<diagram>jZLB...</diagram> hay XML thường <mxGraphModel>....Base64 Decode -> Decompress (Flate/Zlib) -> URL Decode -> Thu được cấu trúc chuẩn.encoding/base64, compress/flate, net/url).Cần khai thác các tệp sau trong cùng thư mục để thực hiện chuẩn:
knowledge.md: Đặc tả 2 dạng cấu trúc file Draw.io.template.md: Khung code mẫu bắt buộc để lắp ráp.check.md: Tiêu chí nghiệm thu nội bộ.recorrect.md: Nhật ký lỗi sẽ ghi vào khi có exception.development
# SKILL: drawio-visualizer ## Purpose Render kết quả chấm UML ra 2 loại file HTML self-contained: 1. **Grader Report** (`report_*.html`): Full side-by-side Student vs Solution, summary, deduction feedbacks — dành cho người chấm. 2. **Student Feedback** (`feedback_*.html`): Chỉ hiển thị bài làm SV với color-coded status (đúng/sai/thừa). Không lộ đáp án, không hiện deduction details — gửi cho sinh viên xem lại. ## Execution 1. Pipeline: Parse → Build → Validate → PreMatch → Match → Compare → Grad
development
Chạy test case trên các file UML draw.io để kiểm tra xem Builder + ValidateGraph có phát hiện đúng lỗi. Dùng để verify rằng pipeline xử lý UML bắt được các loại lỗi sai trong file .drawio.
development
# SKILL: batch-grader-reporter ## Purpose Cung cấp chức năng chấm điểm đồng loạt (Batch Grading) cho nhiều file bài làm UML (`.drawio`) của sinh viên đối chiếu với 1 file đáp án mẫu. Kết quả của tất cả các bài nộp được tổng hợp lại thành `BatchGradeResult` và chuyển đền interface `IReporter` để sinh report. ## Execution 1. Cấu trúc: - Load file solution `solution.drawio`. - Quét thư mục `student_dir` tìm các file `.drawio`. - Với mỗi file: Parse → Build → PreMatch → Match → Compare →
development
Skill để tái cấu trúc (refactor) một module bất kỳ theo chuẩn SOLID, áp dụng Interface-first và bổ sung Unit Test hoàn chỉnh.