.rulesync/skills/extract-pattern/SKILL.md
Find recurring patterns and document for standardization
npx skillsauth add washingtonguilhardes/example.hr-module extract-patternInstall 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.
Persona: Execute this task as the @architect subagent.
Load the persona characteristics from .rulesync/subagents/architect.md before proceeding.
Find recurring patterns, document comprehensively, suggest rule file placement for standardization.
Discovery: - Ask: Pattern to extract? (e.g., "tRPC procedure error handling"), Where to look? (directories/file types/entire codebase), Standardize or document?
Search instances: - Use codebase search for all occurrences - Examine different implementations - Note variations and inconsistencies
Analyze: - For each instance: Core structure, common elements, variations and differences, best implementation
Categorize: - Consistent: Same way everywhere - Inconsistent: Variations (needs standardization) - Outdated: Old pattern coexisting with new (needs migration) - Anti-pattern: Should be avoided
Document: - Pattern Name, Purpose (what/when), Context (where/why), Implementation (Recommended Approach with code, Common Variations with code, Anti-patterns with code), Examples from Codebase (Good examples with file:line, Examples needing improvement), Related Patterns, Testing (how to test), Migration Guide (if standardizing)
Statistics: - Total instances, Consistent/Inconsistent/Outdated counts/percentages, Files analyzed
Rule file placement: - Recommend: Target rule domain (e.g., "unit testing", "code quality", "architecture"), Reasoning, Section to add to, Alternative rule domains if applicable
Refactoring recommendations (if needed): - Priority (High/Medium/Low), Impact, Files to update, Refactoring steps, Breaking changes, Estimated effort
Code examples: - Provide ready-to-use examples: Recommended Pattern with code, Real examples with file:line
Next steps: - Add pattern to recommended rule file? - Create refactoring task for inconsistencies? - Generate tests for pattern?
/extract-pattern "tRPC error handling" --scope app/api/trpc/routers/ - Scans all routers, catalogs every TRPCError usage, reports consistency stats, identifies the dominant pattern, and recommends rule file placement./extract-pattern "Zod validation schemas" --scope app/lib/ - Finds all Zod schema definitions, compares naming conventions and composition patterns, flags inconsistencies with file:line references.file:line reference, not paraphrased descriptionstesting
Analyze distributed traces to find blocking queries, N+1 patterns, and missing tRPC encapsulation, then produce prioritized fixes
testing
required reading for all test/spec files or test related queries.
testing
Transform Product Brief into Technical Specification
development
Detect drift between code implementations and specification documents