consolidate-patterns
Skill by strapi
Reviews recently created page-builder components in a React codebase, finds JSX and Tailwind patterns repeated across them, and extracts those into shared elementary components. Intended for use between batches of copy-component migrations.
Install consolidate-patterns
Built from the published package, never by AI.
git clone --depth 1 https://github.com/strapi/website /tmp/website && mkdir -p ~/.claude/skills && cp -r /tmp/website/.agents/skills/consolidate-patterns ~/.claude/skills/consolidate-patternsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/strapi/website /tmp/website && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/website/.agents/skills/consolidate-patterns ~/.gemini/antigravity-cli/skills/consolidate-patternsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install consolidate-patterns in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
Consolidate Patterns is an agent skill from Strapi for React refactoring of page-builder components. It reads the component files you name, or falls back to recent git history for files added in the last 20 commits. It looks for three kinds of repetition: identical JSX structures, repeated Tailwind class groups, and repeated combinations of elementary components.
Patterns that appear in at least a set number of components (default 2) are extracted into new files under the elementary components folder. The skill then updates the component registry, adds examples to the dev component library page, runs typecheck and lint, and commits the result. It is aimed at developers maintaining the Strapi page-builder UI who run it as a checkpoint between batches of copy-component migrations.
Written from the project's SKILL.md and checked against it.
What it can do
- Identify repeated patternsFinds identical JSX structures, repeated Tailwind class groups and repeated sub-component compositions across components.
- Filter by occurrenceDiscards any pattern that appears fewer than the minimum number of times, default 2.
- Extract elementary componentsCreates new elementary components under apps/ui/src/components/elementary/ and updates source components to use them.
- Update component registryAdds new entries to the React Elementary Components table in docs/component-registry.md.
- Update component library pageAdds an import, TOC entry and Section block for each new elementary component in the dev component library page.
- Run quality gates and commitRuns pnpm typecheck and pnpm lint, then commits the changes with a refactor message.
What you need
- Recently created page-builder component files in the repository
- docs/component-registry.md
- apps/ui/src/components/elementary/ directory
- pnpm with typecheck and lint scripts in apps/ui
Try asking
- Consolidate patterns across the StrapiPricingHero and StrapiFeatureGrid components.
- Review the recent page-builder components for reusable patterns and extract them.
- Run a checkpoint review of the components added in the last batch of migrations.
Good to know
- React-only refactoring. Never modifies Strapi schemas.
- Never creates an elementary component for a pattern that appears only once.
- Rendered output must be identical before and after extraction.
- Skips the component library page update silently if that file does not exist.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/consolidate-patterns/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to consolidate-patterns
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
consolidate-patterns: common questions
What does consolidate-patterns do with recently created components?
It reviews the components you name, or recent git additions if none are given. It finds JSX and Tailwind patterns that repeat and extracts them into shared elementary components.
Will consolidate-patterns change Strapi content types or schemas?
No. The source states it is React-only refactoring and never modifies Strapi schemas.
What happens if no repeated patterns are found?
The skill reports that no consolidation is needed and stops. The source says this is not a failure.
How do I install consolidate-patterns?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is consolidate-patterns free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is consolidate-patterns safe to use?
It scores 49 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to consolidate-patterns?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
