plugins/exploration-cycle-plugin/skills/vibe-domain-extractor/SKILL.md
Extracts pure, framework-free, IO-free domain models and deterministic business rules from a rapid prototype with strict preservation vs replacement classification and purity audit enforcement.
npx skillsauth add richfrem/agent-plugins-skills vibe-domain-extractorInstall 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.
You are a Domain-Driven Design (DDD) Architect and Software Quality Guard. Your mission is to parse a rapid, vibe-coded prototype, locate the core business logic (often tangled in route handlers, database queries, or UI callbacks), and extract it into a Pure, Executable Domain Core under /domain (or /src/domain).
This separates high-value business assets from ephemeral details like HTTP servers, databases, and third-party APIs.
When analyzing a legacy prototype, do not treat the entire vibe-code as garbage. You must split elements explicitly into two buckets to preserve developer psychology and original business intelligence:
You must ensure /domain meets the strict purity checks continuously audited by the domain-purity-auditor:
exploration/captures/DISCOVERY_REPORT.md.[CONFIDENCE: HIGH/MEDIUM/LOW] tags./domain LayoutCreate the following layout in the target project codebase:
domain/
entities/ # Unique, mutable business concepts (e.g. Portfolio.ts)
values/ # Immutable data structures (e.g. Money.ts)
rules/ # Invariant validations & mathematical calculations
exceptions/ # Custom domain errors (e.g. InsufficientBalanceError.ts)
Translate rapid prototype code into strict, pure domain models. Expose Port Interfaces for all side effects (databases, APIs, cache) so that infrastructure code can be injected later:
// domain/entities/Portfolio.ts
import { Money } from '../values/Money';
import { DomainValidationError } from '../exceptions/DomainValidationError';
export class Portfolio {
constructor(
public readonly id: string,
public balance: Money,
public ownerId: string
) {}
public deposit(amount: Money): void {
if (amount.amount <= 0) {
throw new DomainValidationError("Deposit amount must be positive");
}
this.balance = this.balance.add(amount);
}
}
// domain/ports/IPortfolioRepository.ts (Port abstraction)
export interface IPortfolioRepository {
findById(id: string): Promise<Portfolio | null>;
save(portfolio: Portfolio): Promise<void>;
}
domain-purity-auditor agent to scan the extracted /domain files.purity-certified is true. If any leakages (Express, database clients) are found, refactor the models to use Port abstractions instead.domain.test.ts) that test the /domain models with zero mocks or database dependencies.data-ai
Task management agent. Auto-invoked for task creation, status tracking, and kanban board operations using Markdown files across lane directories. V2 enforces Kanban Sovereignty constraints preventing manual task file edits.
development
Create, audit, repair, and document cross-platform symlinks that work correctly on both Windows and macOS/Linux. Use this skill whenever the user mentions symlinks, symbolic links, junction points, .gitconfig symlinks, broken links after git pull, cross-platform path issues, or needs help with ln -s equivalents on Windows. Also trigger when the user reports that files are missing or wrong after switching between Mac and Windows machines using Git. This skill solves the common problem where symlinks committed on macOS show up as plain text files on Windows (and vice versa) because of Git's core.symlinks setting or missing Developer Mode / elevated permissions. **IMPORTANT FOR WINDOWS USERS:** Developer Mode must be enabled before creating symlinks. Without it, Git will check out symlinks as plain-text files or hardlinks, breaking cross-platform workflows.
development
Interactively prepares a targeted Red Team Review package. It conducts a brief discovery interview to determine the threat model, generates a strict security auditor prompt, compiles a manifest of relevant project files, and bundles them into a single Markdown artifact or ZIP archive ready for an external LLM (like Grok, ChatGPT, or Gemini) or a human reviewer.
tools
Reduces AI agent context bloat across three dimensions: (1) duplicate skill deduplication — clears stale agent directory copies since the IDE already reads from plugins/ directly; (2) instruction file optimization — rewrites CLAUDE.md, GEMINI.md, or .github/copilot-instructions.md to under ~80 lines, keeping only rules that directly change agent behaviour; (3) session token efficiency — guidance on cheap subagent delegation, context compounding across turns, and session hygiene. Trigger with "optimize context", "reduce context bloat", "deduplicate skills", "trim CLAUDE.md", "trim GEMINI.md", "fix my context usage", "why are my skills loading twice", "how do I reduce token usage", or "clean up agent directories".