MuharremTozan/Agentic-Duel / .agent/skills/unity-decorator-pattern
unity-decorator-pattern
VerifiedDynamically modify object behavior by wrapping. Perfect for buffs, debuffs, and stat calculations.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 723 B |
| assets/code/Decorator.cs.txt | markdown | 1.7 KB |
| references/guide.md | markdown | 1.7 KB |
SKILL.md
View on GitHub---
name: unity-decorator-pattern
description: Dynamically modify object behavior by wrapping. Perfect for buffs, debuffs, and stat calculations.
---
# Unity Decorator Pattern
Minimal decorator pattern for stat modification.
## Core Features
1. **Generic Interface**: `IDecorator<T>` for any value type
2. **Stat Modifiers**: Percentage and flat modifications
3. **Composable**: Stack multiple decorators
## Core Files (1 file)
- `Decorator.cs.txt`: Complete decorator pattern (interface + base + modifiers)
## Usage
```csharp
IDecorator<float> damage = new BaseStat(100);
damage = new PercentageModifier(damage, 0.2f); // +20%
damage = new FlatModifier(damage, 10); // +10
float final = damage.GetValue(); // 130
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |