manage-roles
Skill2 starsChanged 7 months agoApache-2.0Archived repositoryView on GitHub
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.
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 167
Verify role permissions match the principle of least privilege.
- Very specific: line 175
Check the role has the required permissions (harness_get on the role)
- Distinctive: line 176
Verify the resource group scope includes the target resources
- Very specific: line 177
Check that the assignment is not disabled: true
- Very specific: line 181
Verify all required permissions are included (e.g., _view permission is needed alongside _edit)
- Very specific: line 182
Check the role is assigned at the correct scope (account/org/project)
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 projectCheck who has admin access
/manage-roles
List all role assignments with admin privileges in the default orgCreate 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 anythingAudit 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 includeBest 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
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- harness/harness-skills★ 12799% same
Wrote their own version · 0
None found.
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 repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/harness.mdcCursor rule
- analyze-costsSkill
- audit-reportSkill
- chaos-experimentSkill
- create-agentSkill
- create-agent-templateSkill
- create-connectorSkill
- create-environmentSkill
- create-infrastructureSkill
- create-pipelineSkill
- create-pipeline-v1Skill
- create-policySkill
- create-secretSkill
- create-serviceSkill
- create-templateSkill
- create-triggerSkill
- debug-pipelineSkill
- dora-metricsSkill
- gitops-statusSkill
- manage-delegatesSkill
- manage-feature-flagsSkill
- manage-usersSkill
- migrate-pipelineSkill
- run-pipelineSkill
- scorecard-reviewSkill
- security-reportSkill
- template-usageSkill
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.

