Przejdź do treści
Biblioteka skilli
Programowanie · Pisanie

write-design-pattern

/write-design-pattern

Pisze wpis katalogu wzorców projektowych: opisuje wzorzec i jego zastosowanie po refaktoryzacji albo na prośbę.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Pisze wpis katalogu wzorców projektowych: opisuje wzorzec i jego zastosowanie po refaktoryzacji albo na prośbę.

Oryginalny opis (EN)

Write a design pattern catalog entry. Use when the user asks to document a design pattern, add a pattern to the catalog, or after a refactoring session identifies a reusable pattern.

Jak działa

  1. Steps
  2. Guidelines
Sekcje z nagłówków SKILL.md, w oryginale · 50 linii, 337 słów
Podgląd SKILL.md
---
name: write-design-pattern
description: Write a design pattern catalog entry. Use when the user asks to document a design pattern, add a pattern to the catalog, or after a refactoring session identifies a reusable pattern.
user-invokable: true
---

# Design Pattern Catalog Entry

Create or update a pattern entry in `design-pattern-catalog/<category>/<pattern-name>.md`.

## Steps

1. **Determine category and name** — use AskUserQuestion if not clear from context. Use kebab-case for the pattern name. Category examples: `commands`, `testing`, `architecture`.

2. **Read existing entries** — check `design-pattern-catalog/` for existing entries to maintain consistency in structure and tone.

3. **Write the entry** — `design-pattern-catalog/<category>/<pattern-name>.md` with these sections:

### `# Pattern Name`

### `## Problem`
State the general principle, not a specific symptom. 1-2 sentences. Specific examples belong in later sections.

### `## Structure` or `## Example`
Choose the appropriate section based on the pattern type:

**Use `## Structure`** for patterns that define collaborating elements (e.g., Command + Assembler):
A table of key elements, their files, and responsibilities. Lead each row with the key element, not the filename.

| Key Element | File | Responsibility |
|-------------|------|---------------|
| ... | `...` | ... |

#### `### Reference implementation` (within Structure)
Bullet list of symbols and their files. Format: `SymbolName` in `path/to/file.py`. No line numbers — they're too unstable.

**Use `## Example`** for patterns about code organization or refactoring, with `### Before` and `### After` subsections showing the concrete change.

### `## Testing Strategies` (when applicable)
One subsection per strategy. Each starts with **What is tested:** naming the specific element under test. Include example references as `path/to/test_file.py` — `test_function_name`.

### `## When to Apply`
Bullet list of conditions where the pattern is appropriate.

### `## Key Principles`
Bullet list of bold-titled principles. These are the memorable takeaways.

## Guidelines

- **No code samples** — reference files and symbols instead; the catalog points to living code, not duplicated snippets
- **No line numbers** — use `path/to/file` — `symbol_name` format for references
- **Lead with the key element** — in tables and bullet lists, put the symbol/concept first, then the file
- **Testing strategies name what is tested** — each strategy starts with the specific class or function under test
- **Concise** — a catalog entry is a reference guide, not a tutorial

Wersje

W bazie nie ma innych skilli o nazwie write-design-pattern.

Migawka bazy z 13.11.2026 · wersja paczki 89fbb05fe193 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100design-patterns
    Rozpoznaje, implementuje i refaktoryzuje kod według standardowych wzorców projektowych (GoF i nowoczesnych), takich jak strategy, observer, factory i singleton.
  • 100design-pattern-implementation
    Przegląda użycie wzorców projektowych w bazie kodu, ich nadużycia i miejsca, gdzie wzorce by pomogły, przy ocenie architektury i nadmiernej inżynierii.
  • 100code-pattern-extractor
    Analizuje bazy kodu pod kątem powtarzalnych wzorców, duplikacji i wzorców implementacji i tworzy katalogi wzorców, sugestie refaktoryzacji i szablony kodu do ponownego użycia.
  • 100authoring-patterns
    Zamienia zwalidowane szablony z playground lub kompozycje HTML w wielokrotnego użytku pliki wzorców (*.examples.ts) w bibliotece wzorców.
  • 100python-refactoring
    Porządkuje kod Python według katalogu 83 wzorców refaktoryzacji, z przykładami przed i po zmianie.
  • 90learn-pattern
    Zapisuje nowy wzorzec błędu i jego poprawkę w pamięci, by rozpoznawać go przy kolejnych alertach i awariach produkcji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.