Token导航 LogoToken导航

Agent Skill · 前端设计

use-case-authoring(用例创作)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

use-case-authoring 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证为 MIT,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 7,824。

总安装 339周安装 14GitHub Stars 61下载 111核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:use-case-authoring(用例创作)
来源仓库:https://github.com/melodic-software/claude-code-plugins
仓库路径:skills/use-case-authoring
安装命令:
npx skills add https://github.com/melodic-software/claude-code-plugins --skill use-case-authoring
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/melodic-software/claude-code-plugins --skill use-case-authoring

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

该技能用于辅助前端页面、组件、样式和交互逻辑的开发与维护。适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码。可在 Codex、Claude、Cursor、Gemini CLI 等宿主环境中使用。通过 npx skills add 命令从指定 GitHub 仓库安装。

使用时需结合项目现有设计系统,避免生成孤立片段。

来源仓库内路径:skills/use-case-authoring

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

use-case-authoring 怎么安装?

在终端执行 npx skills add https://github.com/melodic-software/claude-code-plugins --skill use-case-au…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

use-case-authoring 支持哪些 AI 工具?

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

use-case-authoring 需要什么权限?

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

use-case-authoring 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

use-case-authoring 用的人多吗?

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

use-case-authoring 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

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

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
use-case-authoring

用例创作 · 本页

33961调用外部服务MIT有提醒

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

SKILL.md 原文

Use Case Authoring Skill

Use Case 2.0 methodology for capturing functional requirements and documenting actor-system interactions.

MANDATORY: Documentation-First Approach

Before authoring use cases:

  1. Invoke docs-management skill for requirements patterns
  2. Verify Use Case 2.0 methodology via MCP servers
  3. Base all guidance on Ivar Jacobson's Use Case 2.0

Use Case 2.0 Overview

Use Case 2.0 is a scalable, agile practice for capturing requirements:

AspectDescription
LightweightStart minimal, elaborate as needed
ScalableWorks for small and large systems
Agile-FriendlySupports iterative development
TraceableLinks to tests and implementation

Use Case Structure

Use Case Specification Template

# Use Case: Submit Order

**ID:** UC-ORD-001
**Version:** 1.2
**Author:** System Analyst

## Brief Description
Customer submits a draft order for processing, triggering inventory reservation and payment processing.

## Actors
| Actor | Type | Description |
|-------|------|-------------|
| Customer | Primary | Person placing the order |
| Payment Gateway | Supporting | External payment processor |
| Inventory System | Supporting | Manages product stock |

## Preconditions
1. Customer is authenticated
2. Order exists in Draft status
3. Order contains at least one item
4. Customer has valid payment method on file

## Postconditions
### Success Postconditions
1. Order status changed to Submitted
2. Inventory reserved for all items
3. Payment authorization obtained
4. Confirmation notification sent to customer

### Failure Postconditions
1. Order remains in Draft status
2. No inventory changes made
3. Customer notified of failure reason

## Basic Flow (Happy Path)

| Step | Actor | System |
|------|-------|--------|
| 1 | Customer selects "Submit Order" | |
| 2 | | System validates order contents |
| 3 | | System checks inventory availability |
| 4 | | System reserves inventory for all items |
| 5 | | System calculates order total (subtotal + tax + shipping) |
| 6 | | System requests payment authorization from Payment Gateway |
| 7 | | Payment Gateway authorizes payment |
| 8 | | System updates order status to Submitted |
| 9 | | System sends confirmation email to Customer |
| 10 | | System displays order confirmation page |

## Alternative Flows

### AF1: Partial Inventory Available
**Trigger:** Step 3 - Some items unavailable
| Step | Actor | System |
|------|-------|--------|
| 3a | | System identifies unavailable items |
| 3b | | System displays unavailable items to Customer |
| 3c | Customer chooses: Remove items / Wait for restock / Cancel | |
| 3d | | If remove: System updates order, returns to step 3 |
| 3e | | If wait: System creates backorder, continues to step 4 |
| 3f | | If cancel: End use case (order unchanged) |

### AF2: Payment Declined
**Trigger:** Step 7 - Payment authorization fails
| Step | Actor | System |
|------|-------|--------|
| 7a | | Payment Gateway returns decline reason |
| 7b | | System releases reserved inventory |
| 7c | | System displays payment error to Customer |
| 7d | Customer updates payment method | |
| 7e | | System returns to step 6 |
| 7f | | After 3 failed attempts: End use case (Failure) |

