agentleFS
notum-cznotum-cz/strapi-next-monorepo-starter/.claude/skills/find-component/SKILL.md

find-component

Skill316 starsChanged 5 months agoMITView on GitHub

Use when checking whether a page-builder component already exists before building one — e.g. "find component", "does a component exist for", "is there a component that", "match this screenshot", "identify this section", "reuse existing component", "what renders this". Searches existing Strapi page-builder components by description or by a UI screenshot, then recommends reuse or `create-content-component`.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Search the page-builder component library before building a new one.

    line 20
  2. Distinctive:

    Read-only: this skill inspects and recommends.

    line 22
  3. Distinctive:

    Read the image and describe the visual pattern: overall layout, repetition (cards / rows / columns), media, CTAs, accordion / carousel / …

    line 40
  4. Very specific:

    If nothing fits, say so plainly and hand off to create-content-component, naming the closest category to start from.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Find an Existing Component

Search the page-builder component library before building a new one. Two inputs: a text description of what you need, or a screenshot of the UI. Returns ranked matches with how to reuse them — or a recommendation to build one with create-content-component.

Read-only: this skill inspects and recommends; it never edits files.

Where it looks

Build the inventory first, then match against it:

  • Strapi schemas — apps/strapi/src/components/**/*.json. The UID is <category>.<name>; read each displayName + attribute keys/types. Source of truth for what a component contains.
  • React renderers — apps/ui/src/components/page-builder/components/**/Strapi*.tsx.
  • Renderable set — PageContentComponents in apps/ui/src/components/page-builder/index.tsx (UIDs actually wired into pages).
  • Showcase — apps/ui/src/app/[locale]/dev/showcase/showcaseItems.tsx + the Mocked* previews (labels, descriptions, and a rendered example of each section). /dev/showcase shows them visually.

Mode A — by description

  1. Extract the intent + key fields from the request (e.g. "title + image + repeatable feature rows", "Q&A accordion", "row of partner logos", "numbered metrics").
  2. Match against schema displayNames, attribute sets, and showcase descriptions. Rank by purpose + attribute overlap.

Mode B — by screenshot / image

  1. Read the image and describe the visual pattern: overall layout, repetition (cards / rows / columns), media, CTAs, accordion / carousel / tabs, logo strip, stat counters, etc.
  2. Map the pattern to candidate UIDs from the real inventory (don't invent names). Typical cues: accordion of questions → sections.faq; strip of logos → sections.animated-logo-row; headline + buttons → sections.heading-with-cta-button / sections.cta-banner; numbered metrics → sections.statistics; sliding cards → sections.carousel; media + copy + CTA → sections.image-with-cta-button; feature/value rows → sections.features-list; large intro → sections.hero.
  3. Confirm each candidate by reading its schema + its Mocked* showcase example. Optionally open /dev/showcase to compare the rendered mock against the screenshot.

Output

Rank the top 0–3 candidates. For each:

  • UID + displayName
  • schema path, React path, whether it's in PageContentComponents (renderable), and whether it has a showcase entry
  • attributes it supports vs. what was asked — call out gaps
  • verdict: reuse as-is · reuse + extend (adding fields is a schema change → run strapi-schema-check first) · not a fit

If nothing fits, say so plainly and hand off to create-content-component, naming the closest category to start from. If only a sub-part matches (e.g. a repeatable row), point at the relevant shared.* / utilities.* child component to reuse instead of duplicating it.

See also

  • create-content-component — build a new section when there's no match.
  • copy-component — replicate a section from a description/screenshot/code (runs this skill as its reuse-check).
  • add-ui-component — generic (non page-builder) UI primitives.
  • apps/docs/docs/page-builder/introduction.md, apps/docs/docs/ui/built-in-pages/showcase.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.