Token导航 LogoToken导航TokenDH.com
前端设计external-servicegithub未标认证来源可访问许可证需确认审计通过

stack-architecture堆栈架构

Agent Skill

stack-architecture 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

218

周安装

9

GitHub Stars

26

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/outfitter-dev/agents --skill stack-architecture

简介

用于处理 GitHub 仓库与代码协作相关信息。

  • 适合在 Agent 需要围绕仓库状态进行整理时使用。
  • 可结合原始 README 继续核验具体功能细节。
  • 安装前需确认权限范围与维护状态。stack-architecture 属于前端设计类 Skill,可作为该场景下的辅助能力补充。
  • 不建议直接执行写入操作或修改协作流程。

SKILL.md

Stack Architecture Design

Design transport-agnostic handler systems with proper Result types and error taxonomy.

Process

Step 1: Understand Requirements

Gather information about:

  • Transport surfaces — CLI, MCP, HTTP, or all?
  • Domain operations — What actions does the system perform?
  • Failure modes — What can go wrong? (maps to error taxonomy)
  • External dependencies — APIs, databases, file system?

Step 2: Design Handler Layer

For each domain operation:

  1. Define input type (Zod schema)
  2. Define output type
  3. Identify possible error types (from taxonomy)
  4. Write handler signature: Handler<Input, Output, Error1 | Error2>

Example:

// Input schema
const CreateUserInputSchema = z.object({
  email: z.string().email(),
  name: z.string().min(1),
});

// Output type
interface User {
  id: string;
  email: string;
  name: string;
}

// Handler signature
const createUser: Handler<unknown, User, ValidationError | ConflictError>;

Step 3: Map Errors to Taxonomy

Map domain errors to the 10 categories:

Domain ErrorStack CategoryError Class
Not foundnot_foundNotFoundError
Invalid inputvalidationValidationError
Already existsconflictConflictError
No permissionpermissionPermissionError
Auth requiredauthAuthError
Timed outtimeoutTimeoutError
Connection failednetworkNetworkError
Limit exceededrate_limitRateLimitError
Bug/unexpectedinternalInternalError
User cancelledcancelledCancelledError

Step 4: Choose Packages

Packages are organized into three tiers:

Package Tiers

┌─────────────────────────────────────────────────────────────────┐
│                        TOOLING TIER                              │
│  Build-time, dev-time, test-time packages                       │
│  @outfitter/testing                                             │
└─────────────────────────────────────────────────────────────────┘
                              ▲
                              │ depends on
┌─────────────────────────────────────────────────────────────────┐
│                        RUNTIME TIER                              │
│  Application-specific packages for different deployment targets  │
│  @outfitter/cli    @outfitter/mcp    @outfitter/daemon          │
│  @outfitter/config @outfitter/logging @outfitter/file-ops       │
│  @outfitter/state                                               │
└─────────────────────────────────────────────────────────────────┘
                              ▲
                              │ depends on
┌─────────────────────────────────────────────────────────────────┐
│                       FOUNDATION TIER                            │
│  Zero-runtime-dependency core packages                          │
│  @outfitter/contracts    @outfitter/types                       │
└─────────────────────────────────────────────────────────────────┘
TierPackagesDependency Rule
Foundationcontracts, typesNo @outfitter/* deps
Runtimecli, mcp, daemon, config, logging, file-ops, stateMay depend on Foundation
ToolingtestingMay depend on Foundation + Runtime

Package Selection

PackagePurposeWhen to Use
@outfitter/contractsResult types, errors, Handler contractAlways (foundation)
@outfitter/typesType utilities, collection helpersType manipulation
@outfitter/cliCLI commands, output modes, formattingCLI applications
@outfitter/mcpMCP server, tool registrationAI agent tools
@outfitter/configXDG paths, config loadingConfiguration needed
@outfitter/loggingStructured logging, redactionLogging needed
@outfitter/daemonBackground services, IPCLong-running services
@outfitter/file-opsSecure paths, atomic writes, lockingFile operations
@outfitter/statePagination, cursor statePaginated data
@outfitter/testingTest harnesses, fixturesTesting

Selection criteria:

  • All projects need @outfitter/contracts (foundation)
  • CLI applications add @outfitter/cli (includes UI components)
  • MCP servers add @outfitter/mcp
  • File operations need both @outfitter/config (paths) and @outfitter/file-ops (safety)

Step 5: Design Context Flow

Determine:

  • Entry points — Where is context created? (CLI main, MCP server, HTTP handler)
  • Context contents — Logger, config, signal, workspaceRoot
  • Tracing — How requestId flows through operations

Output Templates

Architecture Overview

Project: {PROJECT_NAME}
Transport Surfaces: {CLI | MCP | HTTP | ...}

Directory Structure:
├── src/
│   ├── handlers/           # Transport-agnostic business logic
│   │   ├── {handler-1}.ts
│   │   └── {handler-2}.ts
│   ├── commands/           # CLI adapter (if CLI)
│   ├── tools/              # MCP adapter (if MCP)
│   └── index.ts            # Entry point
└── tests/
    └── handlers/           # Handler tests

Dependencies:
├── @outfitter/contracts    # Foundation (always)
├── @outfitter/{package-2}  # {reason}
└── @outfitter/{package-3}  # {reason}

Handler Inventory

HandlerInputOutputErrorsDescription
getUserGetUserInputUserNotFoundErrorFetch user by ID
createUserCreateUserInputUserValidationError, ConflictErrorCreate new user
deleteUserDeleteUserInputvoidNotFoundError, PermissionErrorRemove user

Error Strategy

Domain Errors → Stack Taxonomy:

{domain-error-1} → {stack-category} ({ErrorClass})
  - When: {condition}
  - Exit code: {code}

{domain-error-2} → {stack-category} ({ErrorClass})
  - When: {condition}
  - Exit code: {code}

Implementation Order

  1. Foundation — Install packages, create types
  2. Core handlers — Implement business logic with tests
  3. Transport adapters — Wire up CLI/MCP/HTTP
  4. Testing — Integration tests across transports

Constraints

Always:

  • Recommend Result types over exceptions
  • Map domain errors to taxonomy categories
  • Design handlers as pure functions (input, context) → Result
  • Consider all transport surfaces upfront
  • Include error types in handler signatures

Never:

  • Suggest throwing exceptions
  • Design transport-specific logic in handlers
  • Recommend hardcoded paths
  • Skip error type planning
  • Couple handlers to specific transports

Related Skills

  • outfitter-stack:stack-patterns — Reference for all patterns
  • outfitter:tdd — TDD implementation methodology
  • outfitter-stack:stack-templates — Templates for components

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.01%
按下载量换算23

Claude

31.49%
按下载量换算22

Cursor

19.13%
按下载量换算14

Gemini CLI

9.41%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills