Логотип Huawei Cloud Swr Image Governance

Huawei Cloud Swr Image Governance

Организация
huaweicloud
huawei-cloud-swr-image-governance

Huawei Cloud SWR (Software Repository for Container) image governance skill using hcloud CLI. Use this skill when the user wants to: (1) manage SWR namespace permissions - grant/query/modify/revoke, (2) manage repository permissions - grant/query/modify/revoke, (3) manage image retention rules - create/list/update/delete, (4) manage shared download domains - create/list/update/delete, (5) manage image sharing - list shared repos/query feature gates, (6) check SWR agency status and create agency delegation, (7) list repo accessories and references. Trigger: user mentions "SWR image governance", "SWR 镜像治理", "SWR 权限管理", "SWR retention", "SWR 保留策略", "SWR 共享域名", "SWR 共享镜像", "SWR 委托", "SWR agency", "namespace permissions", "repository permissions", "镜像权限", "保留规则", "共享下载", "镜像分享"

Add to TypingMind

Обзор

Издательhuaweicloud
Репозиторийhuaweicloud-skills
Название навыкаhuawei-cloud-swr-image-governance
Звёзды
59
Форки
24
Файлы в комплекте
12
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 12

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — huaweicloud. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Huawei Cloud Swr Image Governance в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/container/swr/huawei-cloud-swr-image-governance
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/huaweicloud/huaweicloud-skills.git /tmp/huaweicloud-skills
mkdir -p .claude/skills
cp -r /tmp/huaweicloud-skills/skills/container/swr/huawei-cloud-swr-image-governance .claude/skills/huawei-cloud-swr-image-governance
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Huawei Cloud Swr Image Governance в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Huawei Cloud Swr Image Governance, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Huawei Cloud Swr Image Governance не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Huawei Cloud SWR Image Governance

Overview

This skill provides governance capabilities for Huawei Cloud SWR (Software Repository for Container) using the hcloud CLI, covering permissions, retention policies, sharing, and agency delegation.

Architecture: hcloud CLI → SWR Service API → Permission/Retention/Domain/Share/Agency resources

Related Skills:

  • huawei-cloud-swr-image-management - Image lifecycle management (namespace, repo, tag, auth, quota)
  • huawei-cloud-swr-image-automation - Image automation ops (sync, triggers, domains)
  • huawei-cloud-swr-enterprise-instance - Enterprise instance management

Out of Scope:

This skill does NOT support the following operations. If the user requests any of these, inform them and suggest the correct skill:

OperationUse InsteadReason
Create/Delete/List namespaceshuawei-cloud-swr-image-managementNamespace lifecycle, not governance
Create/Delete repositories or tagshuawei-cloud-swr-image-managementRepo/tag lifecycle, not governance
Push/pull images (docker login)huawei-cloud-swr-image-managementImage operations, not governance
Create authorization tokenshuawei-cloud-swr-image-managementToken management, not governance
List SWR quotashuawei-cloud-swr-image-managementQuota query, not governance
Create image sync ruleshuawei-cloud-swr-image-automationSync is automation, not governance
Create/Delete triggershuawei-cloud-swr-image-automationTriggers are automation, not governance
Start security scanshuawei-cloud-swr-image-automationScanning is automation, not governance
Create immutable (不可变) rulesN/A (not supported by any current skill)Use Huawei Cloud SWR console
View audit logsUse Huawei Cloud console or CESAudit logs are not governance operations
Create/Delete enterprise instanceshuawei-cloud-swr-enterprise-instanceInstance lifecycle, not governance

Capabilities:

  • Grant, query, modify, and revoke namespace-level permissions
  • Grant, query, modify, and revoke repository-level permissions
  • Create and manage image retention rules for automated cleanup
  • Create and manage shared download domains for cross-organization access
  • List shared repositories and check sharing feature gates
  • Check and create agency delegation for SWR operations
  • List repository accessories and references

Typical Use Cases:

  • "Grant edit permission on namespace 'group-dev' to user 'dev-team'"
  • "List all users with access to namespace 'group-dev'"
  • "Set up a retention rule to keep only the last 10 tags in repository 'nginx'"
  • "Create a shared download domain for repository 'my-app'"
  • "List all shared repositories"
  • "Check if image sharing feature is enabled"
  • "Check agency delegation status for SWR"
  • "Revoke a user's permission on a repository"

