huawei-cloud-iam-diagnose

huawei-cloud-iam-diagnose is a skill for Claude Code, Codex from huaweicloud/huaweicloud-skills. It costs 266 tokens per session (2,910 once invoked), scanned A, original, MIT.

A Huawei Cloud Identity and Access Management (IAM) permission checker. It follows a user's direct policies, group membership, and delegated access to estimate whether an action on a resource is allowed.

In plain words
What is it for?
Use it to check a user's likely access to actions and resources, inspect inherited permissions, and review the policies and authorization details involved.
Why use it?
It helps investigate access problems without manually tracing several layers of cloud permissions. The result is an analysis, not a guaranteed user-level permission simulation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to check a user's likely access to actions and resources, inspect inherited permissions, and review the policies and authorization details involved.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/huaweicloud/huaweicloud-skills/huawei-cloud-iam-diagnose
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-iam-diagnose
Clone the repo
git clone --depth 1 https://github.com/huaweicloud/huaweicloud-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for huawei-cloud-iam-diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/huaweicloud/huaweicloud-skills/huawei-cloud-iam-diagnose/github.svg)](https://agentmods.dev/skills/huaweicloud/huaweicloud-skills/huawei-cloud-iam-diagnose)
Your own site
<a href="https://agentmods.dev/skills/huaweicloud/huaweicloud-skills/huawei-cloud-iam-diagnose"><img src="https://agentmods.dev/badge/skills/huaweicloud/huaweicloud-skills/huawei-cloud-iam-diagnose/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for huawei-cloud-iam-diagnose

Your own site · 80×15
<a href="https://agentmods.dev/skills/huaweicloud/huaweicloud-skills/huawei-cloud-iam-diagnose"><img src="https://agentmods.dev/badge/skills/huaweicloud/huaweicloud-skills/huawei-cloud-iam-diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 266 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,910 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00266 $0.02910
Opus 5.5 $0.00106 $0.01164
Sonnet 5.5 $0.00053 $0.00582
Haiku 4.5 $0.00027 $0.00291

Measured 20d ago against content hash f8f80498a42a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

huawei-cloud-iam-diagnose scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.

The scan reads SKILL.md. This mod also ships 15 executable files (scripts/check_agency_permission.py, scripts/check_env.ps1, scripts/check_env.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/security/iam/huawei-cloud-iam-diagnose/SKILL.md · 254 lines

How it starts

The opening of the file, as written. The whole thing — 254 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Huawei Cloud IAM Reference Permission Analysis (IAM 参考性权限分析)

Overview

This skill performs reference permission analysis for Huawei Cloud IAM. It answers questions like "does user <u> have permission to do <action> on resource <r>?" by expanding the user's permission chains and statically evaluating policy documents.

Honest Capability Boundary (read first)

Capability Status Notes
User-level permission simulation (AWS IAM Policy Simulator equivalent) ❌ Not available Neither the IAM CLI nor the SDK provide a SimulatePrincipal API
Group-level check ✅ keystone_check_project_permission_for_group, keystone_check_domain_permission_for_group, keystone_checkrole_for_group
Agency-level check ✅ check_project_permission_for_agency, check_domain_permission_for_agency, check_all_projects_permission_for_agency
Check whether a user is in a group ✅ keystone_check_user_in_group
Policy document fetch ✅ get_policy_version_v5, keystone_show_permission, show_custom_policy
Authorization schema metadata ✅ get_authorization_schema_v5

Therefore this skill outputs a "大概率有权限/无权限" (likely has / likely has not) reference verdict — it is NOT an authoritative authentication result. When 100% certainty is required, guide the user to the IAM console, an actual API trial call, or CTS audit logs (see references/verification-method.md).

Architecture

User input: user (+ maybe target action/resource)
    ↓
1. Resolve user_id (v3 keystone by name → fallback v5 full scan)
    ↓
2. Expand permission chains
   ├─ User direct policies      (v5 ListAttachedUserPoliciesV5)
   ├─ User's groups             (v3 keystone_list_groups_for_user)
   │    ├─ group attached policies (v5 ListAttachedGroupPoliciesV5)
   │    └─ group roles: domain / all-projects (v3)
   └─ Agencies                  (v5 ListAgenciesV5 + attached policies/roles)
    ↓
3. Fetch policy documents (get_policy_version_v5 / role.policy)
    ↓
4. Evaluate Allow/Deny per policy doc + grade confidence
    ↓
5. Emit verdict + precision grade + chain trace (+ real check cross-validation)

Read the full file on GitHub · 254 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 20d ago Changed · -3 lines f8f80498a42a
  2. 29d ago First seen · 257 lines · 266 tokens per session scan A d59863c97330

Subscribe to this mod's changes

huawei-cloud-iam-diagnose is a skill published in the GitHub repository huaweicloud/huaweicloud-skills (59 stars, last pushed yesterday), licensed MIT. It adds 266 tokens to every session and 2,910 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-29.

Related

Other skills, from other repositories

auditing-gcp-iam-permissions

Auditing Google Cloud Platform IAM permissions to identify overly permissive bindings, primitive role usage, service account key proliferation, and cross-project access risks using gcloud CLI, Policy Analyzer, and IAM Recommender.

xalgorix/xalgorix · 51 tokens

performing-aws-privilege-escalation-assessment

Performing authorized privilege escalation assessments in AWS environments to identify IAM misconfigurations that allow users or roles to elevate their permissions using Pacu, CloudFox, Principal Mapper, and manual IAM policy analysis techniques.

xalgorix/xalgorix · 54 tokens

securing-aws-lambda-execution-roles

Securing AWS Lambda execution roles by implementing least-privilege IAM policies, applying permission boundaries, restricting resource-based policies, using IAM Access Analyzer to validate permissions, and enforcing role scoping through SCPs.

xalgorix/xalgorix · 53 tokens

implementing-rbac-hardening-for-kubernetes

Harden Kubernetes Role-Based Access Control by implementing least-privilege policies, auditing role bindings, eliminating cluster-admin sprawl, and integrating external identity providers.

xalgorix/xalgorix · 41 tokens

performing-cloud-native-threat-hunting-with-aws-detective

Hunt for threats in AWS environments using Detective behavior graphs, entity investigation timelines, GuardDuty finding correlation, and automated entity profiling across IAM users, EC2 instances, and IP addresses.

xalgorix/xalgorix · 51 tokens

detecting-aws-iam-privilege-escalation

Detect AWS IAM privilege escalation paths using boto3 and Cloudsplaining policy analysis to identify overly permissive policies, dangerous permission combinations, and least-privilege violations.

xalgorix/xalgorix · 45 tokens