Communitygithub.com

silentpolish

Polish a Next.js app (especially one generated by Google Stitch or another AI UI tool). Fixes padding/spacing and responsive design bugs, converts every <img> to next/image, removes ALL fake or invented data (stats, prices, tables, testimonials, emails, dates), and centralizes every changeable value into one typed site.ts file the owner can edit by hand. Use this skill whenever the user mentions cleaning up, polishing, fixing, or auditing a Next.js / React / Tailwind app, removing placeholder or fake data, fixing padding or spacing, switching to next/image, or making content easy to update from one config file, even if they never name this skill.

O que é silentpolish?

silentpolish is a Claude Code agent skill that polish a Next.js app (especially one generated by Google Stitch or another AI UI tool). Fixes padding/spacing and responsive design bugs, converts every <img> to next/image, removes ALL fake or invented data (stats, prices, tables, testimonials, emails, dates), and centralizes every changeable value into one typed site.ts file the owner can edit by hand. Use this skill whenever the user mentions cleaning up, polishing, fixing, or auditing a Next.js / React / Tailwind app, removing placeholder or fake data, fixing padding or spacing, switching to next/image, or making content easy to update from one config file, even if they never name this skill.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SilentCoder-HI/SilentPolish/tree/HEAD

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

SilentPolish: Next.js Full-App Polish

Fix spacing and design bugs, use next/image, remove ALL fake data, and centralize everything in site.ts.

Trigger prompt: "Follow this skill on the entire app. Do every step in order. Do not skip any file."

0. Context

  • Next.js app (App Router assumed; adapt for Pages Router).
  • UI was probably generated by an AI tool (e.g. Google Stitch via MCP). Expect inconsistent padding, fixed pixel sizes, plain <img> tags, and made-up numbers, stats, prices, dates and table rows.
  • The owner will update real data by hand, often (daily). All changeable data must live in ONE file: site.ts.

1. Hard rules (never break)

  1. No fake data in components. No invented numbers, stats, percentages, prices, ratings, counts, dates, names, emails, phones, testimonials, or table rows.
  2. All data comes from site.ts. Components only read from it. Components never contain literal data.
  3. Never invent replacement numbers. Use null (rendered as —) or an empty array. Placeholders must be obviously empty, not realistic-looking.
  4. All content images use next/image. No <img> tags.
  5. One spacing system. No random one-off paddings.
  6. Do not change the design direction (colors, fonts, brand feel). Fix spacing and bugs only.
  7. Do not break working features. Run the build at the end.
  8. Work through the WHOLE app: every page, layout, component, and loading/error/not-found file.

2. Workflow

Do the steps in order. Report the audit before changing anything.

Step 1: Audit

Run scripts/audit.sh <project-root> (or the manual greps in references/audit-patterns.md). Output a short list grouped:

  • A. Fake / hardcoded data: numbers in JSX text, data-like arrays inside components, fake contact info, fake dates.
  • B. Images: <img> tags, CSS background images used as content.
  • C. Layout / padding problems: fixed pixel sizes, h-screen/100vh, mixed section padding, double padding, mobile edge-touching, horizontal scroll, absolute positioning for layout, negative-margin hacks, missing max-width, overflowing text, inconsistent card sizes/radii.

Step 2: Create site.ts

Copy assets/templates/site.ts to src/config/site.ts (or config/ / lib/ to match the project; use the project's existing import alias, e.g. @/config/site).

  • Fully typed. Every changeable value lives here.
  • Unknown values are null or [], never fake.
  • Comments above each section tell the owner what to edit.
  • Keep it flat and simple. Only keep sections that match the real app; add sections for anything the audit found (pricing, schedule, rates, team...).
  • Keep the Owner's Quick Update Guide (section 5 below) as a comment at the top.

Step 3: Replace fake data in every component

For each finding in Audit A:

  1. Remove the hardcoded value or array from the component.
  2. Add a matching entry to site.ts with an empty placeholder (null, "", []).
  3. Import it in the component and render from it.
  4. Handle the empty state gracefully (no crash, no broken layout).

Reference patterns: assets/templates/StatsExample.tsx, assets/templates/TableExample.tsx.

Rules:

  • Numbers, dates, prices, table data, and contact info must be in site.ts. Static brand words (headings, button labels, nav labels) may stay in components or move to site.ts if likely to change.
  • Use stable ids as React keys, not array indexes.
  • Numbers used only for layout (grid-cols-3) are fine.
  • No Math.random() and no fake animated counters. A counter may only animate to a value read from site.ts and shows — if null.
  • Hide contact/social items when empty: {contact.email && <a ...>}.

Step 4: Images with next/image

Replace every <img> and content background-image. Full rules in references/image-rules.md. Summary:

  • Always meaningful alt (empty only for purely decorative images).
  • width + height, or fill with a relative parent. Never both.
  • With fill: add sizes and object-cover / object-contain.
  • priority only on above-the-fold / LCP images.
  • Local files in /public/images/; remote hosts added to next.config remotePatterns.
  • Paths, alt text and dimensions live in site.ts (images).
  • If no real file exists, do NOT use an external stock URL. Render a neutral empty block (bg-muted aspect-[16/9]) and leave the site.ts entry for the owner.
  • Put rounded and overflow-hidden on the wrapper.

Step 5: Padding and spacing system

  1. Copy assets/templates/Container.tsx and Section.tsx to components/ui/.
  2. Use ONLY the scale in references/spacing-system.md.
  3. Wrap every page section in <Section>; remove duplicate ad-hoc px-* / py-*.
  4. Remove double padding, pixel-based sizes, and h-screen/100vh on sections.
  5. Standardize header, footer, cards (one radius), buttons (44px min tap target), forms, long text (max-w-prose), and wrap tables in overflow-x-auto.
  6. Add overflow-x-hidden to body only as a last resort after fixing the real cause.

If the project does not use Tailwind, create CSS variables with the same scale.

Step 6: Design bug checklist

Work through references/design-checklist.md and fix everything.

Step 7: Verify

Run scripts/verify.sh <project-root> (typecheck, lint, build, then re-run the audit). Fix everything that fails. Do not say "done" before the build passes.

Step 8: Final report (required output)

  1. Files changed
  2. What was moved into site.ts (sections and what each controls)
  3. Fake data removed (what and where)
  4. Images converted (count, plus any needing real files from the owner)
  5. Spacing fixes (global changes, new Container/Section usage)
  6. Everything the owner must fill in (list of null / [] entries)
  7. Build result (pass/fail)

5. Owner's quick update guide (also goes at the top of site.ts)

  • Update a number: site.ts → stats → change value.
  • Update a table (daily): tables.main.rows → edit/add rows → set updatedAt to today's date ("YYYY-MM-DD").
  • Change contact info: contact.
  • Swap an image: drop the file in /public/images/ → update src, alt, width, height in images.
  • Hide something: set the value to null or the list to [].
  • Save. The site updates on next reload/deploy. No component edits needed.

6. Do not

  • Do not invent numbers, names, prices, reviews, or dates to "fill space".
  • Do not leave data arrays inside components.
  • Do not use <img> or CSS background images for content.
  • Do not add new random padding values.
  • Do not redesign colors, fonts, or brand.
  • Do not add dependencies unless truly required.
  • Do not skip files or stop at "the main page".
  • Do not say "done" before the build passes.

Habilidades Relacionadas