Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/TencentBlueKing/bk-bcs --skill iam명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| id | eng-permission-auth |
| name | 前端权限控制方案 (IAM) |
| category | engineering |
| description | 基于蓝鲸 IAM 的前端鉴权方案,包含 v-authority 指令实现、权限组件封装及无权限交互规范。 |
| tags | ["iam","permission","authority","directive","vue3"] |
| updated_at | 2026-01-09T00:00:00.000Z |
在蓝鲸体系中,权限控制不仅仅是“显示/隐藏”,更重要的是**“发现与申请”。我们推荐使用“置灰 + 提示申请”**的交互模式。
v-authority这个指令会自动处理点击拦截、样式置灰和申请弹窗的唤起。
使用方式:
<bk-button v-authority="{ permission: hasAuth, actionId: 'host_edit' }">
编辑
</bk-button>
指令功能:
📦 获取完整指令实现:
skill://permission-directive/assets/authority-directive.ts
AuthButton对于需要更多自定义的场景,可封装鉴权按钮组件。
在 vue-router 的 beforeEach 中处理页面级权限。
router.beforeEach(async (to, from, next) => {
const meta = to.meta as any;
if (meta.auth) {
const hasAuth = await checkPageAuth(meta.authAction);
if (!hasAuth) {
next({ name: '403', query: { action: meta.authAction } });
return;
}
}
next();
});
skill://permission-directive/assets/authority-directive.ts根据 SKILL.md 中的 IF-THEN 规则判断是否需要加载