cloud-common
Shared utilities for faber-cloud plugin - configuration loading, pattern resolution, auto-discovery
When & Why to Use This Skill
Cloud Common is a foundational utility skill designed for the faber-cloud plugin ecosystem. It streamlines cloud infrastructure management by providing robust configuration loading, dynamic pattern resolution for resource naming, and intelligent auto-discovery of project metadata. By centralizing core logic for AWS profiles, environment variables, and IaC tool settings, it ensures consistency and reduces manual overhead across all infrastructure and operations tasks.
Use Cases
- Standardizing configuration management across multiple cloud agents to ensure consistent project settings and environment variables.
- Automating the migration and upgrade of legacy DevOps configuration files to the modern standard without manual intervention.
- Resolving complex naming patterns for AWS resources and IAM policies using dynamic placeholders like project name, environment, and namespace.
- Performing automatic discovery of cloud providers, IaC tools, and project metadata directly from Git repositories and local environments.
- Providing a unified interface for infrastructure scripts to access validated AWS profiles and resource prefixes across different deployment stages.
| name | cloud-common |
|---|---|
| description | Shared utilities for faber-cloud plugin - configuration loading, pattern resolution, auto-discovery |
| model | claude-haiku-4-5 |
| allowed-tools | Bash, Read |
Cloud Common
Shared utilities used across all faber-cloud skills.
Purpose
This skill provides:
- Configuration loading from
.fractary/plugins/faber-cloud/config.json(in project working directory) - Backward compatibility with
faber-cloud.jsonanddevops.json(deprecated) - Pattern substitution (
{project},{environment}, etc.) - 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
config.jsonexists: use it (current standard) - If
faber-cloud.jsonexists: automatically rename toconfig.json - If
devops.jsonexists: show warning to migrate manually
Migration is automatic and preserves all configuration settings.
Components
scripts/config-loader.sh
Core configuration management:
Main Functions:
load_faber_cloud_config()- Load configuration from file or auto-discover (with backward compatibility)resolve_pattern(pattern, environment)- Substitute placeholders in patternsget_aws_profile(environment)- Get AWS profile for environmentget_config_value(key)- Get specific config valueshow_config()- Display current configuration
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_NAME- Project nameNAMESPACE- Project namespaceORGANIZATION- Organization namePROVIDER- Cloud provider (aws, gcp, azure)IAC_TOOL- IaC tool (terraform, pulumi, cdk)AWS_REGION- AWS regionTERRAFORM_DIR- Terraform directory pathIAM_POLICIES_DIR- IAM policies directory pathPROFILE_DISCOVER,PROFILE_TEST,PROFILE_PROD- AWS profilesUSER_NAME_PATTERN,POLICY_NAME_PATTERN- IAM naming patternsRESOURCE_PREFIX- Resource naming prefix
templates/faber-cloud.json.template
Template for generating .fractary/plugins/faber-cloud/config.json:
- Placeholders:
{{PROJECT_NAME}},{{NAMESPACE}}, etc. - Used by
/fractary-faber-cloud:initcommand - Includes sensible defaults
- Template filename remains
faber-cloud.json.templatefor compatibility, generatesconfig.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}- Project name{namespace}- Project namespace{organization}- Organization name{environment}- Current environment (test, prod, etc.){prefix}- Resource 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.