AGENT SKILL

aws-cloud-expert

Design and implement secure, cost-optimized AWS infrastructure following least privilege, encryption, IaC, and operational excellence principles. Use when working with AWS services (EC2, ECS, Lambda, RDS, S3, SQS, SNS), IAM roles/policies, VPC networking, CloudFormation/CDK, cost optimization, or AWS monitoring and alerting. Trigger: AWS infrastructure, IAM policies, VPC networking. Do NOT trigger for: application-level code design, frontend development unrelated to cloud infrastructure, or cost optimization analysis (use finops-cost-optimization).

License 许可
MIT
最近更新
2026-08-27
Stars
★ 1
Forks
0

01 前言 Front Matter

name
aws-cloud-expert
license
MIT
metadata
{ "author": "Community", "status": "stable", "version": "1.1", "category": "cloud" }
description
Design and implement secure, cost-optimized AWS infrastructure following least privilege, encryption, IaC, and operational excellence principles. Use when working with AWS services (EC2, ECS, Lambda, RDS, S3, SQS, SNS), IAM roles/policies, VPC networking, CloudFormation/CDK, cost optimization, or AWS monitoring and alerting. Trigger: AWS infrastructure, IAM policies, VPC networking. Do NOT trigger for: application-level code design, frontend development unrelated to cloud infrastructure, or cost optimization analysis (use finops-cost-optimization).

02 资源文件 8

03 SKILL.md 正文

AWS Cloud Expert

Secure, cost-optimized AWS infrastructure: least privilege + encryption + IaC + observability.

Core Principles

  1. Least Privilege: NEVER Action: "*" → references/iam.md
  2. IaC only: Terraform with modules (no CDK — AWS or CDKTF; pure HCL with reusable modules is the single IaC stance)
  3. Encryption everywhere: TLS + KMS
  4. Cost awareness: estimate first, tag all
  5. Observable by default: logs, metrics, alarms

IAM

  • Roles over Users; specific actions only (no wildcard *); use Conditions

Security

  • Security Groups: NEVER 0.0.0.0/0 in ingress → references/security.md
  • S3: block public access + versioning + encryption
  • Secrets: Secrets Manager or SSM (NEVER hardcoded)

MANDATORY Tags

Environment, Project, ManagedBy, CostCenter → references/tagging.md

Cost Optimization

  • Estimate before deploying; right-size (start small)
  • Savings Plans/Spot → 30-90% savings
  • Eliminate unused EIPs, volumes, LBs
  • Budget alerts at 50%, 80%, 100% → references/cost-optimization.md

Monitoring

  • CloudWatch alarms for all production services
  • Structured JSON logging + explicit retention policies
  • Enable S3/ALB/VPC/CloudTrail logging
  • Dashboards: RED method + utilization + costs → references/monitoring.md

Operations

  • Feature flags + canary deployments + automated rollbacks
  • Every alarm links to runbook
  • Weekly: review alarms | Monthly: cost analysis | Quarterly: right-sizing → references/operations.md

Resources

Constraints

  • NEVER Action: "*" or Resource: "*"
  • NEVER hardcode secrets
  • ALWAYS encrypt at rest + in transit
  • ALWAYS tag all resources
  • ALWAYS estimate costs before deploying
  • ALWAYS set CloudWatch alarms for production
  • ALWAYS set explicit log retention

Overview

AWS infrastructure following the Well-Architected Framework: least privilege IAM, encryption at rest and in transit, infrastructure as code (Terraform), and cost-aware operations. Every resource must be tagged, monitored, and deployed via IaC with no manual changes.

Quick Reference

Principle Implementation Check
Least Privilege IAM roles with scoped actions + conditions No Action: "*" or Resource: "*"
Encryption KMS + TLS for all services All buckets encrypted, LB listeners use TLS
IaC Terraform with remote state + locking No manual console changes
Tagging Environment, Project, CostCenter, ManagedBy All resources tagged on creation
Cost Control Budget alerts at 50%/80%/100%, right-size quarterly Alarms configured
Observability CloudWatch alarms, structured JSON logs, dashboards RED metrics per service

Workflow

  1. Estimate costs before deploying — use AWS Pricing Calculator and review existing reserved capacity
  2. Write Terraform modules with mandatory tags, encryption, and least-privilege IAM
  3. Validate: terraform plan → review diff → tflint → checkov for security compliance
  4. Deploy with CI/CD; never use manual console changes
  5. Configure CloudWatch alarms (linked to runbooks) and structured logging with retention policy
  6. Monitor: weekly alarm review, monthly cost analysis, quarterly right-sizing review

Anti-patterns

FAIL: Overly permissive IAM policy

# BAD
Action = "s3:*"
Resource = "*"

PASS: Scope to specific actions and resources

# GOOD
Action = ["s3:GetObject", "s3:PutObject"]
Resource = "arn:aws:s3:::example-data-bucket/*"
Condition {
  test     = "StringEquals"
  variable = "s3:x-amz-server-side-encryption"
  values   = ["aws:kms"]
}

FAIL: Security Group with open ingress

# BAD
cidr_blocks = ["0.0.0.0/0"]

PASS: Restrict to known CIDRs

# GOOD
cidr_blocks = ["10.0.0.0/16", "10.1.0.0/16"]

FAIL: Deploying without cost estimation

# BAD — surprise bill at month end
Deploy r6i.8xlarge without checking pricing

PASS: Estimate first, right-size

# GOOD
1. Check pricing: r6i.8xlarge = $1.6/hr vs r6i.large = $0.1/hr
2. Start with r6i.large, monitor utilization, scale up if needed
3. Set budget alert at 50%

FAIL: Missing encryption on S3 bucket

# BAD
resource "aws_s3_bucket" "data" {
  bucket = "example-data"
}

PASS: Enforce encryption

# GOOD
resource "aws_s3_bucket" "data" {
  bucket = "example-data"
}
resource "aws_s3_bucket_server_side_encryption_configuration" "data" {
  bucket = aws_s3_bucket.data.id
  rule {
    apply_server_side_encryption_by_default {
      sse_algorithm = "aws:kms"
    }
  }
}

References

Verification Checklist

  • [ ] IAM policies scoped to specific actions and resources (no Action: "*", no Resource: "*")
  • [ ] Security group ingress restricted to known CIDRs (no 0.0.0.0/0)
  • [ ] Encryption enabled at rest (KMS) and in transit (TLS) for all resources
  • [ ] All resources tagged: Environment, Project, CostCenter, ManagedBy
  • [ ] Cost estimate obtained before deploying new infrastructure
  • [ ] CloudWatch alarms configured for all production services with runbook links

Troubleshooting

[WARN] Known issue Likely cause Fix
Terraform plan shows unexpected resource changes Drift from manual console changes; state file out of sync Run terraform refresh or terraform import for drifted resources; prevent manual changes via SCP
Unable to list S3 bucket objects despite IAM permission S3 bucket policy denying access; public access block active Check bucket policy for explicit deny; verify IAM principal matches bucket policy condition
CloudWatch alarm not firing despite error rate > threshold No metric data; alarm period mismatch; insufficient data actions not configured Verify metric namespace/dimension match; set treatMissingData: breaching; check alarm period aligns with metric frequency
EC2 cost 2x above estimate Instance type oversized; no Savings Plan; NAT gateway data transfer Right-size via Compute Optimizer; purchase Savings Plan; add VPC endpoints to reduce NAT data transfer
Terraform state lock prevents concurrent runs (known limitation) Multiple CI pipelines or engineers running terraform apply simultaneously on same workspace Use remote state locking with DynamoDB; enforce serial execution in CI

04 同仓库更多 Skills

ronsilver
ronsilver/agent-covenant

web-browsing-agent-expert

