analyze-patterns

Analyzes a codebase for reusable patterns and produces cited examples with file and line references.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/muselesscreator/ui-skills --skill analyze-patterns-muselesscreator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyze-patterns
Source: https://github.com/muselesscreator/ui-skills/tree/main/analyze-patterns
Command: npx skills add https://github.com/muselesscreator/ui-skills --skill analyze-patterns-muselesscreator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When joining a new codebase or studying a reference repository, it is hard to identify which conventions and abstractions are actually worth emulating. This Skill performs a structured pattern-appreciation pass over a codebase and surfaces concrete, citable examples of effective design decisions. ## Core Features & Use Cases - Scoped codebase sweep: Detects project type, tech stack, scale, and which pattern areas (UI components, data fetching, state management, testing, error handling, and more) actually exist before analyzing. - User-confirmed focus: Presents a snapshot and asks which areas to analyze, so the output matches what you care about. - Cited pattern report: Produces 3-6 patterns per area with file:line references, inline code snippets, and explanations of why each pattern works. - Persistent learnings: Writes findings to a per-repo patterns.md file for future reference, with a guard that routes work-repo knowledge to a wiki instead. - Use Case: You clone an open-source project admired for its architecture and want to understand its state management and data-fetching conventions before contributing. Run the analysis, focus on those two areas, and receive a cited pattern guide. ## Quick Start Ask the assistant to analyze the patterns in this codebase, optionally naming a focus area such as the data layer or UI components.

Frequently Asked Questions about analyze-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze a codebase for good design patterns?

Run the analyze-patterns Skill, which performs a top-level sweep of directory structure, file counts, and dependency manifests, then confirms scope with you before deep-diving into selected areas. The output lists concrete patterns with file:line references and code snippets.

What areas of a codebase does pattern analysis cover?

It covers up to ten areas: file organization, UI components, data fetching, state management, API design, type system usage, abstractions, testing, error handling, and performance. Only areas that actually exist in the codebase are proposed, and you choose which ones to analyze.

Can I limit the analysis to specific parts of the codebase?

Yes. Pass a focus hint as an argument, such as "UI only" or "data layer", and the Skill skips the confirmation question and analyzes only those areas. Without a hint, it asks which areas you want before proceeding.

Where are the pattern analysis results saved?

Findings are written to ~/.claude/repo-learnings/<repo-name>/patterns.md, with an index.md pointer file created or updated. If the repository has its own ./wiki/ directory, the write is skipped because that knowledge belongs in the repo wiki instead.

Does the pattern analysis work on non-JavaScript codebases?

The sweep detects the stack from package.json, go.mod, Cargo.toml, pyproject.toml, or requirements.txt, so it orients itself across ecosystems. However, several area-specific searches target TypeScript and React conventions, so results are richest for JS/TS projects.