### AF3: Customer Cancels
**Trigger:** Any step - Customer clicks Cancel
| Step | Actor | System |
|------|-------|--------|
| *a | Customer selects "Cancel" | |
| *b | | System releases any reserved inventory |
| *c | | System returns to order details page |
| *d | | End use case (order remains Draft) |

## Exception Flows

### EF1: System Unavailable
**Trigger:** Any step - System component unreachable
| Step | System |
|------|--------|
| 1 | System detects component unavailability |
| 2 | System logs error with correlation ID |
| 3 | System displays "Service temporarily unavailable" message |
| 4 | System suggests retry in 5 minutes |
| 5 | End use case |

### EF2: Session Timeout
**Trigger:** Any step - Customer session expires
| Step | System |
|------|--------|
| 1 | System detects expired session |
| 2 | System saves order state (if possible) |
| 3 | System redirects to login page |
| 4 | After re-login: Resume at last completed step |

## Business Rules
| ID | Rule |
|----|------|
| BR-001 | Order must contain at least one item |
| BR-002 | All items must have positive quantity |
| BR-003 | Payment authorization must be obtained before status change |
| BR-004 | Inventory must be reserved atomically (all or none) |
| BR-005 | Confirmation email must be sent within 30 seconds |

## Non-Functional Requirements
| ID | Category | Requirement |
|----|----------|-------------|
| NFR-001 | Performance | Order submission completes within 3 seconds (p95) |
| NFR-002 | Availability | Service available 99.9% of time |
| NFR-003 | Scalability | Support 1000 concurrent submissions |
| NFR-004 | Security | All payment data encrypted in transit |

## UI Mockups / Wireframes
- Order Summary Page: [Link to mockup]
- Payment Confirmation: [Link to mockup]
- Error States: [Link to mockup]

## Related Use Cases
| Use Case | Relationship |
|----------|--------------|
| UC-ORD-002: Cancel Order | Extension |
| UC-PAY-001: Process Payment | Include |
| UC-INV-001: Reserve Inventory | Include |
| UC-NOT-001: Send Notification | Include |

## Test Scenarios
| Scenario ID | Description | Steps Covered |
|-------------|-------------|---------------|
| TS-001 | Happy path submission | Basic Flow 1-10 |
| TS-002 | Partial inventory | AF1 |
| TS-003 | Payment decline and retry | AF2 |
| TS-004 | Customer cancellation | AF3 |
| TS-005 | Session timeout recovery | EF2 |

## Revision History
| Version | Date | Author | Changes |
|---------|------|--------|---------|
| 1.0 | 2025-01-01 | J. Smith | Initial version |
| 1.1 | 2025-01-10 | J. Smith | Added AF2 payment retry logic |
| 1.2 | 2025-01-15 | M. Jones | Added NFR-003 scalability requirement |

Use Case Diagram

PlantUML Syntax

@startuml
left to right direction
skinparam packageStyle rectangle

actor Customer
actor "Payment Gateway" as PG <<system>>
actor "Inventory System" as INV <<system>>

rectangle "Order Management System" {
    usecase "Browse Products" as UC1
    usecase "Add to Cart" as UC2
    usecase "View Cart" as UC3
    usecase "Submit Order" as UC4
    usecase "Track Order" as UC5
    usecase "Cancel Order" as UC6
    usecase "Request Refund" as UC7

    usecase "Process Payment" as UC_PAY
    usecase "Reserve Inventory" as UC_INV
    usecase "Send Notification" as UC_NOT
}

Customer --> UC1
Customer --> UC2
Customer --> UC3
Customer --> UC4
Customer --> UC5
Customer --> UC6
Customer --> UC7

UC4 ..> UC_PAY : <<include>>
UC4 ..> UC_INV : <<include>>
UC4 ..> UC_NOT : <<include>>

UC6 ..> UC4 : <<extend>>\n{order submitted}
UC7 ..> UC5 : <<extend>>\n{order delivered}

UC_PAY --> PG
UC_INV --> INV

@enduml

Mermaid Syntax

graph LR
    subgraph Actors
        C[Customer]
        PG[Payment Gateway]
        INV[Inventory System]
    end

    subgraph "Order Management System"
        UC1[Browse Products]
        UC2[Add to Cart]
        UC3[View Cart]
        UC4[Submit Order]
        UC5[Track Order]
        UC6[Cancel Order]

        UC_PAY[Process Payment]
        UC_INV[Reserve Inventory]
    end

    C --> UC1
    C --> UC2
    C --> UC3
    C --> UC4
    C --> UC5
    C --> UC6

    UC4 -.->|include| UC_PAY
    UC4 -.->|include| UC_INV
    UC6 -.->|extend| UC4

    UC_PAY --> PG
    UC_INV --> INV

Use Case Slices

Use Case 2.0 introduces slices for incremental implementation:

Slice Definition

# Use Case Slice: Submit Order - Basic Flow

**Use Case:** UC-ORD-001: Submit Order
**Slice ID:** UC-ORD-001-S01
**Priority:** High
**Sprint:** Sprint 3

## Scope
This slice implements the basic happy path for order submission without alternative flows.

## Flows Included
- Basic Flow: Steps 1-10

## Flows Excluded (Future Slices)
- AF1: Partial Inventory (Slice S02)
- AF2: Payment Declined (Slice S02)
- AF3: Customer Cancels (Slice S03)

## Acceptance Criteria

Feature: Submit Order - Basic Flow

Scenario: Successfully submit a valid order Given I am logged in as a customer And I have a draft order with 2 items And all items are in stock And I have a valid payment method When I click "Submit Order" Then my order status should be "Submitted" And I should receive a confirmation email And I should see the confirmation page

Stories

Story IDDescriptionPoints
US-301As a customer, I want to submit my order5
US-302As a customer, I want confirmation after submission2
US-303As the system, I need to reserve inventory3

## Actor Catalog

Actor Catalog

Human Actors

Customer

Description: End user who browses products and places orders Goals:

  • Find products quickly
  • Complete purchases efficiently
  • Track order status
  • Get support when needed

Characteristics:

  • May have varying technical proficiency
  • Expects responsive, intuitive interface
  • Values order status transparency

Administrator

Description: System operator who manages platform configuration Goals:

  • Configure system settings
  • Monitor system health
  • Manage user accounts
  • Generate reports

System Actors

Payment Gateway

Type: External System Description: Third-party payment processor (Stripe, PayPal) Interface: REST API Interactions:

  • Authorize payments
  • Capture payments
  • Process refunds

Inventory System

Type: External System Description: Warehouse management system Interface: Message Queue (RabbitMQ) Interactions:

  • Check availability
  • Reserve inventory
  • Release inventory
  • Confirm shipment

Notification Service

Type: Internal System Description: Email and SMS notification dispatcher Interface: Internal API Interactions:

  • Send confirmation emails
  • Send shipping updates
  • Send promotional messages

## C# Implementation Mapping

// Use Case to Application Service mapping public interface ISubmitOrderUseCase { /// <summary> /// Executes UC-ORD-001: Submit Order /// </summary> /// <remarks> /// Basic Flow: Steps 1-10 /// Preconditions: Customer authenticated, order in Draft, has items /// Postconditions: Order Submitted, inventory reserved, payment authorized /// </remarks> Task<Result<OrderConfirmation>> ExecuteAsync( SubmitOrderCommand command, CancellationToken ct = default); }

public sealed class SubmitOrderUseCase : ISubmitOrderUseCase { private readonly IOrderRepository _orders; private readonly IInventoryService _inventory; private readonly IPaymentGateway _payments; private readonly INotificationService _notifications; private readonly ILogger<SubmitOrderUseCase> _logger;

public SubmitOrderUseCase( IOrderRepository orders, IInventoryService inventory, IPaymentGateway payments, INotificationService notifications, ILogger<SubmitOrderUseCase> logger) { _orders = orders; _inventory = inventory; _payments = payments; _notifications = notifications; _logger = logger; }

public async Task<Result<OrderConfirmation>> ExecuteAsync( SubmitOrderCommand command, CancellationToken ct = default) { // Step 2: Validate order contents var order = await _orders.GetByIdAsync(command.OrderId, ct); if (order is null) return Result.Failure<OrderConfirmation>("Order not found");

var validationResult = ValidateOrder(order); if (validationResult.IsFailure) return validationResult.ToResult<OrderConfirmation>();

// Step 3-4: Check and reserve inventory var inventoryResult = await _inventory.ReserveAsync(order.Items, ct); if (inventoryResult.IsFailure) return HandlePartialInventory(order, inventoryResult); // AF1

try { // Step 5-7: Process payment var paymentResult = await _payments.AuthorizeAsync( order.CustomerId, order.CalculateTotal(), ct);

if (paymentResult.IsFailure) { await _inventory.ReleaseAsync(order.Items, ct); // AF2 step 7b return HandlePaymentFailure(order, paymentResult); }

// Step 8: Update order status order.Submit(paymentResult.Value.AuthorizationCode); await _orders.UpdateAsync(order, ct);

// Step 9: Send confirmation await _notifications.SendOrderConfirmationAsync(order, ct);

// Step 10: Return confirmation return Result.Success(new OrderConfirmation( order.Id, order.Status, order.CalculateTotal(), DateTimeOffset.UtcNow)); } catch (Exception ex) { // EF1: System unavailable _logger.LogError(ex, "Order submission failed for {OrderId}", order.Id); await _inventory.ReleaseAsync(order.Items, ct); return Result.Failure<OrderConfirmation>("Service temporarily unavailable"); } }

private Result ValidateOrder(Order order) { // BR-001: Order must contain at least one item if (!order.Items.Any()) return Result.Failure("Order must contain at least one item");

// BR-002: All items must have positive quantity if (order.Items.Any(i => i.Quantity <= 0)) return Result.Failure("All items must have positive quantity");

// Precondition: Order in Draft status if (order.Status != OrderStatus.Draft) return Result.Failure("Only draft orders can be submitted");

return Result.Success(); }

private Result<OrderConfirmation> HandlePartialInventory( Order order, Result inventoryResult) { // AF1: Partial inventory handling // In full implementation, would return structured error with unavailable items return Result.Failure<OrderConfirmation>( $"Some items are unavailable: {inventoryResult.Error}"); }

private Result<OrderConfirmation> HandlePaymentFailure( Order order, Result paymentResult) { // AF2: Payment declined return Result.Failure<OrderConfirmation>( $"Payment declined: {paymentResult.Error}"); } }

// Command object public sealed record SubmitOrderCommand( Guid OrderId, Guid CustomerId);

// Response object public sealed record OrderConfirmation( Guid OrderId, OrderStatus Status, Money Total, DateTimeOffset SubmittedAt);


## Relationship Types

| Relationship | Symbol | Description |
| --- | --- | --- |
| **Include** | `<<include>>` | Base UC always includes target UC |
| **Extend** | `<<extend>>` | Extension UC optionally extends base |
| **Generalization** | Arrow | Specialized UC inherits from general |

### When to Use Each

Include: Common behavior extracted (e.g., authentication)

  • "Submit Order" includes "Authenticate User"
  • Always happens, not optional

Extend: Optional/conditional behavior

  • "Cancel Order" extends "View Order" (only when status allows)
  • "Apply Coupon" extends "Checkout" (only if customer has coupon)

Generalization: Specialized versions

  • "Pay with Credit Card" specializes "Process Payment"
  • "Pay with PayPal" specializes "Process Payment"

## Workflow

When authoring use cases:

1. **Identify Actors**: Who interacts with the system?
2. **Define System Boundary**: What's in/out of scope?
3. **List Use Cases**: What goals do actors achieve?
4. **Write Brief Descriptions**: One-sentence summaries
5. **Elaborate Flows**: Basic flow first, then alternatives
6. **Define Preconditions/Postconditions**: State changes
7. **Identify Business Rules**: Constraints and policies
8. **Create Slices**: Prioritize incremental delivery
9. **Map to Tests**: Acceptance criteria and scenarios

## Best Practices

1. **User-Centric**: Write from actor's perspective
2. **Goal-Oriented**: Each use case achieves a goal
3. **Technology-Agnostic**: Describe what, not how
4. **Testable**: Clear acceptance criteria
5. **Incremental**: Use slices for agile delivery
6. **Traceable**: Link to requirements and tests

## References

For detailed guidance:

---

**Last Updated:** 2025-12-26

平台分布

OpenCode

28.38%
按下载量换算32

trae

24.61%
按下载量换算27

Antigravity

16.93%
按下载量换算19

windsurf

12.99%
按下载量换算14

Claude Code

6.99%
按下载量换算8

Codex

3.73%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

调用外部服务

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills