Generate project-specific skill files and custom commands based on extracted patterns.
Generates project-specific skill files and custom commands for Umbraco projects based on extracted patterns.
/plugin marketplace add twofoldtech-dakota/claude-marketplace/plugin install twofoldtech-dakota-umbraco-analyzer-plugins-umbraco-analyzer@twofoldtech-dakota/claude-marketplaceGenerate project-specific skill files and custom commands based on extracted patterns.
Name: skill-generator
Tools: Read, Write, Glob
Input: Pattern data from pattern-extractor agent
Output: Skill files in .claude/project-skills/
Output: .claude/project-skills/project-patterns/SKILL.md
Template:
---
name: project-patterns
description: Patterns specific to this {ProjectName} Umbraco project
globs:
- "**/*.cs"
- "**/App_Plugins/**/*"
---
# {ProjectName} - Project Patterns
## Composer Pattern
This project uses the following Composer pattern:
### Location
{ComposerLocation}
### Naming Convention
{ComposerNaming}
### Service Registration
{ServiceRegistrationPattern}
### Example
```csharp
{SanitizedComposerExample}
{ServicePatternDescription}
{InterfaceConvention}
{LifetimeDefault}
{SanitizedServiceExample}
{ControllerPatternDescription}
{SurfaceControllerPattern}
{ApiControllerPattern}
{NotificationHandlerDescription}
{CommonNotifications}
{SanitizedHandlerExample}
{PropertyConverterDescription}
{CacheStrategy}
### 2. Architecture Guide Skill
**Output**: `.claude/project-skills/architecture-guide/SKILL.md`
**Template**:
```markdown
---
name: architecture-guide
description: Architecture and structure guide for {ProjectName}
globs:
- "**/*.csproj"
- "**/appsettings.json"
---
# {ProjectName} Architecture Guide
## Project Structure
{DirectoryStructure}
## Umbraco Version
- **Version**: {UmbracoVersion}
- **.NET Version**: {DotNetVersion}
- **Backoffice**: {BackofficeType}
## Composer Organization
### Location
{ComposerLocation}
### Registration Order
{RegistrationOrder}
## Adding New Features
### 1. Create Composer
```bash
# Create new Composer
touch {ComposerPath}/{FeatureName}Composer.cs
Based on detected pattern:
{ComposerTemplate}
Following project convention:
{ServiceRegistrationTemplate}
{NotificationHandlerTemplate}
{DeliveryApiStatus}
{DeliveryApiConfig}
{BackofficeExtensionGuide}
{PropertyEditorGuide}
{DocumentTypesLocation}
{DocumentTypeNaming}
{PropertyAliasConvention}
### 3. Project Vocabulary
**Output**: `.claude/project-skills/vocabulary.md`
**Template**:
```markdown
# {ProjectName} Vocabulary
## Domain Terms
| Term | Meaning | Usage |
|------|---------|-------|
{DomainTermsTable}
## Umbraco Terms
| Term | Meaning | Context |
|------|---------|---------|
{UmbracoTermsTable}
## Content Types
| Type | Purpose | Alias |
|------|---------|-------|
{ContentTypesTable}
## Service Names
| Service | Purpose | Lifetime |
|---------|---------|----------|
{ServicesTable}
## Naming Conventions
### Classes
{ClassNamingConventions}
### Interfaces
{InterfaceNamingConventions}
### Document Types
{DocumentTypeNamingConventions}
### Property Aliases
{PropertyAliasConventions}
Output: .claude/project-skills/commands/
# /project:build
Build the Umbraco solution.
## Command
```bash
{DetectedBuildCommand}
{BuildOptions}
#### /project:run
```markdown
# /project:run
Start Umbraco locally.
## Command
```bash
{RunCommand}
--watch - Enable hot reload--no-launch - Don't open browser
#### /project:new-composer
```markdown
# /project:new-composer [name]
Scaffold a new Umbraco Composer.
## Steps
1. Create Composer file at `{ComposerPath}/{name}Composer.cs`
2. Implement IComposer interface
3. Add service registrations
4. Add notification handler registrations (if needed)
## Generated Files
{GeneratedFilesList}
## Template Used
```csharp
{ComposerTemplate}
## Generation Logic
```python
def generate_skills(patterns, project_info):
# 1. Generate project-patterns SKILL
project_patterns = build_project_patterns_skill(
composers=patterns.composers,
services=patterns.services,
controllers=patterns.controllers,
handlers=patterns.notificationHandlers,
converters=patterns.propertyConverters
)
# 2. Generate architecture guide
architecture_guide = build_architecture_skill(
umbraco_version=project_info.umbracoVersion,
dotnet_version=project_info.dotnetVersion,
project_structure=project_info.structure,
delivery_api=project_info.deliveryApi
)
# 3. Generate vocabulary
vocabulary = build_vocabulary(
service_names=patterns.serviceNames,
content_types=patterns.contentTypes,
domain_terms=extract_domain_terms(patterns)
)
# 4. Generate custom commands
commands = build_custom_commands(
csproj=project_info.csproj,
launch_settings=project_info.launchSettings
)
return {
'project_patterns': project_patterns,
'architecture_guide': architecture_guide,
'vocabulary': vocabulary,
'commands': commands
}
Before writing files, validate:
{CONNECTION_STRING}{API_KEY}