Manage IAM permissions - grant missing permissions when deployments fail, maintain IAM audit trail, enforce profile separation, scope permissions to environment. Uses discover-deploy profile to grant permissions, never grants to production without explicit approval.
Automatically grants missing IAM permissions when deployments fail. Triggers on AccessDenied errors during deployment to grant scoped, environment-specific permissions to deploy profiles.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-faber-cloud@fractaryThis skill inherits all available tools. When active, it can use any tool Claude has access to.
scripts/audit/apply-to-aws.shscripts/audit/diff-audit-aws.shscripts/audit/sync-from-aws.shscripts/audit/update-audit.shtemplates/iam-policies/README.mdtemplates/iam-policies/prod-deploy-permissions.jsontemplates/iam-policies/staging-deploy-permissions.jsontemplates/iam-policies/test-deploy-permissions.json<CRITICAL_RULES>
IMPORTANT: Profile Separation
IMPORTANT: Permission Scoping
IMPORTANT: Audit Trail
<PERMISSION_TYPES> ✅ DEPLOY USER PERMISSIONS (OK to add)
❌ RESOURCE PERMISSIONS (REJECT - use Terraform)
VALIDATION RULE: If user requests permission for runtime/application behavior → REJECT → Explain: "This is a resource permission. Please define it in Terraform as an IAM role/policy attached to the resource." </PERMISSION_TYPES>
<INPUTS> - **permission**: Required permission (e.g., "s3:PutObject") - **environment**: Environment scope (test/prod) - **resource_pattern**: Optional specific resource ARN pattern - **config**: Configuration from config-loader.sh </INPUTS> <WORKFLOW> **OUTPUT START MESSAGE:** ``` 🔐 STARTING: Permission Manager Permission: {permission} Environment: {environment} Profile: discover-deploy (IAM operations only) ─────────────────────────────────────── ```EXECUTE STEPS:
OUTPUT COMPLETION MESSAGE:
✅ COMPLETED: IAM Permission Manager
Environment: {env}
Permission Granted: {permission}
Target Profile: {target_profile}
Scope: {resource_pattern}
Audit file: infrastructure/iam-policies/{env}-deploy-permissions.json
Audit trail entry added: {timestamp}
───────────────────────────────────────
Next: Return to infra-debugger (or parent skill)
</WORKFLOW>
<AUDIT_WORKFLOW>
Receive permission request
Validate: Deploy user permission or resource permission?
Determine environment from context
Load audit file: infrastructure/iam-policies/{env}-deploy-permissions.json
Add requested permissions to audit file
Record in audit_trail with timestamp and reason
Apply to AWS using apply-to-aws.sh script
Verify application successful
Return success status </AUDIT_WORKFLOW>
update-audit.sh <env> <actions> <reason>
sync-from-aws.sh <env>
apply-to-aws.sh <env>
diff-audit-aws.sh <env>
<COMPLETION_CRITERIA> ✅ Profile separation validated (using discover-deploy) ✅ Permission granted with environment scoping ✅ IAM audit trail updated ✅ Permission verified as active </COMPLETION_CRITERIA>
<OUTPUTS> Return permission grant status: ```json { "status": "success", "permission": "s3:PutObject", "target_profile": "myproject-core-test-deploy", "resource_scope": "arn:aws:s3:::myproject-core-test-*/*", "audit_entry_id": "2025-10-28-001" } ``` </OUTPUTS><PERMISSION_SCOPING> Environment-scoped resource patterns:
Test Environment:
arn:aws:s3:::{project}-{subsystem}-test-*
arn:aws:lambda:{region}:{account}:function:{project}-{subsystem}-test-*
arn:aws:dynamodb:{region}:{account}:table/{project}-{subsystem}-test-*
Production Environment:
arn:aws:s3:::{project}-{subsystem}-prod-*
arn:aws:lambda:{region}:{account}:function:{project}-{subsystem}-prod-*
arn:aws:dynamodb:{region}:{account}:table/{project}-{subsystem}-prod-*
IAM Policy Statement:
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::myproject-core-test-*/*"
}
</PERMISSION_SCOPING>
<AUDIT_TRAIL>
IAM Audit Log: .fractary/plugins/faber-cloud/deployments/iam-audit.json
{
"audit_version": "1.0",
"project": "myproject-core",
"entries": [
{
"id": "2025-10-28-001",
"timestamp": "2025-10-28T12:00:00Z",
"action": "grant_permission",
"permission": "s3:PutObject",
"target_profile": "myproject-core-test-deploy",
"resource_scope": "arn:aws:s3:::myproject-core-test-*/*",
"environment": "test",
"reason": "Deployment failed with AccessDenied",
"granted_by_profile": "myproject-core-discover-deploy",
"aws_account": "123456789012"
}
]
}
</AUDIT_TRAIL>
<PERMISSION_DISCOVERY> When deployment fails with permission error:
Extract Permission from Error:
Error: AccessDenied: User is not authorized to perform: s3:PutObject
→ Required permission: s3:PutObject
→ Resource: arn:aws:s3:::myproject-core-test-uploads/*
Determine Resource Pattern:
Resource from error + environment scoping:
arn:aws:s3:::myproject-core-test-uploads/*
→ Scope to environment:
arn:aws:s3:::myproject-core-test-*/*
Grant Permission:
aws iam put-user-policy \
--user-name myproject-core-test-deploy \
--policy-name myproject-core-test-deploy-s3 \
--policy-document '{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["s3:PutObject"],
"Resource": "arn:aws:s3:::myproject-core-test-*/*"
}]
}' \
--profile myproject-core-discover-deploy
</PERMISSION_DISCOVERY>
<ERROR_HANDLING> If permission request is for resource (not deploy user):
Example: Lambda function reading S3 bucket
# CORRECT: Define resource permission in Terraform as IAM role
resource "aws_iam_role" "lambda_role" {
name = "my-function-role"
assume_role_policy = jsonencode({
Version = "2012-10-17"
Statement = [{
Action = "sts:AssumeRole"
Effect = "Allow"
Principal = {
Service = "lambda.amazonaws.com"
}
}]
})
}
resource "aws_iam_role_policy" "lambda_s3_access" {
role = aws_iam_role.lambda_role.id
policy = jsonencode({
Version = "2012-10-17"
Statement = [{
Effect = "Allow"
Action = ["s3:GetObject", "s3:PutObject"]
Resource = "arn:aws:s3:::my-bucket/*"
}]
})
}
resource "aws_lambda_function" "my_function" {
function_name = "my-function"
role = aws_iam_role.lambda_role.arn
# ...
}
Example: API Gateway invoking Lambda
# CORRECT: Define resource permission in Terraform as resource policy
resource "aws_lambda_permission" "apigw_lambda" {
statement_id = "AllowAPIGatewayInvoke"
action = "lambda:InvokeFunction"
function_name = aws_lambda_function.my_function.function_name
principal = "apigateway.amazonaws.com"
source_arn = "${aws_api_gateway_rest_api.api.execution_arn}/*/*"
}
Response to user: "This is a resource permission (runtime behavior), not a deploy permission. Please define it in Terraform using the pattern above. Resource permissions should be managed as IAM roles/policies attached to resources, not as deploy user permissions." </ERROR_HANDLING>
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.