# Pattern Library

> 新機能の実装時に既存パターンの検索・適用、または新しい実装パターンの登録を行う場合に使用。アーキテクチャパターン、実装パターン、テストパターンを管理する。

- **Type:** Skill
- **Install:** `agentstack add skill-shioki-cursor-knowledge-management-system-pattern-library`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [shioki](https://agentstack.voostack.com/s/shioki)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [shioki](https://github.com/shioki)
- **Source:** https://github.com/shioki/Cursor-Knowledge-Management-System/tree/main/templates/.cursor/skills/pattern-library

## Install

```sh
agentstack add skill-shioki-cursor-knowledge-management-system-pattern-library
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# パターンライブラリ

プロジェクトで使用する実装パターン、設計パターン、テストパターンを管理・適用するスキルです。

## When to Use

- 新機能の実装前に既存パターンを確認したいとき
- 実装方法のベストプラクティスを知りたいとき
- 新しい実装パターンを登録したいとき
- リファクタリング時にパターンの統一を図りたいとき

## Instructions

### 1. 既存パターンの確認

まず `references/PATTERNS_TEMPLATE.md` を読み込み、登録済みパターンを確認してください。

### 2. パターンの分類

パターンは以下のカテゴリで管理します:

- **アーキテクチャパターン**: MVC/MVP/MVVM, Repository, Factory, Observer 等
- **実装パターン**: API呼び出し、エラーハンドリング、ログ出力、バリデーション等
- **テストパターン**: 単体テスト、統合テスト、E2Eテスト、モック活用等

### 3. パターンの記録テンプレート

新しいパターンを登録する場合は以下の形式で記録してください:

```markdown
## パターン名: [具体的な名前]

### 目的
- **解決する問題**:
- **適用場面**:
- **期待効果**:

### 実装例
\```[言語]
// コード例
\```

### 使用上の注意
- **制約事項**:
- **パフォーマンス影響**:
- **メンテナンス性**:

### 関連パターン
- **組み合わせ可能**:
- **代替パターン**:
```

### 4. パターンの追加

パターンを追加するには `scripts/add-pattern.sh` を実行できます:

```bash
bash .cursor/skills/pattern-library/scripts/add-pattern.sh "パターン名"
```

### 5. コマンドとの連携

ユーザーがパターンを登録したい場合は、`/add-pattern` コマンドの利用を案内してください。

### 6. パターン適用フロー

1. **要件分析**: 実装したい機能の要件を整理
2. **パターン検索**: PATTERNS_TEMPLATE.md で類似パターンを検索
3. **パターン選択**: 最適なパターンを選択・カスタマイズ
4. **実装・テスト**: パターンに基づいて実装
5. **フィードバック**: パターンの改善点を記録

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [shioki](https://github.com/shioki)
- **Source:** [shioki/Cursor-Knowledge-Management-System](https://github.com/shioki/Cursor-Knowledge-Management-System)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-shioki-cursor-knowledge-management-system-pattern-library
- Seller: https://agentstack.voostack.com/s/shioki
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