Workflow

  1. ⚠️ Billing Confirmation (MANDATORY) — Before executing any operation, inform the user of potential billing implications and obtain explicit consent:
    • Governance operations: Permission management, retention rules, and sharing configuration are free. However, retention rules that delete images reduce storage costs, while shared download domains may increase traffic costs.
    • Agency delegation: Creating SWR agency delegation does not incur direct costs but enables cross-service operations that may have billing implications.
    • Ask the user to confirm: "Do you understand the billing implications and wish to proceed? (yes/no)"
    • Only proceed if the user explicitly confirms. If the user declines, stop and do not execute any operations.
  2. Parse user request — identify the governance operation (permissions, retention, domains, sharing, agency)
  3. Check scope — if the requested operation is listed in Out of Scope, inform the user and suggest the correct skill. Do not execute the operation.
  4. Verify prerequisites — check hcloud CLI installation and credential configuration
  5. Confirm parameters — display the operation, target resources, and parameters to the user for confirmation
  6. Execute read operations — for query operations (Show, List, Check), run hcloud CLI directly
  7. Confirm write operations — for write operations (Create, Update, Delete), prompt user confirmation before execution (see Parameter Confirmation)
  8. Parse and format output — extract relevant fields, format as table or structured output
  9. Report results — present results with context (e.g., permission changes, retention rule details)
  10. Suggest next actions — recommend related operations (e.g., after granting permission, suggest verifying with Show)

参数确认

All write operations (Create, Update, Delete) require explicit user confirmation before execution.

Before executing any write operation, the skill must:

  1. Display the exact hcloud command to be executed
  2. Show the target resource (namespace, repository, domain, etc.)
  3. Show the change to be applied (permission level, retention rule, domain settings)
  4. Wait for user confirmation ("yes" / "confirm") before proceeding
  5. If user declines, abort the operation and return to step 1

Write operations requiring confirmation:

OperationCommandRisk LevelDescription
Grant namespace permissionCreateNamespaceAuth🟡 MediumGrants access to all repos under namespace. If auth=7, grants full control (create/delete repos, manage permissions) — warn user accordingly
Update namespace permissionUpdateNamespaceAuth🟡 MediumChanges access level for namespace. Permission downgrade may prevent the user from performing existing operations, impacting business workflows
Revoke namespace permissionDeleteNamespaceAuth🟠 HighRemoves all access to namespace. May cause business interruption — any CI/CD pipelines or services using this namespace will immediately lose access
Grant repo permissionCreateUserRepositoryAuth🟡 MediumGrants access to specific repository. If auth=7, grants full control of this repository
Update repo permissionUpdateUserRepositoryAuth🟡 MediumChanges access level for repository. Permission downgrade may break existing workflows that depend on the current access level
Revoke repo permissionDeleteUserRepositoryAuth🟠 HighRemoves all access to repository. May cause business interruption — services pulling from this repo will immediately lose access
Create retention ruleCreateRetention🟠 HighCreates automated cleanup policy. When the rule executes, tags not matching retention conditions are automatically deleted and data is unrecoverable
Update retention ruleUpdateRetention🟠 HighModifies cleanup policy. Changing conditions may cause previously retained tags to be deleted — data is unrecoverable
Delete retention ruleDeleteRetention🟡 MediumRemoves automated cleanup policy. Existing tags are preserved, but no future cleanup will occur
Create shared domainCreateRepoDomains🟡 MediumShares images with another account via cross-organization access
Update shared domainUpdateRepoDomains🟡 MediumChanges sharing settings (e.g., expiration, permissions)
Delete shared domainDeleteRepoDomains🟠 HighRevokes cross-account access. Users in the target organization will immediately lose the ability to pull images via this domain
Create agencyCreateAgency🟠 HighCreates SWR delegation. Grants SWR permission to access other services (OBS, CCE) on your behalf — confirm the delegation scope before proceeding

Prerequisites

1. hcloud CLI Requirements (MANDATORY)

  • hcloud CLI installed (version >= 7.2.2)
  • Run hcloud version to verify installation
  • First-time usage: printf "y\n" | hcloud version to accept privacy statement

2. Credential Configuration

hcloud CLI supports two credential modes via environment variables, automatically detected at runtime:

Mode A — Long-term AK/SK (permanent access):

bash
export HUAWEI_CLOUD_AK=<your-ak>
export HUAWEI_CLOUD_SK=<your-sk>
export HUAWEI_CLOUD_REGION=cn-north-4

Mode B — Temporary AK/SK + SecurityToken (recommended for temporary or delegated access):

bash
export HUAWEI_CLOUD_AK=<your-temp-ak>
export HUAWEI_CLOUD_SK=<your-temp-sk>
export HUAWEI_CLOUD_SECURITY_TOKEN=<your-security-token>
export HUAWEI_CLOUD_REGION=cn-north-4

When HUAWEI_CLOUD_SECURITY_TOKEN is present, hcloud CLI automatically uses temporary credential authentication. When only AK/SK are set, it uses long-term credential authentication.

  • Security Rules:
    • 🚫 Never expose AK/SK/SecurityToken values in code, conversation, or commands
    • 🚫 Never use echo $HUAWEI_CLOUD_AK or echo $HUAWEI_CLOUD_SK to check credentials
    • ✅ Use environment variables: HUAWEI_CLOUD_AK, HUAWEI_CLOUD_SK, HUAWEI_CLOUD_REGION, HUAWEI_CLOUD_SECURITY_TOKEN
    • ✅ Prefer IAM users over root account for cloud operations
    • ✅ Enable MFA for sensitive operations

⚠️ Important Security Notes:

  • Never commit credentials to version control
  • Use IAM users with minimal required permissions
  • Enable MFA for sensitive operations
  • Rotate AK/SK regularly

3. IAM Permission Requirements

API ActionPermissionPurpose
swr:namespace:auth:createCreate NS authGrant namespace permissions
swr:namespace:auth:getGet NS authQuery namespace permissions
swr:namespace:auth:updateUpdate NS authModify namespace permissions
swr:namespace:auth:deleteDelete NS authRevoke namespace permissions
swr:repository:auth:createCreate repo authGrant repository permissions
swr:repository:auth:getGet repo authQuery repository permissions
swr:repository:auth:updateUpdate repo authModify repository permissions
swr:repository:auth:deleteDelete repo authRevoke repository permissions
swr:retention:createCreate retentionCreate retention rules
swr:retention:listList retentionList retention rules
swr:retention:getGet retentionView retention rule details
swr:retention:updateUpdate retentionModify retention rules
swr:retention:deleteDelete retentionRemove retention rules
swr:domain:createCreate domainCreate shared download domains
swr:domain:listList domainsList shared download domains
swr:domain:getGet domainView domain details
swr:domain:updateUpdate domainModify domain settings
swr:domain:deleteDelete domainRemove shared download domains
swr:share:listList shared reposList shared repositories
swr:share:getGet shared repoView shared repository details
swr:share:feature:getGet share featureCheck sharing feature gates
swr:global:feature:getGet global featureCheck global feature gates
swr:agency:checkCheck agencyCheck agency delegation status
swr:agency:createCreate agencyCreate agency delegation
swr:accessory:listList accessoriesList repository accessories
swr:reference:listList referencesList repository references

See IAM Permission Policies for complete policy JSON.

Permission Failure Handling:

  1. When any command fails due to permission errors, read references/iam-policies.md
  2. Display the required permission list and policy JSON to the user
  3. Guide the user to create a custom policy in the IAM console and grant authorization
  4. Pause execution and wait for user confirmation that permissions have been granted

KooCLI Command Format Standard

All commands follow the standard hcloud KooCLI format:

bash
hcloud SWR <Operation> --param1=value1 --param2=value2 --cli-region=<region>

Key conventions:

  • Service name: SWR (uppercase, matches KooCLI Services listing)
  • Operation name: PascalCase (e.g., ShowNamespaceAuth, CreateRetention, ListRepoDomains)
  • Region parameter: --cli-region=<value> (default: cn-north-4, or HUAWEI_CLOUD_REGION env var)
  • Output format: --cli-output=json (for agent processing)
  • JMESPath filtering: --cli-query="<expression>" (to reduce output)
  • Array-style parameters: --1.auth=7 --1.user_id=xxx (index starts from 1, not 0)
  • Nested object parameters: --rules.1.template=tag_rule --rules.1.params='{"num":"10"}'

Example — read operation:

bash
hcloud SWR ShowNamespaceAuth --namespace=pancake --cli-region=cn-north-4 --cli-output=json

Example — write operation (requires user confirmation):

bash
# Step 1: Display command and parameters for user confirmation
# Step 2: After user confirms, execute:
hcloud SWR CreateNamespaceAuth --namespace=pancake --1.auth=7 --1.user_id=<user-id> --1.user_name=<user-name> --cli-region=cn-north-4

Core Commands

1. Namespace Permissions

See Task: Namespace Permissions for detailed workflows.

bash
# Show namespace permissions (who has access and their auth levels)
hcloud SWR ShowNamespaceAuth --namespace=pancake --cli-region=cn-north-4

# Grant namespace permission to a user
hcloud SWR CreateNamespaceAuth --namespace=pancake --1.auth=7 --1.user_id=05949eb5350010e21f85c017722182de --1.user_name=hwstaff_p00506267 --cli-region=cn-north-4

# Update namespace permission for a user
hcloud SWR UpdateNamespaceAuth --namespace=pancake --1.auth=3 --1.user_id=05949eb5350010e21f85c017722182de --1.user_name=hwstaff_p00506267 --cli-region=cn-north-4

# Revoke namespace permission for a user (DELETE uses array<string>, not array<object>)
hcloud SWR DeleteNamespaceAuth --namespace=pancake --1=05949eb5350010e21f85c017722182de --cli-region=cn-north-4

Auth Values: 7 = manage (full control), 3 = edit (push/pull), 1 = read (pull only)

⚠️ Array-Style Parameters: Permission operations use different array formats:

  • Create/Update (array): Use --[N].auth, --[N].user_id, --[N].user_name format where [N] is the array index (starting from 1). For a single user, use --1.auth=7 --1.user_id=xxx --1.user_name=xxx.
  • Delete (array): Use --[N]=<user_id> format — the array element is directly a user ID string. For a single user, use --1=<user_id>. Do NOT use --1.user_id= or --1.user_name= for Delete operations. See Common Pitfalls for details.

2. Repository Permissions

See Task: Repository Permissions for detailed workflows.

bash
# Show repository permissions
hcloud SWR ShowUserRepositoryAuth --namespace=pancake --repository=openclaw-sandbox --cli-region=cn-north-4

# Grant repository permission to a user
hcloud SWR CreateUserRepositoryAuth --namespace=pancake --repository=openclaw-sandbox --1.auth=7 --1.user_id=05949eb5350010e21f85c017722182de --1.user_name=hwstaff_p00506267 --cli-region=cn-north-4

# Update repository permission for a user
hcloud SWR UpdateUserRepositoryAuth --namespace=pancake --repository=openclaw-sandbox --1.auth=3 --1.user_id=05949eb5350010e21f85c017722182de --1.user_name=hwstaff_p00506267 --cli-region=cn-north-4

# Revoke repository permission for a user (DELETE uses array<string>, not array<object>)
hcloud SWR DeleteUserRepositoryAuth --namespace=pancake --repository=openclaw-sandbox --1=05949eb5350010e21f85c017722182de --cli-region=cn-north-4

Auth Values: Same as namespace permissions: 7 = manage, 3 = edit, 1 = read

3. Agency Delegation

bash
# Check if agency delegation is enabled
hcloud SWR CheckAgency --cli-region=cn-north-4

# Create agency delegation for SWR
hcloud SWR CreateAgency --cli-region=cn-north-4

Use Cases:

  • Agency delegation allows SWR to access other services (OBS, CCE) on your behalf
  • Required for features like image sync to OBS and CCE trigger deployments
  • CheckAgency returns whether agency is already configured; CreateAgency sets up the delegation

4. Retention Rules

See Task: Retention Management for detailed workflows.

bash
# List retention rules for a repository
hcloud SWR ListRetentions --namespace=pancake --repository=openclaw-sandbox --cli-region=cn-north-4

