Generate project-specific skill files and custom commands based on extracted patterns.
Generates project-specific skill files and custom commands for Sitecore Classic projects based on extracted patterns.
/plugin marketplace add twofoldtech-dakota/claude-marketplace/plugin install twofoldtech-dakota-sitecore-classic-analyzer-plugins-sitecore-classic-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} Sitecore project
globs:
- "**/*.cs"
- "**/App_Config/**/*.config"
---
# {ProjectName} - Project Patterns
## Service Layer Pattern
This project uses the following service pattern:
### Base Class
{ServiceBaseClass or "No common base class detected"}
### Interface Convention
{InterfaceConvention}
### Registration
Services are registered as {ServiceLifetime} in {RegistrationFile}
### Example
```csharp
{SanitizedServiceExample}
{RepositoryPatternDescription}
{CachingStrategy}
{SanitizedRepositoryExample}
{ControllerPatternDescription}
{ControllerBaseClass}
{ActionConventions}
{PipelinePatternDescription}
{DIConfiguratorExample}
| Type | Lifetime |
|---|---|
| {LifetimeTable} |
### 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"
- "**/layers.config"
---
# {ProjectName} Architecture Guide
## Helix Structure
This project follows {HelixCompliance} Helix architecture.
### Foundation Layer
{FoundationModulesList}
### Feature Layer
{FeatureModulesList}
### Project Layer
{ProjectModulesList}
## Dependency Rules
Project → Feature → Foundation
### Detected Dependencies
{DependencyGraph}
## Adding New Features
### 1. Create Feature Module
```bash
# Create folder structure
mkdir -p src/Feature/{ModuleName}/code
mkdir -p src/Feature/{ModuleName}/serialization
Based on detected pattern, create Feature.{ModuleName}.csproj:
{ProjectFileTemplate}
Create RegisterDependencies.cs following project pattern:
{DIRegistrationTemplate}
Create {ModuleName}.module.json:
{SerializationModuleTemplate}
{PatchNamingConvention}
{ConfigOrganization}
### 3. Project Vocabulary
**Output**: `.claude/project-skills/vocabulary.md`
**Template**:
```markdown
# {ProjectName} Vocabulary
## Domain Terms
| Term | Meaning | Usage |
|------|---------|-------|
{DomainTermsTable}
## Acronyms
| Acronym | Full Form | Context |
|---------|-----------|---------|
{AcronymsTable}
## Custom Types
| Type | Purpose | Location |
|------|---------|----------|
{CustomTypesTable}
## Naming Conventions
### Classes
{ClassNamingConventions}
### Interfaces
{InterfaceNamingConventions}
### Files
{FileNamingConventions}
Output: .claude/project-skills/commands/
# /project:build
Build the solution using detected configuration.
## Command
```bash
{DetectedBuildCommand}
{BuildOptions}
#### /project:serialize
```markdown
# /project:serialize
Run serialization based on detected tool.
## Command
```bash
{SerializationCommand}
{ModulesList}
#### /project:new-feature
```markdown
# /project:new-feature [name]
Scaffold a new Helix Feature module.
## Steps
1. Create folder structure at `src/Feature/{name}/`
2. Generate `Feature.{name}.csproj` from template
3. Create `RegisterDependencies.cs`
4. Create serialization module
5. Add to solution
## Generated Files
{GeneratedFilesList}
def generate_skills(patterns, project_info):
# 1. Generate project-patterns SKILL
project_patterns = build_project_patterns_skill(
services=patterns.services,
repositories=patterns.repositories,
controllers=patterns.controllers,
pipelines=patterns.pipelines,
di=patterns.dependencyInjection
)
# 2. Generate architecture guide
architecture_guide = build_architecture_skill(
helix_structure=project_info.helix,
modules=project_info.modules,
dependencies=project_info.dependencies,
serialization=project_info.serialization
)
# 3. Generate vocabulary
vocabulary = build_vocabulary(
class_names=patterns.classNames,
method_names=patterns.methodNames,
domain_terms=extract_domain_terms(patterns)
)
# 4. Generate custom commands
commands = build_custom_commands(
build_config=project_info.buildConfig,
serialization=project_info.serialization,
deploy_targets=project_info.deployTargets
)
return {
'project_patterns': project_patterns,
'architecture_guide': architecture_guide,
'vocabulary': vocabulary,
'commands': commands
}
Before writing files, validate:
{CREDENTIAL}{CONNECTION_STRING}{API_KEY}