Extract project-specific patterns from Umbraco codebases to generate AI-enhancing skills.
Extracts Umbraco-specific coding patterns from codebases to generate AI-enhancing skills.
/plugin marketplace add twofoldtech-dakota/claude-marketplace/plugin install twofoldtech-dakota-umbraco-analyzer-plugins-umbraco-analyzer@twofoldtech-dakota/claude-marketplaceExtract project-specific patterns from Umbraco codebases to generate AI-enhancing skills.
Name: pattern-extractor
Tools: Read, Glob, Grep
Purpose: Detect and document coding patterns specific to this project
Detection Strategy:
1. Find all IComposer implementations
2. Analyze service registrations
3. Detect notification handler registrations
4. Identify ordering attributes
5. Check for composition dependencies
Files to Scan:
**/Composers/**/*.cs**/*Composer.cs**/Composition/**/*.csPatterns to Extract:
| Pattern | Detection | Example |
|---|---|---|
| Composer base | IComposer implementation | Service registration |
| Ordering | [ComposeAfter], [ComposeBefore] | Composition order |
| Notification registration | AddNotificationHandler | Event handling |
| Service lifetime | AddScoped, AddTransient, AddSingleton | DI lifetimes |
Output Format:
composerPatterns:
namingConvention: "{Feature}Composer"
location: "Composers/"
orderingUsed: true
commonRegistrations:
- services: "Scoped"
- handlers: "Transient"
examples:
- name: NavigationComposer
file: Composers/NavigationComposer.cs
Detection Strategy:
1. Find service classes and their interfaces
2. Identify common base classes
3. Detect constructor injection patterns
4. Analyze async patterns
Files to Scan:
**/Services/**/*.cs**/*Service.csPatterns to Extract:
| Pattern | Detection | Example |
|---|---|---|
| Interface convention | I{Name}Service | Service abstraction |
| Async methods | Task<T> returns with Async suffix | Async patterns |
| Cancellation | CancellationToken parameters | Cancellation support |
| Caching | IAppCache, HybridCache usage | Cache patterns |
Detection Strategy:
1. Find Surface controllers
2. Identify API controllers
3. Detect render controllers
4. Analyze action patterns
Files to Scan:
**/Controllers/**/*.cs**/*Controller.csPatterns to Extract:
| Pattern | Detection | Example |
|---|---|---|
| Surface controller | : SurfaceController | Form handling |
| API controller | : UmbracoApiController | JSON APIs |
| Render controller | : RenderController | Custom routing |
| Action naming | Method naming conventions | RESTful patterns |
Output Format:
controllerPatterns:
surfaceControllers:
count: 6
namingConvention: "{Feature}SurfaceController"
baseClass: "SurfaceController"
apiControllers:
count: 4
namingConvention: "{Feature}ApiController"
baseClass: "UmbracoApiController"
Detection Strategy:
1. Find INotificationHandler implementations
2. Identify handled notification types
3. Analyze async vs sync handlers
4. Detect handler ordering
Files to Scan:
**/Handlers/**/*.cs**/NotificationHandlers/**/*.cs**/*Handler.csPatterns to Extract:
| Pattern | Detection | Example |
|---|---|---|
| Async handler | INotificationAsyncHandler<T> | Async notifications |
| Sync handler | INotificationHandler<T> | Sync notifications |
| Content events | ContentPublishedNotification | Content lifecycle |
| Media events | MediaSavedNotification | Media lifecycle |
Detection Strategy:
1. Find IPropertyValueConverter implementations
2. Identify converted types
3. Detect caching strategies
4. Analyze conversion patterns
Files to Scan:
**/PropertyValueConverters/**/*.cs**/*Converter.csPatterns to Extract:
| Pattern | Detection | Example |
|---|---|---|
| Converter class | IPropertyValueConverter | Property conversion |
| Editor alias | PropertyEditorAlias attribute | Editor binding |
| Cache level | PropertyCacheLevel | Cache strategy |
| Return type | ConvertIntermediateToObject return | Output type |
Detection Strategy:
1. Find umbraco-package.json files
2. Analyze Lit component implementations
3. Detect property editor registrations
4. Identify dashboard extensions
Files to Scan:
**/App_Plugins/**/*.ts**/App_Plugins/**/*.js**/umbraco-package.jsonPatterns to Extract:
| Pattern | Detection | Example |
|---|---|---|
| Package manifest | umbraco-package.json | Extension config |
| Lit element | @customElement | Custom elements |
| Property editor | propertyEditorUi | Editor extensions |
| Dashboard | dashboard extension type | Backoffice dashboards |
# The agent executes these steps:
1. Glob for pattern-specific files
2. Read and analyze file contents
3. Extract pattern metadata
4. Build pattern documentation
5. Return structured pattern data
{
"patterns": {
"composers": [...],
"services": [...],
"controllers": [...],
"notificationHandlers": [...],
"propertyConverters": [...],
"backofficeExtensions": [...]
},
"statistics": {
"totalPatternsFound": 38,
"composersAnalyzed": 8,
"servicesAnalyzed": 15,
"controllersAnalyzed": 10
},
"examples": [
{
"pattern": "IComposer",
"file": "Composers/NavigationComposer.cs",
"snippet": "..." // Sanitized
}
]
}
.claudeignore