skills/pattern-transfer/SKILL.md
Recognizes problem classes and transfers proven solutions across domains. ALWAYS trigger on "I've seen this before", "this is like X but in Y", "there must be a pattern", "how do I do X in Y", "equivalent of", "similar to", "same concept", "translate this approach", "port this to", "cross-language", "idiomatic way". Use when encountering familiar problems in unfamiliar contexts or applying concepts across languages/frameworks. Different from code-reading which builds mental models of existing code -- this skill maps known solutions to new domains.
npx skillsauth add aj-geddes/unicorn-team pattern-transferInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ask: "What CATEGORY of problem is this?"
| Surface Symptom | Core Problem Class | |-----------------|-------------------| | Notify components when data changes | State observation | | Multiple async operations need coordination | Async orchestration | | Expensive computation called repeatedly | Caching | | Too many requests overload system | Rate limiting | | Operation fails sometimes | Retry/resilience | | Transform collection of data | Data transformation |
Ask: "Where have I encountered this problem class before?"
Map all known manifestations across languages, frameworks, and infrastructure layers.
Ask: "What's the ESSENCE?" Strip language-specific syntax down to core steps.
Example -- State Management ESSENCE:
1. Central state container
2. Controlled mutation mechanism
3. Change notification system
4. Subscriber registration/unregistration
Ask: "How is this done HERE?" Translate essence into target domain's conventions, best practices, libraries, and naming.
| Pattern Class | Problem | Key Implementations | |--------------|---------|---------------------| | State Management | Shared changing data | Redux, databases, event sourcing | | Async Coordination | Multiple async operations | Promises, asyncio, goroutines | | Caching | Expensive repeated operations | Memoization, Redis, HTTP cache | | Rate Limiting | Prevent resource exhaustion | Token bucket, sliding window | | Retry/Resilience | Handle transient failures | Backoff, circuit breaker | | Data Transformation | Reshape data | Map/filter/reduce, pipes, LINQ |
See references/pattern-catalog.md for detailed essence, manifestations, and transfer examples.
Remove language-specific details. Find core idea as numbered steps.
How does target language/framework express this? What libraries exist? What conventions apply?
Implement using local conventions. Verify it solves the original problem, not a distorted version.
Classification:
Recall:
Extraction:
Adaptation:
Verification:
| Anti-Pattern | Symptom | Instead | |-------------|---------|---------| | Pattern obsession | SingletonFactoryStrategyAdapter | Solve the actual problem simply | | Inappropriate transfer | OOP patterns in functional languages | Use target paradigm's strengths | | Cargo cult | "Saw Redux in tutorial, using everywhere" | Match tool to actual complexity | | Premature abstraction | Extracting pattern from 1 use case | Wait for 2+ use cases |
| When You See | Pattern | Implementations | |--------------|---------|----------------| | Notify on change | Observer | Events, hooks, pub/sub, triggers | | Swap behavior | Strategy | Polymorphism, functions, DI | | Add features | Decorator | @decorator, HOC, annotations | | Expensive operation | Memoization | Cache, React.memo, materialized views | | Too many requests | Rate Limit | Token bucket, throttle, semaphore | | Transient failures | Retry | Backoff, circuit breaker, timeout | | Object creation | Builder | Fluent API, config object | | Single access | Singleton | Module pattern, DI, constants | | Undo/redo | Command | Event sourcing, action history | | Transform pipeline | Chain | Streams, LINQ, pipes, map/reduce |
| Skill | Integration | |-------|------------| | Code Reading | Recognize patterns in unfamiliar codebases faster | | Estimation | Known patterns have known complexity | | Language Learning | Map known patterns to new language idioms | | Debugging | Pattern violations often indicate bugs |
See references/transfer-examples.md for multi-scale examples and practice exercises.
development
Guides the user through test-first development and test strategy decisions. ALWAYS trigger on "write tests", "TDD", "test coverage", "mock", "test fails", "flaky test", "how to test", "unit test", "integration test", "e2e test", "test structure", "what to test", "test organization", "coverage report", "testing strategy", "arrange act assert". Use when writing new tests, choosing test types, setting up mocking, debugging flaky tests, improving coverage, or designing testable code. Different from qa-security agent which focuses on code review and security audits rather than test authoring.
development
Guides deliberate management of technical debt: recognition, tracking, prioritization, and paydown. ALWAYS trigger on "technical debt", "code shortcut", "pay down debt", "debt tracking", "just for now", "temporary hack", "hardcoded value", "copy-paste code", "missing tests", "TODO cleanup", "refactor plan", "debt priority", "interest cost", "boy scout rule", "code quality backlog". Use when taking a shortcut, discovering suboptimal code, planning debt paydown, or quantifying ongoing cost of compromises.
development
Guides the user through systematic pre-commit quality verification. ALWAYS trigger on "review my code", "check my work", "before commit", "self-review", "quality check", "am I ready to commit", "pre-commit review", "code quality", "verify my changes", "sanity check", "review before merge", "is this ready". Use before any commit, merge, or code review submission.
development
Guides secure development using defense-in-depth and attacker's mindset. ALWAYS trigger on "security review", "vulnerability", "authentication", "authorization", "input validation", "XSS", "SQL injection", "CSRF", "secrets management", "OWASP", "threat model", "security scan", "path traversal", "mass assignment", "privilege escalation", "security headers", "bandit", "dependency audit", "hardening". Use when implementing auth, handling user input, storing secrets, reviewing code for vulnerabilities, or preparing for production deployment. Different from devops skill which covers infrastructure; this covers application-level security patterns.