implementation-pattern-mining
Use when mining repeated codebase patterns and turning them into reusable implementation guidance. Triggers:
What this skill does
# Implementation Pattern Mining Use this skill to identify repeated implementation patterns in a codebase, extract reusable conventions, and turn them into guidance without overfitting. The goal is not to write a style guide from taste. The goal is to describe implementation moves that the codebase already repeats for good reasons. ## When To Use Use this when a task asks for codebase conventions, local patterns, reusable implementation guidance, onboarding notes for how code is built here, or a pattern inventory before implementing similar work. Do not use this to justify a preferred design that is not already present in the codebase. Do not promote one example into a convention unless you can explain why it generalizes. ## Mining Workflow 1. Define the scope. Name the subsystem, language, framework, and artifact types being mined. Keep the scope narrow enough that examples are comparable. 2. Find candidate repetitions. Use repository search and code navigation to collect examples of recurring implementation moves: module boundaries, constructors, adapters, validation, error handling, persistence, tests, configuration, CLI flags, API shapes, and naming schemes. 3. Build evidence sets. For each candidate pattern, collect at least three independent examples when possible. If there are only two examples, mark the result as a weak signal unless those examples are central, recent, and deliberately parallel. 4. Separate convention from coincidence. Ask what stays stable across the examples and what varies. Preserve only the stable implementation move as the convention. Treat names, ordering, helper choice, and file layout as incidental unless the evidence shows they carry meaning. 5. Check counterexamples. Search for code that solves the same problem differently. A counterexample does not kill the pattern by itself; it defines the boundary where the convention applies, reveals migration drift, or exposes a competing local convention. 6. Extract guidance. Turn each accepted pattern into a short rule of use: when to apply it, how to implement it, which example is the clearest exemplar, what to avoid, and what would be overfitting. 7. Verify against likely future work. Test the guidance against a plausible new implementation. If following the guidance would force irrelevant details from the examples, narrow the rule. ## Pattern Quality Bar A mined pattern is strong when it has repeated independent examples, a clear reason to exist, consistent behavior, and useful boundaries. It should help a future implementer make fewer local-design decisions without copying irrelevant details. A mined pattern is weak when it is based on one file, one author's habit, old code that newer code no longer follows, generated output, tests that intentionally use odd shapes, or examples that share only superficial structure. ## Overfitting Guardrails - Prefer behavior and intent over syntax trivia. - Name confidence: strong, medium, or weak. - Include counterexamples and explain whether they are exceptions, drift, or a separate pattern. - Avoid universal words like always and never unless the repository provides broad evidence. - Preserve useful variation. If examples differ safely, the guidance should say what can vary. - Do not require new abstractions just because examples share a shape. ## Report Format Return a compact report with these sections: ```markdown # Implementation Pattern Mining Scope: <subsystem, language, artifact types> ## Pattern Inventory ### <Pattern Name> Confidence: strong|medium|weak Evidence: - <file or symbol>: <what it shows> - <file or symbol>: <what it shows> Convention: <one or two sentences describing the reusable implementation move> Guidance: <how to apply it to new work> Boundaries: <where it applies, where it does not, and known counterexamples> Overfitting Risk: <details from the examples that should not be copied blindly> ## Candidate Patterns Not Promoted - <candidate>: <why evidence was insufficient or too context-specific> ``` ## Handoff Rules When handing the result to an implementer, keep the guidance executable: reference concrete examples, state the confidence level, and call out what is optional. If the output will become durable documentation, remove weak patterns or label them explicitly as observations rather than conventions.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.