# Create a retention rule (keep last 10 tags)
hcloud SWR CreateRetention --namespace=pancake --repository=openclaw-sandbox --algorithm=or --rules.1.template=tag_rule --rules.1.params='{"num":"10"}' --rules.1.tag_selectors.1.kind=label --rules.1.tag_selectors.1.pattern=latest --cli-region=cn-north-4

# Create a retention rule (keep tags from last 30 days)
hcloud SWR CreateRetention --namespace=pancake --repository=openclaw-sandbox --algorithm=or --rules.1.template=date_rule --rules.1.params='{"days":"30"}' --rules.1.tag_selectors.1.kind=label --rules.1.tag_selectors.1.pattern=latest --cli-region=cn-north-4

# Show retention rule details
hcloud SWR ShowRetention --namespace=pancake --repository=openclaw-sandbox --retention_id=<id> --cli-region=cn-north-4

# Update a retention rule
hcloud SWR UpdateRetention --namespace=pancake --repository=openclaw-sandbox --retention_id=<id> --algorithm=or --rules.1.template=tag_rule --rules.1.params='{"num":"5"}' --rules.1.tag_selectors.1.kind=label --rules.1.tag_selectors.1.pattern=latest --cli-region=cn-north-4

# Delete a retention rule
hcloud SWR DeleteRetention --namespace=pancake --repository=openclaw-sandbox --retention_id=<id> --cli-region=cn-north-4

# List retention execution histories
hcloud SWR ListRetentionHistories --namespace=pancake --repository=openclaw-sandbox --retention_id=<id> --cli-region=cn-north-4

Retention Rule Templates:

  • tag_rule: Keep a specified number of the most recent tags (params.num)
  • date_rule: Keep tags created within a specified number of days (params.days)

Tag Selector Kinds:

  • label: Exact tag name match (e.g., latest, v1.0)
  • regexp: Regex pattern match (e.g., v\d+\.\d+\.\d+)

Algorithm: or means rules are combined with OR logic (a tag is retained if it matches ANY rule)

5. Shared Download Domains

See Task: Shared Domains for detailed workflows.

bash
# List shared download domains for a repository
hcloud SWR ListRepoDomains --namespace=pancake --repository=openclaw-sandbox --cli-region=cn-north-4

# Create a shared download domain
# --access_domain: Huawei Cloud IAM domain name (tenant name/account name) of the target account to share with
# --deadline: Expiration time in UTC format; use "forever" for permanent access
# --permit: Permission type; currently only "read" is supported
hcloud SWR CreateRepoDomains --namespace=pancake --repository=openclaw-sandbox --access_domain=<iam-domain-name> --deadline=forever --permit=read --cli-region=cn-north-4

# Show shared domain details
hcloud SWR ShowAccessDomain --namespace=pancake --repository=openclaw-sandbox --access_domain=<iam-domain-name> --cli-region=cn-north-4

# Update a shared download domain
hcloud SWR UpdateRepoDomains --namespace=pancake --repository=openclaw-sandbox --access_domain=<iam-domain-name> --deadline=forever --permit=read --cli-region=cn-north-4

# Delete a shared download domain
hcloud SWR DeleteRepoDomains --namespace=pancake --repository=openclaw-sandbox --access_domain=<iam-domain-name> --cli-region=cn-north-4

Shared Domain Parameters:

  • --access_domain: The Huawei Cloud IAM domain name (shared tenant name) of the account you want to share the image with. This is the target account's domain name, not a custom domain identifier.
  • --deadline: Expiration time in UTC format (e.g., 2025-12-31T23:59:59Z). Use forever for permanent access.
  • --permit: Permission type. Currently only read (download/pull) is supported.
  • --description (optional): Human-readable description of the shared domain.

6. Image Sharing

See Task: Image Sharing for detailed workflows.

bash
# List shared repositories I have shared (self) or received (thirdparty)
# --center is REQUIRED: "self" = repos I shared to others, "thirdparty" = repos shared to me
hcloud SWR ListSharedReposDetails --center=self --cli-region=cn-north-4

# List shared repository details (--shared_by is REQUIRED: self|thirdparty)
hcloud SWR ListSharedRepoDetails --shared_by=self --cli-region=cn-north-4

