.claude/skills/ln-641-pattern-analyzer/SKILL.md
L3 Worker. Analyzes single pattern implementation, calculates 4 scores (compliance, completeness, quality, implementation), identifies gaps and issues. Usually invoked by ln-640, can also analyze a specific pattern on user request.
npx skillsauth add cbbkrd-tech/jl-finishes ln-641-pattern-analyzerInstall 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.
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
L3 Worker that analyzes a single architectural pattern against best practices and calculates 4 scores.
Out of Scope (owned by ln-624-code-quality-auditor):
- pattern: string # Pattern name (e.g., "Job Processing")
- locations: string[] # Known file paths/directories
- bestPractices: object # Best practices from MCP Ref/Context7/WebSearch
- output_dir: string # e.g., "docs/project/.audit"
Note: All patterns arrive pre-verified (passed ln-640 Phase 1d applicability gate with >= 2 structural components confirmed).
MANDATORY READ: Load ../ln-640-pattern-evolution-auditor/references/pattern_library.md — use "Pattern Detection (Grep)" table for detection keywords per pattern.
IF pattern.source == "adaptive":
# Pattern discovered by coordinator Phase 1b — evidence already provided
files = pattern.evidence.files
SKIP detection keyword search (already done in Phase 1b)
ELSE:
# Baseline pattern — use library detection keywords
files = Glob(locations)
additional = Grep("{pattern_keywords}", "**/*.{ts,js,py,rb,cs,java}")
files = deduplicate(files + additional)
FOR EACH file IN files (limit: 10 key files):
Read(file)
Extract: components, patterns, error handling, logging, tests
MANDATORY READ: Load ../ln-640-pattern-evolution-auditor/references/scoring_rules.md — follow Detection column for each criterion.
| Score | Source in scoring_rules.md | Max | |-------|---------------------------|-----| | Compliance | "Compliance Score" section — industry standard, naming, conventions, anti-patterns | 100 | | Completeness | "Completeness Score" section — required components table (per pattern), error handling, tests | 100 | | Quality | "Quality Score" section — method length, complexity, code smells, SOLID | 100 | | Implementation | "Implementation Score" section — compiles, production usage, integration, monitoring | 100 |
Scoring process for each criterion:
FOR EACH bestPractice NOT implemented:
issues.append({
severity: "HIGH" | "MEDIUM" | "LOW",
category: "compliance" | "completeness" | "quality" | "implementation",
issue: description,
suggestion: how to fix,
effort: "S" | "M" | "L"
})
gaps = {
missingComponents: required components not found in code,
inconsistencies: conflicting or incomplete implementations
}
overall_score = average(compliance, completeness, quality, implementation) / 10
MANDATORY READ: Load shared/templates/audit_worker_report_template.md for file format (ln-640 section: 4-score AUDIT-META + DATA-EXTENDED).
# Build pattern name slug: "Job Processing" → "job-processing"
slug = pattern.name.lower().replace(" ", "-")
# Build markdown report in memory with:
# - AUDIT-META (4-score variant: score + score_compliance/completeness/quality/implementation)
# - Checks table (compliance_check, completeness_check, quality_check, implementation_check)
# - Findings table (issues sorted by severity)
# - DATA-EXTENDED: {pattern, codeReferences, gaps, recommendations}
Write to {output_dir}/641-pattern-{slug}.md (atomic single Write call)
Report written: docs/project/.audit/641-pattern-job-processing.md
Score: 7.9/10 (C:72 K:85 Q:68 I:90) | Issues: 3 (H:1 M:2 L:0)
{output_dir}/641-pattern-{slug}.md (atomic single Write call)shared/templates/audit_worker_report_template.md../ln-640-pattern-evolution-auditor/references/scoring_rules.md../ln-640-pattern-evolution-auditor/references/pattern_library.mdVersion: 2.0.0 Last Updated: 2026-02-08
testing
When the user wants to plan a content strategy, decide what content to create, or figure out what topics to cover. Also use when the user mentions "content strategy," "what should I write about," "content ideas," "blog strategy," "topic clusters," or "content planning." For writing individual pieces, see copywriting. For SEO-specific audits, see seo-audit.
development
When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' or 'competitive landing pages.' Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. Emphasizes deep research, modular content architecture, and varied section types beyond feature tables.
development
Write B2B cold emails and follow-up sequences that get replies. Use when the user wants to write cold outreach emails, prospecting emails, cold email campaigns, sales development emails, or SDR emails. Covers subject lines, opening lines, body copy, CTAs, personalization, and multi-touch follow-up sequences.
development
When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' or 'involuntary churn.' This skill covers voluntary churn (cancel flows, save offers, exit surveys) and involuntary churn (dunning, payment recovery). For post-cancel win-back email sequences, see email-sequence. For in-app upgrade paywalls, see paywall-upgrade-cro.