Communitygithub.com

SST 技能

協助使用 SST 在 AWS 上建置與部署無伺服器全端應用程式。適用於定義 Lambda 函式、API Gateway 路由、DynamoDB 資料表、S3 儲存體,或將 Next.js / Remix / Astro 搭配 SSR 部署至 AWS。觸發詞:sst、serverless stack、sst dev、sst deploy、aws lambda、sst ion、資源連結。

SST 技能 是什麼?

此技能讓 AI 助手能夠引導開發者使用 SST(Serverless Stack)框架,在 AWS 上建置與部署無伺服器全端應用程式。其核心功能包括使用 `sst.config.ts` 定義基礎設施(如 `sst.aws.Function`、`sst.aws.Api`、`sst.aws.Bucket`、`sst.aws.Dynamo`),以及透過 `link` 屬性自動處理資源連結與 IAM 權限。技能強調運用 `sst dev` 進行即時本機開發,該工具連接真實 AWS 服務(DynamoDB、S3、SQS)並支援 VS Code 除錯中斷點。它也包含使用 `sst deploy --stage <stage>` 部署至指定階段(如生產環境 `prod` 或預覽環境 `pr-${PR_NUMBER}`),以及使用 `sst secret set` 管理加密階段特定機密。支援的前端框架包括 `sst.aws.Nextjs`、`sst.aws.Remix` 和 `sst.aws.Astro`,適用於將 SSR 應用程式部署至 Lambda,並將靜態資源置於 S3 搭配 CloudFront。此技能廣泛適用於 Claude Code、Cursor 或 Codex 等平台,適合建構無伺服器 API、具備隔離預覽環境的 Next.js 應用程式,以及上述組合的任何全端 AWS 專案。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/TerminalSkills/skills/tree/HEAD/skills/sst

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

SST

總覽

SST (Serverless Stack) 是一個用於在 AWS 上建置與部署全端應用程式的框架,提供針對 Lambda、API Gateway、DynamoDB、S3 以及前端框架的高階建構元件。其特色包括:連接真實 AWS 服務的即時本機開發、型別安全的資源連結,以及零設定的 TypeScript 支援。

指示

  • 定義基礎設施時,請使用 sst.config.ts 並搭配型別化元件,例如 sst.aws.Function、sst.aws.Api、sst.aws.Bucket 和 sst.aws.Dynamo。
  • 連接資源時,請在 Functions 上使用 link 屬性,以自動授予 IAM 權限並注入環境變數;在處理程式中則透過 Resource.Name 存取已連結的資源。
  • 進行本機開發時,請使用 sst dev,它會在連接到真實 AWS 服務 (DynamoDB、S3、SQS) 的同時,以熱重載方式在本機執行 Lambda,並支援 VS Code 中斷點除錯。
  • 進行部署時,使用 sst deploy --stage prod 代表命名階段,使用 sst deploy --stage pr-${PR_NUMBER} 代表預覽環境,並使用 sst remove --stage dev 進行資源刪除。
  • 部署前端時,請使用 sst.aws.Nextjs、sst.aws.Remix 或 sst.aws.Astro 元件,將 SSR 應用程式部署至 Lambda,並將靜態資源置於 S3 + CloudFront 上。
  • 管理機密時,使用 sst secret set KEY value 進行加密且階段特定的機密儲存。
  • 組織程式碼時,請將 packages/functions/ 中的處理程式保持輕量,作為協調者;並將商業邏輯置於 packages/core/ 中。

範例

範例 1:使用 DynamoDB 建置無伺服器 API

使用者要求:「在 AWS 上使用 SST 搭配 DynamoDB 建立 REST API」

動作:

  1. 在 sst.config.ts 中定義 DynamoDB 資料表和 API Gateway
  2. 將資料表連結至 API 處理函式,以自動處理權限
  3. 實作 CRUD 處理程式,並透過 Resource.MyTable.name 存取資源
  4. 執行 sst dev 以進行連接到真實 AWS 服務的即時本機開發

**輸出:**一個具備型別安全資源存取與即時除錯功能的無伺服器 REST API。

範例 2:使用預覽環境部署 Next.js 應用程式

使用者要求:「在 AWS 上為我的 Next.js 應用程式部署每個 PR 的隔離預覽環境」

動作:

  1. 設定 sst.aws.Nextjs 元件,搭配自訂網域和已連結的資源
  2. 在 CI 中設定對每個 Pull Request 執行 sst deploy --stage pr-${PR_NUMBER}
  3. 將後端資源 (API、資料庫) 連結至 Next.js 部署
  4. 在 PR 關閉時加入使用 sst remove 的清理步驟

**輸出:**一個在 AWS 上的生產級 Next.js 部署,為每個 PR 提供獨立的預覽環境。

指引

  • 使用 link 而非手動撰寫 IAM 政策;SST 會自動產生最低權限的權限設定。
  • 在處理程式中透過 Resource.Name 存取已連結的資源;切勿將資料表名稱或儲存體 ARN 寫死在程式碼中。
  • 日常開發請使用 sst dev;它比每次變更都重新部署至 AWS 更快。
  • 為每位開發者建立專屬階段 (例如 sst dev --stage alice),使每位開發者擁有隔離的 AWS 資源。
  • 保持處理程式輕量:商業邏輯置於 packages/core/,處理程式置於 packages/functions/。
  • API 金鑰和憑證請使用 sst secret;它們會經過加密且階段特定。
  • 在 CI 中針對每個 Pull Request 設定 sst deploy --stage pr-${PR_NUMBER},以建立預覽環境。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

TerminalSkills/skills

>- Run GitHub Actions locally with act. Use when a user asks to test GitHub Actions workflows locally, debug CI pipelines without pushing, or run workflows offline.

TerminalSkills/skills

>- You are an expert in AG2 (formerly AutoGen), the open-source multi-agent conversation framework. You help developers build systems where multiple AI agents collaborate through structured conversations — with tool use, human-in-the-loop, code execution, group chat orchestration, and nested conversations — for complex tasks like software development, research, and data analysis.

TerminalSkills/skills

>- Generate short-form videos with AI — script writing, text-to-speech narration, stock footage selection, subtitle generation, and video assembly. Use when: creating TikTok/YouTube Shorts/Reels content, automating video production, building content pipelines.

TerminalSkills/skills

>- Animate 3D objects and characters in Blender with Python. Use when the user wants to keyframe properties, create armatures and rigs, set up IK/FK chains, animate shape keys for facial animation, edit F-Curves, use the NLA editor to blend actions, add drivers for expression-based animation, or script any animation workflow in Blender.

TerminalSkills/skills

>- Automate motion capture and tracking workflows in Blender with Python. Use when the user wants to import BVH or FBX mocap data, retarget motion to armatures, track camera or object motion from video, solve camera motion, clean up motion capture data, or script any tracking pipeline in Blender.

TerminalSkills/skills

>- You are an expert in Bolt.new by StackBlitz, the AI-powered full-stack development environment that runs entirely in the browser. You help developers go from idea to deployed app in minutes using natural language prompts — Bolt generates complete applications with frontend, backend, database, and deployment, all running in a WebContainer without local setup.

TerminalSkills/skills

>- Assists with using Bun as an all-in-one JavaScript/TypeScript runtime, package manager, bundler, and test runner. Use when building HTTP servers, managing packages, running tests, or migrating from Node.js. Trigger words: bun, bun serve, bun install, bun test, bun build, javascript runtime, bun runtime.

TerminalSkills/skills

>- Self-host customer support with Chatwoot. Use when a user asks to set up open-source customer support, add live chat without SaaS costs, build a multi-channel inbox, or deploy a free Intercom alternative.

TerminalSkills/skills

>- You are an expert in Chi, the lightweight, idiomatic Go HTTP router built on `net/http`. You help developers build composable HTTP services using Chi's middleware stack, route groups, URL parameters, sub-routers, and context-based request scoping — providing Express-like ergonomics while staying 100% compatible with Go's standard library.

TerminalSkills/skills

When the user wants to edit, review, or improve existing marketing copy. Also use when the user mentions 'edit this copy,' 'review my copy,' 'copy feedback,' 'proofread,' 'polish this,' 'make this better,' or 'copy sweep.' This skill provides a systematic approach to editing marketing copy through multiple focused passes.

TerminalSkills/skills

>- Add live chat and customer support with Crisp. Use when a user asks to add a chat widget, implement live customer support, set up a help desk, create a knowledge base, or add a chatbot to a website.

TerminalSkills/skills

>- Assists with building custom interactive data visualizations using D3.js. Use when creating charts, graphs, maps, force layouts, or hierarchical diagrams that require fine-grained control beyond what charting libraries provide. Trigger words: d3, data visualization, chart, svg, scales, force graph, treemap, choropleth.

TerminalSkills/skills

dbt (data build tool) transforms data in your warehouse using SQL SELECT statements. Learn project setup, models, tests, documentation, incremental materializations, and integration with data warehouses like PostgreSQL, BigQuery, and Snowflake.

TerminalSkills/skills

>- You are an expert in dlt, the open-source Python library for building data pipelines. You help developers load data from any API, file, or database into warehouses and lakes using simple Python decorators — with automatic schema inference, incremental loading, and built-in data contracts. dlt is the "requests library for data pipelines.

TerminalSkills/skills

Data Version Control for ML projects. Track large datasets and models alongside Git, build reproducible ML pipelines, and run experiments with metric comparison. Works with any storage backend including S3, GCS, Azure, and local filesystems.

TerminalSkills/skills

>- You are an expert in E2B, the cloud platform for running AI-generated code in secure sandboxes. You help developers give AI agents the ability to execute code, install packages, read/write files, and run long processes in isolated cloud environments — each sandbox is a lightweight VM that boots in ~150ms with full Linux, filesystem, and networking.

TerminalSkills/skills

>- Transcode, convert, edit, and process audio and video with FFmpeg. Use when a user asks to convert video formats (webm to mp4, mkv to mp4), extract audio from video, compress video files, trim or cut clips, concatenate videos, add subtitles, create thumbnails, apply filters, change resolution or bitrate, re-encode media, create GIFs from video, add watermarks, normalize audio, stream media, or build automated media processing pipelines.

TerminalSkills/skills

>- Create advanced animations with GSAP. Use when building complex timelines, scroll-driven animations, SVG morphing, text animations, or high-performance web animations beyond CSS capabilities.

TerminalSkills/skills

>- Generate deterministic MP4 videos from HTML, CSS, media, and seekable animations using HeyGen's HyperFrames framework. Use when someone asks to "render HTML to video", "make a video with HyperFrames", "create a programmatic video", "turn an animation into MP4", "build a launch/product video from HTML", "render GSAP/Lottie/Three.js to video", or set up an agent-driven video pipeline. Covers init/preview/render/add/lint/inspect commands, data-* timing attributes, animation adapters, and the component catalog.

TerminalSkills/skills

When the user wants to perform load testing, stress testing, or performance testing of APIs and websites using k6. Also use when the user mentions "k6," "load test," "performance test," "stress test," "spike test," "soak test," "thresholds," "virtual users," or "VUs." For browser-based testing, see selenium.

相關技能