Web browsing for AI agents: driving a headless browser (Playwright, Puppeteer) from agent tooling, navigation and page-state grounding, DOM extraction and structured data capture, form interaction, session and cookie management, anti-bot mitigation awareness, and safe browsing rules (no PII exfiltration, respect robots and terms). Use when building a browsing tool or MCP server for an agent, teaching an agent to navigate and read web pages, extracting structured content from dynamic sites, or handling login walls and pagination in agent workflows. Trigger: web browsing agent, headless browser, Playwright MCP, Puppeteer, browser automation for agents, DOM extraction, page navigation, session management. Do NOT trigger for: end-to-end UI testing of an application (use playwright-expert); writing standalone scraping scripts for data pipelines (use python-expert); fetching a single public URL (use the fetch tool).

★ 1
ronsilver
ronsilver/agent-covenant

vector-databases

Design and operate vector databases for cloud-native AI features. Use when selecting between pgvector, Pinecone, or Weaviate for AI context layer or integration-hub; designing embedding schemas and index parameters; implementing ANN search with metadata filtering; managing embedding model versions; optimizing query latency; or debugging low retrieval quality. Pairs with rag-architecture for pipeline design and postgres-database-expert for pgvector specifics. Trigger: vector database, pgvector, Pinecone, Weaviate, embedding, ANN search, HNSW, cosine similarity. Do NOT trigger for: relational SQL optimization, standard PostgreSQL schema design, Redis caching.

★ 1
ronsilver
ronsilver/agent-covenant

typescript-expert

Full-stack TypeScript stack for modern projects: frontend SSR/CSR with Next.js 14 App Router and React, backend APIs with Node.js (Express/Fastify), state management with Zustand/Redux Toolkit, unit and integration testing with Vitest/Jest + React Testing Library + MSW, and static analysis with ESLint/Prettier/tsc. Use when building React components or hooks, implementing Next.js App Router or Server Components, writing Node.js REST API handlers, implementing middleware (auth, rate-limit, logging), managing client state (Zustand/RTK), writing frontend/backend tests, or running TypeScript linting/type checks. Trigger: TypeScript, Next.js, React, Zustand, Node.js, Express, Fastify, MSW, Vitest. Do NOT trigger for: Python backend development, Go microservices, iOS/mobile development.

★ 1
ronsilver
ronsilver/agent-covenant

tool-usage

Guide correct tool selection, design, and orchestration for AI agents. Use when choosing between dedicated vs Bash tools, designing MCP tool interfaces, naming tool parameters, handling tool response limits, orchestrating parallel vs sequential calls, evaluating tool accuracy, applying ACI design principles, selecting workflow patterns, or reading/filtering/transforming/generating structured data (JSON, YAML, CSV, TOML, XML). Trigger: tool selection, MCP tool design, orchestration, ACI, parallel execution, composite tool, structured data, jq, yq, dasel, mlr, csvkit. Do NOT trigger for: writing application business logic, domain-specific development (route to domain skill), database migrations.

★ 1
ronsilver
ronsilver/agent-covenant

token-efficiency

Enforce token-efficient output, compression, caching, and model routing. Use when calibrating response verbosity, applying compression strategies to logs or RAG chunks, routing tasks to the right model tier, setting thinking budgets, enforcing word limits, compressing context before reinitiation, applying KV-cache ordering, masking tool output observations, or applying clarification-first protocol before irreversible actions. Trigger: token efficiency, compression, model routing, thinking budget, KV-cache, clarification protocol. Do NOT trigger for: non-agent tooling, CI/CD pipeline scripting, infrastructure provisioning.

★ 1
ronsilver
ronsilver/agent-covenant

time-series-db

Time-series database patterns for cloud-native metrics and analytics: TimescaleDB, InfluxDB, and Amazon Timestream selection; continuous aggregates, retention policies, downsampling, and integration with Prometheus/Grafana. Use when storing business metrics over time, building custom business dashboards, designing high-frequency event storage, or querying time-bucketed aggregations. Trigger: time-series, TimescaleDB, InfluxDB, Prometheus, Grafana, hypertable, continuous aggregate, retention policy. Do NOT trigger for: relational PostgreSQL schema design, NoSQL document stores, Kafka event streaming.

★ 1