# Check sharing feature gates
hcloud SWR ShowShareFeatureGates --cli-region=cn-north-4

# Check global feature gates
hcloud SWR ListGlobalFeatureGates --cli-region=cn-north-4

7. Repository Accessories & References

bash
# List repository accessories
hcloud SWR ListRepoAccessories --namespace=pancake --repository=openclaw-sandbox --cli-region=cn-north-4

# List repository references
hcloud SWR ListReferences --namespace=pancake --repository=openclaw-sandbox --cli-region=cn-north-4

Parameter Reference

Common Parameters

ParameterRequired/OptionalDescriptionDefault
--cli-regionRequiredHuawei Cloud region IDConfig value or HUAWEI_CLOUD_REGION
--namespaceContext-dependentSWR namespace (organization)N/A
--repositoryContext-dependentImage repository nameN/A

Permission Parameters

ParameterRequiredDescriptionConstraints
--namespaceYesNamespace nameMust exist
--repositoryYesRepository name (repo-level only)Must exist
--[N].authYesPermission level7=manage, 3=edit, 1=read
--[N].user_idYesIAM user IDHex string (e.g., 05949eb5350010e21f85c017722182de)
--[N].user_nameYesIAM user nameIAM user display name

⚠️ Array Index Format: [N] starts from 1 (not 0). For granting permission to a single user, use --1.auth=7 --1.user_id=xxx --1.user_name=xxx. For multiple users, use --1.auth=7 --1.user_id=xxx --1.user_name=xxx --2.auth=3 --2.user_id=yyy --2.user_name=yyy.

Retention Parameters

ParameterRequiredDescriptionConstraints
--namespaceYesNamespace nameMust exist
--repositoryYesRepository nameMust exist
--retention_idYesRetention rule ID (for show/update/delete)Numeric ID
--algorithmYesRule combination logicFixed value or
--rules.[N].templateYesRule template typedate_rule or tag_rule
--rules.[N].paramsYesRule parametersdays for date_rule, num for tag_rule
--rules.[N].tag_selectors.[N].kindYesSelector kindlabel or regexp
--rules.[N].tag_selectors.[N].patternYesSelector patternTag name or regex

Domain Parameters

ParameterRequiredDescriptionConstraints
--namespaceYesNamespace nameMust exist
--repositoryYesRepository nameMust exist
--access_domainYesHuawei Cloud IAM domain name (shared tenant name)Target account's domain name, not a custom identifier
--deadlineYes (create/update)Expiration timeUTC format (e.g., 2025-12-31T23:59:59Z) or forever
--permitYes (create/update)Permission typeread (only supported value)
--descriptionNoDomain descriptionDefault: empty string

Output Format

See Output Format for detailed response format examples (NamespaceAuth, RepositoryAuth, RepoDomains, CheckAgency, ShareFeatureGates, GlobalFeatureGates, Retentions, RepoAccessories, ListSharedReposDetails).

Key Format Notes:

  • auth: Permission value (7=manage, 3=edit, 1=read)
  • self_auth vs others_auths: Check both when auditing permissions
  • ListRepoDomains: Uses created/updated (NOT created_at/updated_at)
  • ListRetentions: Returns flat array (empty [] when no rules)
  • ListRepoAccessories: Uses total + accessories (null when empty)

Verification

See Verification Method for step-by-step verification.

Best Practices

  1. Least Privilege: Grant the minimum auth level needed — 1 (read) for pull-only, 3 (edit) for push/pull, 7 (manage) for full control
  2. Namespace vs Repository Permissions: Namespace permissions apply to ALL repositories under it; repository permissions are granular per-repo
  3. Retention Rules: Use tag_rule (keep N most recent) for most cases; date_rule (keep tags within N days) for time-based cleanup
  4. Retention Tag Selectors: Use label kind with latest pattern to protect important tags from retention cleanup
  5. Shared Domains: Use deadline=forever for stable internal sharing; set specific deadlines for temporary cross-team access
  6. Agency Delegation: Check agency status before configuring image sync or CCE triggers — these require agency to be enabled
  7. Audit Permissions Regularly: Use ShowNamespaceAuth and ShowUserRepositoryAuth to periodically review who has access

