manage-roles
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "manage-roles":https://skillpi.com/zh/skills/deepskill-71c760cd1891fb8eec7a71077926fd4148161b17a1d6d976f892a465dda4de8d。安装前核对上游来源和版本:https://github.com/harness/harness-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
通过 MCP v2 工具管理 Harness RBAC:角色、自定义角色的创建/列出/更新/删除、角色分配、权限和资源组。可查看用户、用户组和服务账户的角色分配及其权限,适用于访问控制、分配或撤销角色、检查权限和审计场景。
介绍来源: third_party · harness · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 来源文档未说明。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 翻译待完成,请参阅来源文档。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: manage-roles
description: >-
Manage Harness RBAC roles, role assignments, permissions, and resource groups via MCP v2 tools.
List, create, update, and delete custom roles. View role assignments and permissions for users,
groups, and service accounts. Use when asked to manage access control, assign roles, check
permissions, create custom roles, review RBAC configuration, onboard users, or audit access.
Trigger phrases: manage roles, RBAC, role assignment, user permissions, access control, custom role,
resource group, who has access, grant access, revoke access.
metadata:
author: Harness
version: 1.0.0
mcp-server: harness-mcp-v2
license: Apache-2.0
compatibility: Requires Harness MCP v2 server (harness-mcp-v2)Manage Roles Skill
Manage Harness RBAC (Role-Based Access Control) via MCP v2 tools.
MCP v2 Tools Used
| Tool | Resource Type | Operations |
|---|---|---|
harness_list |
role |
List all roles |
harness_get |
role |
Get role details |
harness_create |
role |
Create custom role |
harness_update |
role |
Update custom role |
harness_delete |
role |
Delete custom role |
harness_list |
role_assignment |
List role assignments |
harness_get |
role_assignment |
Get assignment details |
harness_list |
permission |
List available permissions |
harness_get |
permission |
Get permission details |
harness_list |
resource_group |
List resource groups |
harness_get |
resource_group |
Get resource group details |
harness_describe |
role |
Discover role schema |
harness_search |
-- | Search across role-related resources |
For built-in roles (account/org/project/module), resource groups, common permissions, and role assignment structure, consult references/builtin-roles.md.
Instructions
Step 1: Understand Requirements
Determine:
- Who needs access (user email, group ID, or service account ID)
- What level of access (admin, developer, viewer, executor, custom)
- Where (account, org, project scope)
- Which resources (all or specific resource group)
Step 2: List Existing Roles
harness_list(
resource_type="role",
org_id="<org>", # optional
project_id="<project>", # optional
search_term="<keyword>" # optional
)
Step 3: Check Current Assignments
harness_list(
resource_type="role_assignment",
org_id="<org>",
project_id="<project>"
)
Step 4: List Available Permissions (for custom roles)
harness_list(resource_type="permission")
Step 5: Create Custom Role (if needed)
harness_create(
resource_type="role",
org_id="<org>",
project_id="<project>",
body={
"identifier": "custom_deployer",
"name": "Custom Deployer",
"description": "Can execute pipelines and view services",
"permissions": [
"core_pipeline_execute",
"core_pipeline_view",
"core_service_view",
"core_environment_view"
]
}
)
Identifier must match pattern: ^[a-zA-Z_][0-9a-zA-Z_]{0,127}$
Step 6: View Resource Groups
harness_list(resource_type="resource_group", org_id="<org>", project_id="<project>")
Examples
List all roles in a project
/manage-roles
Show me all roles available in the payments project
Check who has admin access
/manage-roles
List all role assignments with admin privileges in the default org
Create a custom read-only deployer role
/manage-roles
Create a custom role called "release-manager" that can execute pipelines,
view services and environments, but cannot edit anything
Audit access for a user
/manage-roles
What roles does jane.smith@company.com have across all projects?
Review resource groups
/manage-roles
Show me all resource groups and what they include
Best Practices
- Prefer groups over individual users -- assign roles to USER_GROUP for easier management
- Follow least privilege -- start with viewer roles and add permissions as needed
- Scope narrowly -- use project-level roles over account-level when possible
- Use built-in roles first -- create custom roles only when built-in roles do not fit
- Naming convention:
{role}_{principal}for identifiers (e.g.,deployer_ops_team)
Error Handling
| Error | Cause | Solution |
|---|---|---|
| Role not found | Invalid role identifier | Built-in roles start with _ -- verify exact identifier |
| Resource group not found | Invalid resource group | Check harness_list(resource_type="resource_group") |
| Principal not found | User/group/SA does not exist | Verify the principal exists before assigning |
| Duplicate identifier | Role with same ID exists | Use a unique identifier or update the existing role |
| Permission denied | Caller lacks RBAC management permissions | Need core_role_view / core_role_edit permissions |
Performance Notes
- List existing roles and resource groups before creating new ones to avoid duplication.
- Verify role permissions match the principle of least privilege.
- Confirm user/group identifiers are correct before assigning roles — incorrect assignments may grant unintended access.
Troubleshooting
User Cannot Access Resources
- List role assignments for the user to confirm a role is assigned
- Check the role has the required permissions (
harness_geton the role) - Verify the resource group scope includes the target resources
- Check that the assignment is not
disabled: true
Custom Role Not Working
- Verify all required permissions are included (e.g.,
_viewpermission is needed alongside_edit) - Check the role is assigned at the correct scope (account/org/project)
- Confirm the resource group matches the resources the user needs
Permission Denied When Managing Roles
- The caller needs
core_role_editto create/update roles - The caller needs
core_roleassignment_editto manage assignments - Account-level operations require account admin or equivalent
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供完整的 Harness RBAC 管理闭环能力,涵盖角色、权限、资源组的增删改查与审计
- 适用于企业高频刚需场景如用户入职、权限分配、安全合规审计
亮点
- 触发词覆盖全面且边界清晰,包含 manage roles、RBAC、role assignment、user permissions、access control、custom role、resource group、who has access、grant access、revoke access
待提升项
-
缺少显式 When to Use 章节 原报告严重程度:轻微
文档结构完整但缺少显式命名的 "When to Use" 章节标题
改进建议:建议在 Instructions 前添加显式 "When to Use" 章节以增强可读性
亮点
- Phase/步骤划分清晰(Step 1-6),含端到端示例和最佳实践
- frontmatter 完整,单文件长度适中
亮点
- 工具来源明确(Harness MCP v2),参数使用正确
- 覆盖主要异常场景并提供具体解决方案,包含 Troubleshooting 指南
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
翻译待完成,请参阅来源文档。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。