Skip to content
Back to skills

Export Menu Page Permission

ASecurity

Xuất cấu trúc menu & page permission của portal ra file JSON chuẩn. Tự quét source lấy PAGE_FEATURES, báo thiếu và khai báo bổ sung.

  • 30 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 8, 2026
ai-agentsbashnode

Security analysis

A100/100

Scanned November 8, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill export-menu-page-permission --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Export Menu Page Permission?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Export Menu Page Permission
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-export-menu-page-permission/badge)](https://www.skillsdirectory.com/skills/majiayu000-export-menu-page-permission)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: export-menu-page-permission
description: 'Xuất cấu trúc menu & page permission của portal ra file JSON chuẩn. Tự quét source lấy PAGE_FEATURES, báo thiếu và khai báo bổ sung.'
---

# Export Menu & Page Permission

> ⚠️ Skill này **chỉ hướng dẫn cách chạy script** — không tự chạy.
> Toàn bộ nguyên tắc cấu trúc portal, menuCode và PAGE_FEATURES nằm trong file quy tắc:
> `rule-tao-json-menu-phan-quyen/export-cau-truc-phan-quyen.rule.md` (Agent phải đọc trước khi khai báo).

## Cách chạy script

```bash
# Chạy trực tiếp (interactive): chọn portal → Bước 1 kiểm tra cấu trúc → Bước 2 export
node .claude/skills/export-menu-page-permission/scripts/export-menu-page-permission.cjs

# Export 1 portal cụ thể (bỏ qua interactive)
node .claude/skills/export-menu-page-permission/scripts/export-menu-page-permission.cjs --portal invoice

# Export tất cả portal
node .claude/skills/export-menu-page-permission/scripts/export-menu-page-permission.cjs --all

# Sync permission mapping (tự động cập nhật PermissionMapping.{Portal}.ts)
node .claude/skills/export-menu-page-permission/scripts/export-menu-page-permission.cjs --portal invoice --sync-mapping
node .claude/skills/export-menu-page-permission/scripts/export-menu-page-permission.cjs --all --sync-mapping

# Liệt kê danh sách portal
node .claude/skills/export-menu-page-permission/scripts/export-menu-page-permission.cjs --list
```

Output: `.claude/skills/export-menu-page-permission/export-json/{shortName}_export_{ddMMyyyy}.json`

## Luồng khi chạy trực tiếp (interactive)

```
1. Hiển thị danh sách portal (1..N) → người dùng chọn portal
2. BƯỚC 1 — Kiểm tra điều kiện cấu trúc portal (file TopMenu/NavMenu, PAGE_ID + PAGE_FEATURES)
   ├── PASS → chuyển BƯỚC 2
   └── FAIL → DỪNG, báo Agent kiểm tra + khai báo lại đúng cấu trúc
3. BƯỚC 2 — Export JSON vào export-json/
```

## Khi nào Agent phải can thiệp

- Script báo "CHƯA có PAGE_FEATURES" → Agent đọc từng file page `.tsx` còn thiếu → khai báo `PAGE_ID` + `PAGE_FEATURES`.
- Portal còn trang nào chưa khai báo features → Agent phải báo cáo và tự khai báo lại đầy đủ, rồi chạy lại script.
- Sau khi khai báo xong → chạy `check-master-page.cjs` để kiểm tra tính đúng đắn.

## Tham chiếu

- Quy tắc chi tiết: `rule-tao-json-menu-phan-quyen/export-cau-truc-phan-quyen.rule.md`
- Kiểm tra PAGE_FEATURES: `.claude/skills/tao-ui-master-page/check-master-page.cjs`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.