Core architecture principles (SSOT, DRY, Anti-Spaghetti) for maintainable code design. Use when planning features, implementing code, or reviewing architecture to prevent duplication and technical debt.
Applies SSOT, DRY, and anti-spaghetti principles during planning, implementation, and reviews to eliminate duplication and prevent technical debt.
/plugin marketplace add binee108/nine-step-workflow-plugin/plugin install nine-step-workflow@lilylab-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
SSOT (Single Source of Truth): One place for each constant or logic DRY (Don't Repeat Yourself): Extract when repeated 2+ times Anti-Spaghetti: Clear layers, minimal dependencies
Planning: Design with SSOT in mind Implementing: Extract shared logic Reviewing: Check for duplication
# ❌ Duplicated
def validate_api(value):
if value < 10.0: raise ValueError("Too low")
def validate_webhook(value):
if value < 10.0: raise ValueError("Too low")
# ✅ SSOT + DRY
class Validator:
MIN_VALUE = 10.0 # SSOT: Single source
def validate_value(self, value): # DRY: Reusable
if value < self.MIN_VALUE:
raise ValueError(f"Below {self.MIN_VALUE}")
# Anti-Spaghetti: Use everywhere
validator.validate_value(value)
// ❌ Duplicated
function validateApi(value) {
if (value < 10.0) throw new Error("Too low");
}
function validateWebhook(value) {
if (value < 10.0) throw new Error("Too low");
}
// ✅ SSOT + DRY
class Validator {
static MIN_VALUE = 10.0; // SSOT: Single source
validateValue(value) { // DRY: Reusable
if (value < Validator.MIN_VALUE) {
throw new Error(`Below ${Validator.MIN_VALUE}`);
}
}
}
// Anti-Spaghetti: Use everywhere
const validator = new Validator();
validator.validateValue(value);
// ❌ Duplicated
func validateApi(value float64) error {
if value < 10.0 { return errors.New("Too low") }
return nil
}
func validateWebhook(value float64) error {
if value < 10.0 { return errors.New("Too low") }
return nil
}
// ✅ SSOT + DRY
type Validator struct {
MinValue float64 // SSOT: Single source
}
func NewValidator() *Validator {
return &Validator{MinValue: 10.0}
}
func (v *Validator) ValidateValue(value float64) error { // DRY: Reusable
if value < v.MinValue {
return fmt.Errorf("Below %.2f", v.MinValue)
}
return nil
}
// Anti-Spaghetti: Use everywhere
validator := NewValidator()
validator.ValidateValue(value)
[ ] Constants in one place (SSOT)?
[ ] Repeated logic extracted (DRY)?
[ ] Clear layer separation (Anti-Spaghetti)?
For detailed patterns, see reference.md For more examples, see examples.md
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.