Token导航 LogoToken导航

Agent Skill · 开发

aws-optimization-sst(AWS optimization SST 部署)

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

aws-optimization-sst 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 19,957。

总安装 245周安装 10GitHub Stars 公开资料未说明下载 79核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:aws-optimization-sst(AWS optimization SST 部署)
来源仓库:https://github.com/tejovanthn/rasikalife
仓库路径:skills/aws-optimization-sst
安装命令:
npx skills add https://github.com/tejovanthn/rasikalife --skill aws-optimization-sst
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tejovanthn/rasikalife --skill aws-optimization-sst

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于优化基于 SST 框架的 AWS 资源使用效率,涵盖性能提升与成本节约策略。它适合让 Agent 提供 Lambda 函数配置建议、缓存机制设计与冷启动优化方案。使用时需要遵循右-sizing 原则,合理设置内存与超时参数,并利用 SST 默认优化配置。

安装需通过 npx skills add 命令从 tejovanthn/rasikalife 仓库添加 aws-optimization-sst 技能。涉及生产环境调整时应结合 CloudWatch 数据持续迭代优化,避免过度配置造成资源浪费。

来源仓库内路径:skills/aws-optimization-sst

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/tejovanthn/rasikalife --skill aws-optimization…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

aws-optimization-sst 怎么安装?

在终端执行 npx skills add https://github.com/tejovanthn/rasikalife --skill aws-optimization-sst。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

aws-optimization-sst 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

aws-optimization-sst 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

aws-optimization-sst 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

aws-optimization-sst 用的人多吗?

公开数据是累计安装 245 次,近一周安装 10 次,下载 79 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

aws-optimization-sst 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
aws-optimization-sst

AWS optimization SST 部署 · 本页

245—操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

AWS Optimization with SST

This skill covers best practices for optimizing AWS resources using SST, focusing on performance, cost, and developer experience.

Core Principles

  • Right-size resources: Don't over-provision
  • Use SST's defaults: They're already optimized
  • Leverage caching: Reduce redundant work
  • Optimize cold starts: Minimize Lambda initialization time
  • Monitor and iterate: Use data to guide optimization

Lambda Function Optimization

Pattern 1: Function Configuration

// sst.config.ts
new sst.aws.Function("Api", {
  handler: "src/api.handler",
  memory: "512 MB",      // Start here, adjust based on metrics
  timeout: "30 seconds", // Don't use default 3 seconds
  architecture: "arm64", // 20% cheaper and often faster
  nodejs: {
    esbuild: {
      minify: true,       // Smaller bundle
      external: [         // Don't bundle AWS SDK v3
        "@aws-sdk/*"
      ]
    }
  }
});

Memory considerations:

  • Start with 512 MB
  • Monitor execution time vs cost
  • More memory = more CPU = faster execution
  • Sometimes higher memory is cheaper (finishes faster)

Architecture:

  • Use arm64 (Graviton2) for 20% cost savings
  • Same or better performance
  • Works for most workloads

Pattern 2: Bundle Size Optimization

// Optimize imports - tree-shaking friendly
✅ import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
❌ import * as AWS from "aws-sdk";

// Use specific SDK clients
✅ import { GetCommand } from "@aws-sdk/lib-dynamodb";
❌ import { DocumentClient } from "aws-sdk/clients/dynamodb";

Bundle size tips:

  • Use AWS SDK v3 (modular)
  • Import only what you need
  • Mark heavy deps as external
  • Use dynamic imports for large libraries
// Dynamic import for rarely-used code
export async function generatePDF(data: Data) {
  const puppeteer = await import("puppeteer");
  // Only loads when actually called
}

Pattern 3: Connection Reuse

// ✅ Initialize outside handler (reused across invocations)
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";

const client = new DynamoDBClient({
  maxAttempts: 3,
  requestHandler: {
    connectionTimeout: 3000,
    socketTimeout: 3000
  }
});

export async function handler(event) {
  // Use client here
}

// ❌ Don't initialize inside handler
export async function handler(event) {
  const client = new DynamoDBClient({});
  // Creates new connection every time
}

Pattern 4: Provisioned Concurrency

For consistently high traffic:

new sst.aws.Function("HighTraffic", {
  handler: "src/api.handler",
  transform: {
    function: {
      reservedConcurrentExecutions: 10,
      // Provisioned concurrency keeps instances warm
    }
  }
});

When to use:

  • Consistent traffic patterns
  • Latency-sensitive applications
  • Cost justified by reduced cold starts

DynamoDB Optimization

Pattern 1: Table Configuration

const table = new sst.aws.Dynamo("Database", {
  fields: {
    pk: "string",
    sk: "string"
  },
  primaryIndex: { hashKey: "pk", rangeKey: "sk" },

  // Use on-demand for variable traffic
  // Use provisioned for predictable traffic
  stream: "new-and-old-images", // Only if needed for triggers

  transform: {
    table: {
      // Enable point-in-time recovery for production
      pointInTimeRecovery: $app.stage === "production"
        ? { enabled: true }
        : undefined,

      // TTL for automatic data expiration
      timeToLiveAttribute: "expiresAt"
    }
  }
});

Pattern 2: Query Optimization

// ✅ Use Query with specific partition key
await client.send(new QueryCommand({
  TableName: Resource.Database.name,
  KeyConditionExpression: "pk = :pk",
  ExpressionAttributeValues: { ":pk": "USER#123" }
}));

// ❌ Don't use Scan unless absolutely necessary
await client.send(new ScanCommand({
  TableName: Resource.Database.name
}));
// Scans entire table - expensive and slow!

Pattern 3: Batch Operations

// Write multiple items efficiently
import { BatchWriteCommand } from "@aws-sdk/lib-dynamodb";

// Batch up to 25 items per request
const batches = chunk(items, 25);

for (const batch of batches) {
  await client.send(new BatchWriteCommand({
    RequestItems: {
      [Resource.Database.name]: batch.map(item => ({
        PutRequest: { Item: item }
      }))
    }
  }));
}

Pattern 4: Projection Expressions

// Only fetch fields you need
await client.send(new GetCommand({
  TableName: Resource.Database.name,
  Key: { pk: "USER#123", sk: "PROFILE" },
  ProjectionExpression: "name, email" // Don't fetch everything
}));

Pattern 5: GSI Design

// Sparse indexes save cost
const table = new sst.aws.Dynamo("Database", {
  fields: {
    pk: "string",
    sk: "string",
    gsi1pk: "string", // Only set on items that need indexing
    gsi1sk: "string"
  },
  primaryIndex: { hashKey: "pk", rangeKey: "sk" },
  globalIndexes: {
    gsi1: {
      hashKey: "gsi1pk",
      rangeKey: "gsi1sk",
      projection: "keys_only" // Cheapest option
    }
  }
});

// Only active users have gsi1pk
{
  pk: "USER#123",
  sk: "PROFILE",
  status: "active",
  gsi1pk: "ACTIVE#USER", // Only active users
  gsi1sk: "USER#123"
}

S3 Optimization

Pattern 1: Bucket Configuration

const bucket = new sst.aws.Bucket("Uploads", {
  transform: {
    bucket: {
      // Lifecycle rules for cost savings
      lifecycleConfiguration: {
        rules: [
          {
            id: "archive-old-files",
            status: "Enabled",
            transitions: [
              {
                days: 30,
                storageClass: "INTELLIGENT_TIERING"
              },
              {
                days: 90,
                storageClass: "GLACIER"
              }
            ]
          },
          {
            id: "delete-temp-files",
            status: "Enabled",
            expiration: { days: 7 },
            filter: {
              prefix: "temp/"
            }
          }
        ]
      }
    }
  }
});

Pattern 2: Intelligent Tiering

// Automatically moves objects between access tiers
{
  storageClass: "INTELLIGENT_TIERING"
}

// Tiers:
// - Frequent Access (default)
// - Infrequent Access (30 days)
// - Archive Instant Access (90 days)
// - Archive Access (90+ days)
// - Deep Archive Access (180+ days)

Pattern 3: CloudFront for Static Assets

const cdn = new sst.aws.Router("CDN", {
  routes: {
    "/*": {
      bucket: bucket
    }
  },
  transform: {
    distribution: {
      defaultCacheBehavior: {
        compress: true, // Enable compression
        viewerProtocolPolicy: "redirect-to-https",
        cachePolicyId: "658327ea-f89d-4fab-a63d-7e88639e58f6" // CachingOptimized
      }
    }
  }
});

Pattern 4: Presigned URLs

import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
import { GetObjectCommand } from "@aws-sdk/client-s3";

// Generate time-limited URL
const url = await getSignedUrl(
  s3Client,
  new GetObjectCommand({
    Bucket: Resource.Uploads.name,
    Key: fileKey
  }),
  { expiresIn: 3600 } // 1 hour
);

// No Lambda invocation needed for downloads

API Gateway Optimization

Pattern 1: HTTP API vs REST API

// Use HTTP API (cheaper, faster)
new sst.aws.ApiGatewayV2("Api", {
  routes: {
    "GET /posts": "src/posts.list",
    "POST /posts": "src/posts.create"
  }
});

// HTTP API is 71% cheaper than REST API
// Same features for most use cases

Pattern 2: Response Caching

new sst.aws.ApiGatewayV2("Api", {
  routes: {
    "GET /posts": {
      function: "src/posts.list",
      // Cache at API Gateway level
      cache: {
        ttl: "5 minutes"
      }
    }
  }
});

Pattern 3: Request Validation

// Reject invalid requests early (before Lambda invocation)
new sst.aws.ApiGatewayV2("Api", {
  routes: {
    "POST /posts": {
      function: "src/posts.create",
      authorizer: "iam",
      // Validate request before invoking Lambda
    }
  }
});

Remix Optimization with SST

Pattern 1: Server Bundle Optimization

