huawei-agent-rules

huawei-agent-rules is a cursor rule for Cursor from huaweicloud/huaweicloud-devkit. It costs 918 tokens per session, scanned A, original, Apache-2.0.

A set of rules for working with Huawei Cloud development tools and services. It directs the agent to use documented, auditable paths and defines precautions for cloud credentials and network access.

In plain words
What is it for?
Use it when an agent works with Huawei Cloud APIs, infrastructure, documentation, credentials, identity and access settings, or network security.
Why use it?
It reduces the risk of guessed cloud commands, exposed secrets, unsafe infrastructure changes, and unreviewed access to sensitive services.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when an agent works with Huawei Cloud APIs, infrastructure, documentation, credentials, identity and access settings, or network security.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/huaweicloud/huaweicloud-devkit/huawei-agent-rules
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.

Clone the repo
git clone --depth 1 https://github.com/huaweicloud/huaweicloud-devkit

Made for: Cursor.

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-agent-rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/huaweicloud/huaweicloud-devkit/huawei-agent-rules/github.svg)](https://agentmods.dev/rules/huaweicloud/huaweicloud-devkit/huawei-agent-rules)
Your own site
<a href="https://agentmods.dev/rules/huaweicloud/huaweicloud-devkit/huawei-agent-rules"><img src="https://agentmods.dev/badge/rules/huaweicloud/huaweicloud-devkit/huawei-agent-rules/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-agent-rules

Your own site · 80×15
<a href="https://agentmods.dev/rules/huaweicloud/huaweicloud-devkit/huawei-agent-rules"><img src="https://agentmods.dev/badge/rules/huaweicloud/huaweicloud-devkit/huawei-agent-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 918 This file is loaded in full into every session.
When invoked 918 The same file — it is already loaded in full.
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.00918 $0.00918
Opus 5 $0.00459 $0.00459
Sonnet 5 $0.00184 $0.00184
Haiku 4.5 $0.00092 $0.00092

Measured 2d ago against content hash 212ad2eff565, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

huawei-agent-rules 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 2d ago.

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.

rules/huawei-agent-rules.mdc · 79 lines

How it starts

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

HuaweiCloud Devkit — Agent Rules

Agent 加载插件时自动读取,定义全局行为约束。


Core Principles

  • Always use the Huawei MCP server first (sandboxed, observable, auditable). Fall back to hcloud CLI only when MCP is unavailable.
  • Before any task, check for available skills. Use huaweicloud_search_docs or huaweicloud_retrieve_skill via MCP. Follow skill procedures over general knowledge.
  • When uncertain about API parameters, quotas, limits, or error codes — search documentation via MCP. Do not guess.
  • Prefer IaC over direct CLI calls for infrastructure creation (Terraform for Huawei Cloud, or CloudFormation equivalent).
  • Never use em dashes in resource names/tags. Use hyphens only.
  • Match user language. Respond in the same language the user writes in.

Secret Safety

  • MUST load the huawei-dew skill first for any secret, credential, API key, token, or password task.
  • MUST NOT call hcloud csms download-secret or hcloud csms show-secret directly.
  • MUST NOT call hcloud kms decrypt directly.
  • MUST use {{resolve:csms:secret-id:SecretString:key}} with the MCP proxy — secrets resolve at runtime, never enter agent context.
  • NEVER echo AK/SK values in conversation or logs.

IAM Security

  • Least privilege by default. Start with no permissions, add only what is needed.
  • MUST NOT create IAM users — use IAM Identity Center (OneAccess) or temporary credentials.
  • MUST NOT create long-term AK/SK — use temporary STS tokens.
  • MUST scope resource ARNs — no * wildcards.
  • Confused deputy protection: Add g:SourceAccount and g:SourceUrn conditions to trust policies.

Network Security

  • MUST block public access by default on OBS buckets.
  • MUST use security groups (not iptables) for ECS/CCE access control.
  • SHOULD use VPC endpoints for internal service access (no public internet).
  • MUST enable HTTPS-only on OBS buckets and API endpoints.

Observability

  • SHOULD enable CTS audit logging on all accounts.
  • SHOULD configure Cloud Eye alarms for production workloads (CPU > 80%, memory > 85%, disk > 90%).
  • SHOULD enable OBS access logging for audit compliance.

Read the full file on GitHub · 79 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. 2d ago First seen · 79 lines · 918 tokens per session scan A 212ad2eff565

Subscribe to this mod's changes

huawei-agent-rules is a cursor rule published in the GitHub repository huaweicloud/huaweicloud-devkit (46 stars, last pushed today), licensed Apache-2.0. It adds 918 tokens to every session, about $0.0046 per session on Opus 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-07.