Reference Documents

DocumentDescription
SWR Governance API Guidehcloud SWR governance API reference
Output FormatResponse format examples (verified)
IAM Permission PoliciesRequired permissions and policy JSON
Verification MethodStep-by-step verification
Common PitfallsTroubleshooting guides
Task: Namespace PermissionsNamespace permission workflows
Task: Repository PermissionsRepository permission workflows
Task: Retention ManagementRetention rule workflows
Task: Shared DomainsShared domain workflows
Task: Image SharingImage sharing workflows
CLI Installation GuideKooCLI installation and configuration
Acceptance CriteriaCorrect/error pattern comparison

Notes

  • Permission changes are immediate — no delay between granting and availability
  • Revoke with caution — removing manage auth (7) prevents the user from administering the namespace/repository
  • Retention rules execute automatically — tags matching the rule conditions will be deleted during execution
  • AK/SK must never be hardcoded — credentials should only be obtained via environment variables
  • hcloud CLI is the only supported method — all operations use hcloud SWR <Operation> format
  • ListRepoDomains timestamps use created/updated — NOT created_at/updated_at

Common Pitfalls

See Common Pitfalls & Solutions for detailed troubleshooting guides.

Quick Reference:

PitfallSymptomQuick Fix
Array-style paramsPermission grant failsUse --1.auth=7 --1.user_id=xxx (index from 1, not 0)
Auth value wrongUser has unexpected access7=manage, 3=edit, 1=read (not 1/2/3)
self_auth vs others_authsMissing user in auditCheck both self_auth and others_auths
Domain timestamp fieldsParsing created_at failsUse created/updated (not created_at)
Retention rule formatCreateRetention failsNested array params: --rules.1.tag_selectors.1.kind
Agency not configuredImage sync/CCE trigger failsRun CheckAgency then CreateAgency

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Huawei Cloud Swr Image Governance?

Huawei Cloud SWR (Software Repository for Container) image governance skill using hcloud CLI. Use this skill when the user wants to: (1) manage SWR namespace permissions - grant/query/modify/revoke, (2) manage repository permissions - grant/query/modify/revoke, (3) manage image retention rules - create/list/update/delete, (4) manage shared download domains - create/list/update/delete, (5) manage image sharing - list shared repos/query feature gates, (6) check SWR agency status and create agency delegation, (7) list repo accessories and references. Trigger: user mentions "SWR image governanc...

Зачем использовать Huawei Cloud Swr Image Governance в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Huawei Cloud Swr Image Governance — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Huawei Cloud Swr Image Governance в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/container/swr/huawei-cloud-swr-image-governance. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Huawei Cloud Swr Image Governance?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Huawei Cloud Swr Image Governance?

С любым количеством. В TypingMind вы можете использовать Huawei Cloud Swr Image Governance с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Huawei Cloud Swr Image Governance?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — huaweicloud. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все
Логотип affaan-m

Change Impact

affaan-m
СообществоПопулярный

Perform evidence-backed impact analysis before changing code, data, interfaces, or governance documents, then compare the planned impact with the actual diff after implementation. Covers call paths,…

41.4K
277.3K
Файлы: 1
Открыть
Логотип affaan-m

Test Collaboration

affaan-m
СообществоПопулярный

Inventory and govern a project's test assets. Connect requirements, business rules, risks, bugs, and cross-boundary contracts to stable TEST-IDs and executable evidence in the repository's existing…

41.4K
277.3K
Файлы: 2
Открыть
Логотип affaan-m

Product Capability

affaan-m
СообществоПопулярный

Преобразует требования из PRD, запросы по дорожной карте или обсуждения продукта в готовый к реализации план возможностей, в котором до начала работ над несколькими сервисами обозначены ограничения, инварианты, интерфейсы и нерешённые…

40.4K
270.2K
Файлы: 1
Открыть
Логотип affaan-m

Django Patterns

affaan-m
СообществоПопулярный

Паттерны архитектуры Django, проектирование REST API с DRF, рекомендации по использованию ORM, кэширование, сигналы, middleware и разработка Django-приложений для продакшена.

39.1K
261.1K
Инструкции
Открыть

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