// remix.config.js
export default {
  serverBuildPath: "build/server/index.mjs",
  serverMinify: true,
  serverModuleFormat: "esm",
  // Don't bundle Node.js built-ins
  serverDependenciesToBundle: [
    /^(?!node:)/, // Bundle everything except node: imports
  ]
};

Pattern 2: Asset Optimization

const remix = new sst.aws.Remix("Web", {
  environment: {
    ASSET_URL: cdn.url // Serve assets from CloudFront
  },
  transform: {
    server: {
      // Optimize Lambda
      memory: "512 MB",
      architecture: "arm64"
    }
  }
});

Pattern 3: Edge Caching

// Use CloudFront for edge caching
export const headers = () => ({
  "Cache-Control": "public, max-age=3600, s-maxage=86400"
});

// Cache at edge for 24 hours
// Browser cache for 1 hour

Cost Monitoring

Pattern 1: Resource Tagging

new sst.aws.Function("Api", {
  handler: "src/api.handler",
  transform: {
    function: {
      tags: {
        Environment: $app.stage,
        Service: "api",
        CostCenter: "engineering"
      }
    }
  }
});

Pattern 2: Budget Alerts

// Use AWS Budgets to track costs
// Set up alerts when approaching limits
// Review CloudWatch metrics regularly

Pattern 3: Cost Allocation

// Tag all resources consistently
const tags = {
  Project: "my-app",
  Environment: $app.stage,
  Team: "engineering"
};

// Apply to all resources
new sst.aws.Function("Api", {
  transform: {
    function: { tags }
  }
});

Performance Monitoring

Pattern 1: X-Ray Tracing

new sst.aws.Function("Api", {
  handler: "src/api.handler",
  transform: {
    function: {
      tracingConfig: {
        mode: "Active" // Enable X-Ray tracing
      }
    }
  }
});

// In code
import { captureAWS } from "aws-xray-sdk-core";
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";

const client = captureAWS(new DynamoDBClient({}));

Pattern 2: CloudWatch Metrics

import { CloudWatchClient, PutMetricDataCommand } from "@aws-sdk/client-cloudwatch";

const cloudwatch = new CloudWatchClient({});

await cloudwatch.send(new PutMetricDataCommand({
  Namespace: "MyApp",
  MetricData: [{
    MetricName: "ProcessingTime",
    Value: duration,
    Unit: "Milliseconds"
  }]
}));

Environment-Specific Optimization

Pattern 1: Development Environment

if ($app.stage === "dev") {
  // Smaller, cheaper resources for dev
  new sst.aws.Function("Api", {
    memory: "256 MB",
    timeout: "10 seconds"
  });
}

Pattern 2: Production Environment

if ($app.stage === "production") {
  new sst.aws.Function("Api", {
    memory: "1024 MB",    // More resources
    timeout: "30 seconds",
    transform: {
      function: {
        reservedConcurrentExecutions: 10,
        pointInTimeRecovery: { enabled: true }
      }
    }
  });
}

Best Practices Checklist

Lambda Functions

  • Use ARM64 architecture
  • Minimize bundle size
  • Reuse connections
  • Set appropriate memory
  • Set appropriate timeout
  • Use environment variables for config

DynamoDB

  • Use single table design
  • Query instead of Scan
  • Use batch operations
  • Design GSIs carefully
  • Enable TTL for expiring data
  • Use projection expressions

S3

  • Set lifecycle policies
  • Use Intelligent Tiering
  • Enable CloudFront for static assets
  • Use presigned URLs
  • Compress files before upload

API Gateway

  • Use HTTP API over REST API
  • Enable response caching
  • Validate requests early
  • Use custom domains

Monitoring

  • Tag all resources
  • Set up CloudWatch alarms
  • Enable X-Ray tracing
  • Review Cost Explorer monthly
  • Set budget alerts

Cost Optimization Strategies

1. Right-Size Resources

Monitor and adjust:

# Check Lambda memory usage
# If max memory used < 60% of allocated, reduce

2. Use Reserved Capacity

For predictable workloads:

  • DynamoDB Reserved Capacity
  • Lambda Provisioned Concurrency
  • Savings Plans

3. Cleanup Unused Resources

# Regular audit
sst remove --stage old-feature

4. Optimize Data Transfer

  • Use CloudFront for global distribution
  • Keep data in same region
  • Use VPC endpoints for AWS services

Common Anti-Patterns

❌ Don't:

  • Over-provision memory "just in case"
  • Use Scan on large tables
  • Keep all data forever
  • Ignore CloudWatch metrics
  • Deploy to multiple regions unnecessarily
  • Use REST API when HTTP API works

✅ Do:

  • Start small, scale based on metrics
  • Use Query with partition keys
  • Set up lifecycle policies
  • Monitor and optimize regularly
  • Deploy to one region initially
  • Use HTTP API by default

Further Reading

平台分布

Codex

37.43%
按下载量换算30

Claude

27.73%
按下载量换算22

Cursor

20.43%
按下载量换算16

Gemini CLI

8.93%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills