Claude-skill-registry cloud-common
Shared utilities for faber-cloud plugin - configuration loading, pattern resolution, auto-discovery
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/cloud-common" ~/.claude/skills/majiayu000-claude-skill-registry-cloud-common && rm -rf "$T"
skills/data/cloud-common/SKILL.mdCloud Common
Shared utilities used across all faber-cloud skills.
Purpose
This skill provides:
- Configuration loading from
(in project working directory).fractary/plugins/faber-cloud/config.json - Backward compatibility with
andfaber-cloud.json
(deprecated)devops.json - Pattern substitution (
,{project}
, etc.){environment} - Auto-discovery fallbacks when config is missing
- Validation and error handling
CRITICAL: Always load config from the project working directory, NOT the plugin installation directory.
Configuration Loading
Primary config file:
.fractary/plugins/faber-cloud/config.json (relative to project root / current working directory)
Common Mistake: Do NOT look in
~/.claude/plugins/marketplaces/fractary/plugins/faber-cloud/ - that's the plugin installation directory, not the project config location.
Automatic migration (seamless upgrade):
- If
exists: use it (current standard)config.json - If
exists: automatically rename tofaber-cloud.jsonconfig.json - If
exists: show warning to migrate manuallydevops.json
Migration is automatic and preserves all configuration settings.
Components
scripts/config-loader.sh
Core configuration management:
Main Functions:
- Load configuration from file or auto-discover (with backward compatibility)load_faber_cloud_config()
- Substitute placeholders in patternsresolve_pattern(pattern, environment)
- Get AWS profile for environmentget_aws_profile(environment)
- Get specific config valueget_config_value(key)
- Display current configurationshow_config()
Usage:
# Source the loader source "${SKILL_DIR}/../cloud-common/scripts/config-loader.sh" # Load configuration (checks config.json, auto-migrates from faber-cloud.json if needed) load_faber_cloud_config # Use configuration variables echo "Project: $PROJECT_NAME" echo "Provider: $PROVIDER" echo "IaC Tool: $IAC_TOOL" # Resolve patterns USER_NAME=$(resolve_pattern "$USER_NAME_PATTERN" "test") # Result: corthuxa-core-test-deploy # Get AWS profile AWS_PROFILE=$(get_aws_profile "test") # Result: corthuxa-core-test-deploy
Exported Variables:
- Project namePROJECT_NAME
- Project namespaceNAMESPACE
- Organization nameORGANIZATION
- Cloud provider (aws, gcp, azure)PROVIDER
- IaC tool (terraform, pulumi, cdk)IAC_TOOL
- AWS regionAWS_REGION
- Terraform directory pathTERRAFORM_DIR
- IAM policies directory pathIAM_POLICIES_DIR
,PROFILE_DISCOVER
,PROFILE_TEST
- AWS profilesPROFILE_PROD
,USER_NAME_PATTERN
- IAM naming patternsPOLICY_NAME_PATTERN
- Resource naming prefixRESOURCE_PREFIX
templates/faber-cloud.json.template
Template for generating
.fractary/plugins/faber-cloud/config.json:
- Placeholders:
,{{PROJECT_NAME}}
, etc.{{NAMESPACE}} - Used by
command/fractary-faber-cloud:init - Includes sensible defaults
- Template filename remains
for compatibility, generatesfaber-cloud.json.templateconfig.json
Auto-Discovery
When configuration file doesn't exist, auto-discovers:
- Project name from Git repository
- Organization from Git remote
- AWS account ID from credentials
- Provider and IaC tool from installed tools
Pattern Substitution
Supported placeholders:
- Project name{project}
- Project namespace{namespace}
- Organization name{organization}
- Current environment (test, prod, etc.){environment}
- Resource prefix{prefix}
Example:
Pattern: "{prefix}-{environment}-bucket" Result: "corthuxa-test-bucket"
Configuration Schema
See
/docs/specs/fractary-faber-cloud-plugin-spec.md for complete schema.
Used By
Infrastructure Skills:
- infra-architect
- infra-engineer
- infra-validator
- infra-previewer
- infra-deployer
- infra-permission-manager
- infra-tester
- infra-debugger
Operations Skills:
- ops-monitor
- ops-investigator
- ops-responder
- ops-auditor
Handler Skills:
- handler-hosting-aws
- handler-iac-terraform
Note: Previously used by deprecated agents (devops-deployer, devops-debugger, devops-permissions) - now superseded by Phase 1-4 architecture. See
.archive/pre-phase-architecture/ for historical reference.