Skip to content

code-yeongyu/oh-my-openagent / packages/shared-skills/skills/frontend

frontend

Flagged

Builds, styles, and polishes anything drawn with HTML, CSS, or SVG: web UI, pages, components, HTML reports rendered to PDF or print, figures, PNG/SVG diagrams, slides, and images for Notion or Slack. Use for any styling, layout, animation, or visual-quality task, or when asked to make something look or feel a certain way.

FileKindSize
.gitignoreother1.2 KB
.npmignoreother563 B
ATTRIBUTION.mdmarkdown20.0 KB
LICENSE-Apache-2.0.txtmarkdown11.0 KB
SKILL.mdskill md26.4 KB
references/design/README.mdmarkdown17.0 KB
references/design/_INDEX.mdmarkdown17.6 KB
references/design/ambience-skill.mdmarkdown18.0 KB
references/design/aside.mdmarkdown12.5 KB
references/design/clone-from-url.mdmarkdown5.3 KB
references/design/component-catalogs.mdmarkdown11.2 KB
references/design/design-system-architecture.mdmarkdown15.7 KB
references/design/grounding.mdmarkdown3.7 KB
references/design/interaction-skill.mdmarkdown16.1 KB
references/design/layout-skill.mdmarkdown8.3 KB
references/design/lazyweb.mdmarkdown3.8 KB
references/design/print-paged-media.mdmarkdown6.8 KB
references/design/react-dev-tooling-skill.mdmarkdown8.5 KB
references/design/stylegallery.mdmarkdown4.3 KB
references/designpowers/EVIDENCE.mdmarkdown3.7 KB
references/designpowers/README.mdmarkdown3.7 KB
references/designpowers/UPSTREAM.mdmarkdown2.2 KB
references/designpowers/lane-a-direction.mdmarkdown5.3 KB
references/designpowers/lane-b-execution.mdmarkdown5.6 KB
references/designpowers/lane-c-review.mdmarkdown5.4 KB
references/designpowers/lane-d-memory.mdmarkdown5.0 KB
references/designpowers/orchestration.mdmarkdown5.3 KB
references/designpowers/routing.mdmarkdown5.2 KB
references/perfection/README.mdmarkdown12.2 KB
references/perfection/craft-floor.mdmarkdown6.4 KB
references/perfection/detect.mdmarkdown3.9 KB
references/perfection/react-perf-tooling.mdmarkdown8.3 KB
scripts/detect/cli.tsscript3.0 KB
scripts/detect/config.test.tsscript1.4 KB
scripts/detect/config.tsscript3.0 KB
scripts/detect/core/characters.tsscript157 B
scripts/detect/core/color.test.tsscript1.1 KB
scripts/detect/core/color.tsscript7.1 KB
scripts/detect/core/page.tsscript3.7 KB
scripts/detect/core/shadow.tsscript1.5 KB
scripts/detect/core/source.tsscript1.4 KB
scripts/detect/detect.tsscript3.5 KB
scripts/detect/index.tsscript1.1 KB
scripts/detect/lint.test.tsscript1.2 KB
scripts/detect/lint.tsscript4.2 KB
scripts/detect/render/probe-placement.test.tsscript1.6 KB
scripts/detect/render/probe-placement.tsscript1.9 KB
scripts/detect/render/renderer.tsscript1.4 KB
scripts/detect/render/webview.tsscript3.4 KB
scripts/detect/report.tsscript1.0 KB
scripts/detect/rule.tsscript1.4 KB
scripts/detect/rules/color/ai-color-palette.test.tsscript5.2 KB
scripts/detect/rules/color/ai-color-palette.tsscript6.5 KB
scripts/detect/rules/color/cream-palette.test.tsscript1.5 KB
scripts/detect/rules/color/cream-palette.tsscript2.3 KB
scripts/detect/rules/color/dark-glow.test.tsscript3.2 KB
scripts/detect/rules/color/dark-glow.tsscript3.0 KB
scripts/detect/rules/color/design-system-color.test.tsscript1.6 KB
scripts/detect/rules/color/design-system-color.tsscript1.8 KB
scripts/detect/rules/color/gradient-text.test.tsscript2.6 KB
scripts/detect/rules/color/gradient-text.tsscript3.4 KB
scripts/detect/rules/color/gray-on-color.test.tsscript2.7 KB
scripts/detect/rules/color/gray-on-color.tsscript2.2 KB
scripts/detect/rules/color/index.tsscript685 B
scripts/detect/rules/color/low-contrast.test.tsscript17.0 KB
scripts/detect/rules/color/low-contrast.tsscript5.0 KB
scripts/detect/rules/color/placeholder-contrast.test.tsscript5.3 KB
scripts/detect/rules/color/radial-halo.test.tsscript2.5 KB
scripts/detect/rules/color/radial-halo.tsscript2.3 KB
scripts/detect/rules/color/radial-spotlight-glow.test.tsscript2.3 KB
scripts/detect/rules/color/radial-spotlight-glow.tsscript2.1 KB
scripts/detect/rules/color/support/animation-opacity.tsscript4.3 KB
scripts/detect/rules/color/support/color-path.tsscript869 B
scripts/detect/rules/color/support/contrast-pairs.tsscript3.1 KB
scripts/detect/rules/color/support/contrast-role.tsscript5.6 KB
scripts/detect/rules/color/support/glow-forms.tsscript3.8 KB
scripts/detect/rules/color/support/gradient-samples.tsscript6.5 KB
scripts/detect/rules/color/support/gradients.tsscript4.1 KB
scripts/detect/rules/color/support/mockup-roots.tsscript5.5 KB
scripts/detect/rules/color/support/page-ignore.tsscript457 B
scripts/detect/rules/color/support/painted-text.tsscript8.3 KB
scripts/detect/rules/color/support/palette-roles.tsscript3.6 KB
scripts/detect/rules/color/support/placeholder-contrast.tsscript2.0 KB
scripts/detect/rules/color/support/stock-accent.tsscript2.5 KB
scripts/detect/rules/color/support/text-colors.tsscript4.7 KB
scripts/detect/rules/copy/aphoristic-cadence.test.tsscript1.1 KB
scripts/detect/rules/copy/aphoristic-cadence.tsscript993 B
scripts/detect/rules/copy/broken-image.test.tsscript1.4 KB
scripts/detect/rules/copy/broken-image.tsscript902 B
scripts/detect/rules/copy/em-dash-overuse.test.tsscript2.4 KB
scripts/detect/rules/copy/em-dash-overuse.tsscript2.8 KB
scripts/detect/rules/copy/index.tsscript768 B
scripts/detect/rules/copy/marketing-buzzword.test.tsscript1.1 KB
scripts/detect/rules/copy/marketing-buzzword.tsscript1.6 KB
scripts/detect/rules/copy/numbered-section-labels.test.tsscript3.6 KB
scripts/detect/rules/copy/numbered-section-labels.tsscript2.4 KB
scripts/detect/rules/copy/repeated-container-text.test.tsscript2.5 KB
scripts/detect/rules/copy/repeated-container-text.tsscript3.6 KB
scripts/detect/rules/copy/script-error.test.tsscript3.3 KB
scripts/detect/rules/copy/script-error.tsscript1.7 KB
scripts/detect/rules/copy/skipped-heading.test.tsscript3.0 KB
scripts/detect/rules/copy/skipped-heading.tsscript8.3 KB
scripts/detect/rules/copy/support/numbered-label.tsscript5.4 KB
scripts/detect/rules/copy/support/page-text.tsscript1.8 KB
scripts/detect/rules/copy/theater-slop-phrase.test.tsscript1.1 KB
scripts/detect/rules/copy/theater-slop-phrase.tsscript1.2 KB
scripts/detect/rules/decoration/blinking-cursor.test.tsscript2.1 KB
scripts/detect/rules/decoration/blinking-cursor.tsscript2.3 KB
scripts/detect/rules/decoration/border-accent-on-rounded.test.tsscript1.3 KB
scripts/detect/rules/decoration/border-accent-on-rounded.tsscript556 B
scripts/detect/rules/decoration/bounce-easing.test.tsscript3.5 KB
scripts/detect/rules/decoration/bounce-easing.tsscript5.0 KB
scripts/detect/rules/decoration/buried-raster.test.tsscript5.1 KB
scripts/detect/rules/decoration/buried-raster.tsscript3.5 KB
scripts/detect/rules/decoration/codex-grid-background.test.tsscript1.1 KB
scripts/detect/rules/decoration/codex-grid-background.tsscript1.3 KB
scripts/detect/rules/decoration/design-system-radius.test.tsscript1.2 KB
scripts/detect/rules/decoration/design-system-radius.tsscript1.3 KB
scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.test.tsscript2.4 KB
scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.tsscript2.9 KB
scripts/detect/rules/decoration/hard-offset-shadow.test.tsscript2.2 KB
scripts/detect/rules/decoration/hard-offset-shadow.tsscript1.2 KB
scripts/detect/rules/decoration/hero-eyebrow-chip.test.tsscript2.6 KB
scripts/detect/rules/decoration/hero-eyebrow-chip.tsscript754 B
scripts/detect/rules/decoration/icon-tile-stack.test.tsscript2.8 KB
scripts/detect/rules/decoration/icon-tile-stack.tsscript3.5 KB
scripts/detect/rules/decoration/index.tsscript1.3 KB
scripts/detect/rules/decoration/kicker-above-heading.test.tsscript5.0 KB
scripts/detect/rules/decoration/kicker-above-heading.tsscript2.8 KB
scripts/detect/rules/decoration/marquee.test.tsscript2.9 KB
scripts/detect/rules/decoration/marquee.tsscript2.8 KB
scripts/detect/rules/decoration/organic-clip-path.test.tsscript2.7 KB
scripts/detect/rules/decoration/organic-clip-path.tsscript1.9 KB
scripts/detect/rules/decoration/pulsing-dot.test.tsscript3.2 KB
scripts/detect/rules/decoration/pulsing-dot.tsscript4.4 KB
scripts/detect/rules/decoration/repeating-stripes-gradient.test.tsscript1.1 KB
scripts/detect/rules/decoration/repeating-stripes-gradient.tsscript973 B
scripts/detect/rules/decoration/shape-assembled-illustration.test.tsscript2.5 KB
scripts/detect/rules/decoration/shape-assembled-illustration.tsscript3.0 KB
scripts/detect/rules/decoration/side-tab.test.tsscript4.4 KB
scripts/detect/rules/decoration/side-tab.tsscript747 B
scripts/detect/rules/decoration/support/appearance.tsscript3.9 KB
scripts/detect/rules/decoration/support/assert-cases.tsscript1.3 KB
scripts/detect/rules/decoration/support/borders.tsscript6.9 KB
scripts/detect/rules/decoration/support/clip-geometry.tsscript5.9 KB
scripts/detect/rules/decoration/support/css-candidates.tsscript2.7 KB
scripts/detect/rules/decoration/support/curve-samples.tsscript2.1 KB
scripts/detect/rules/decoration/support/gradient-pattern.tsscript1.7 KB
scripts/detect/rules/decoration/support/keyframes.tsscript5.8 KB
scripts/detect/rules/decoration/support/labels.tsscript4.2 KB
scripts/detect/rules/decoration/support/raster-state.tsscript3.4 KB
scripts/detect/rules/index.tsscript452 B
scripts/detect/rules/layout/body-text-viewport-edge.test.tsscript4.5 KB
scripts/detect/rules/layout/body-text-viewport-edge.tsscript4.4 KB
scripts/detect/rules/layout/clipped-overflow-container.test.tsscript2.7 KB
scripts/detect/rules/layout/clipped-overflow-container.tsscript945 B
scripts/detect/rules/layout/content-hidden-at-rest.test.tsscript4.1 KB
scripts/detect/rules/layout/content-hidden-at-rest.tsscript4.9 KB
scripts/detect/rules/layout/cramped-padding.test.tsscript4.9 KB
scripts/detect/rules/layout/cramped-padding.tsscript6.8 KB
scripts/detect/rules/layout/edge-flush-cards.test.tsscript2.5 KB
scripts/detect/rules/layout/edge-flush-cards.tsscript3.4 KB
scripts/detect/rules/layout/first-viewport-column-overflow.test.tsscript2.1 KB
scripts/detect/rules/layout/first-viewport-column-overflow.tsscript3.2 KB
scripts/detect/rules/layout/heading-rhythm.test.tsscript4.2 KB
scripts/detect/rules/layout/heading-rhythm.tsscript1.9 KB
scripts/detect/rules/layout/index.tsscript1.1 KB
scripts/detect/rules/layout/monotonous-spacing.test.tsscript1.3 KB
scripts/detect/rules/layout/monotonous-spacing.tsscript2.0 KB
scripts/detect/rules/layout/nested-cards.test.tsscript4.1 KB
scripts/detect/rules/layout/nested-cards.tsscript2.6 KB
scripts/detect/rules/layout/straggler.test.tsscript2.1 KB
scripts/detect/rules/layout/straggler.tsscript1.8 KB
scripts/detect/rules/layout/support/cards.tsscript7.2 KB
scripts/detect/rules/layout/support/clipping.tsscript4.8 KB
scripts/detect/rules/layout/support/declared-mockups.tsscript4.9 KB
scripts/detect/rules/layout/support/geometry.tsscript4.9 KB
scripts/detect/rules/layout/support/hidden-interface.tsscript2.5 KB
scripts/detect/rules/layout/support/layout-cases.tsscript1.3 KB
scripts/detect/rules/layout/support/line-breaks.tsscript1.7 KB
scripts/detect/rules/layout/support/motion.tsscript4.1 KB
scripts/detect/rules/layout/support/padding.tsscript5.1 KB
scripts/detect/rules/layout/support/rhythm.tsscript9.0 KB
scripts/detect/rules/layout/text-occlusion.test.tsscript2.9 KB
scripts/detect/rules/layout/text-occlusion.tsscript5.2 KB
scripts/detect/rules/layout/text-overflow.test.tsscript6.0 KB
scripts/detect/rules/layout/text-overflow.tsscript4.9 KB
scripts/detect/rules/layout/unbalanced-heading.test.tsscript1.3 KB
scripts/detect/rules/layout/unbalanced-heading.tsscript1.3 KB
scripts/detect/rules/layout/viewport-reflow.test.tsscript2.0 KB
scripts/detect/rules/layout/viewport-reflow.tsscript1.8 KB
scripts/detect/rules/source/ai-color-palette.test.tsscript564 B
scripts/detect/rules/source/ai-color-palette.tsscript888 B
scripts/detect/rules/source/aphoristic-cadence.test.tsscript622 B
scripts/detect/rules/source/aphoristic-cadence.tsscript984 B
scripts/detect/rules/source/border-accent-on-rounded.test.tsscript776 B
scripts/detect/rules/source/border-accent-on-rounded.tsscript1.5 KB
scripts/detect/rules/source/bounce-easing.test.tsscript1.1 KB
scripts/detect/rules/source/bounce-easing.tsscript1.8 KB
scripts/detect/rules/source/broken-image.test.tsscript1.2 KB

scripts/detect/rules/layout/support/rhythm.ts

View on GitHub
import { childrenOf, descendants, fontSizePx, isHeading, parentOf, styleOf } from "../../../core/page"
import type { ElementSnapshot, PageSnapshot } from "../../../types"
import { cardLike, fillDiffers } from "./cards"
import { alpha, borders, bottom, chain, length, outOfFlow, painted, right, textLines } from "./geometry"

export const paintsEdge = (el: ElementSnapshot, side: string): boolean =>
  alpha(el, "background-color") > 0.05 ||
  length(el, `border-${side}-width`) > 0 ||
  !["", "none"].includes(styleOf(el, "box-shadow")) ||
  (!styleOf(el, "background-clip").includes("text") &&
    !styleOf(el, "-webkit-background-clip").includes("text") &&
    !["", "none"].includes(styleOf(el, "background-image")) &&
    (styleOf(el, "background-size") === "cover" ||
      (styleOf(el, "background-image").includes("gradient(") &&
        ["auto", "auto auto", "100% 100%"].includes(styleOf(el, "background-size")))))

const separates = (s: PageSnapshot, el: ElementSnapshot): boolean =>
  borders(el).some(Boolean) || fillDiffers(s, el) || !["", "none"].includes(styleOf(el, "box-shadow"))
const spacer = (s: PageSnapshot, el: ElementSnapshot): boolean =>
  el.text === "" &&
  !separates(s, el) &&
  !(
    alpha(el, "background-color") > 0.05 &&
    chain(s, el)
      .slice(1)
      .some((n) => !["", "none"].includes(styleOf(n, "background-image")) && paintsEdge(n, "top"))
  ) &&
  ![el, ...descendants(s, el)].some(
    (n) => /^(img|video|canvas|iframe|svg|input|button)$/.test(n.tag) || (n !== el && separates(s, n)),
  )

const flow = (s: PageSnapshot, el: ElementSnapshot): boolean =>
  painted(s, el) &&
  !outOfFlow(el) &&
  styleOf(el, "position") !== "sticky" &&
  Number.parseFloat(styleOf(el, "opacity")) > 0.05 &&
  !["inline", "none"].includes(styleOf(el, "display"))

function flowBoxes(s: PageSnapshot, el: ElementSnapshot, heading: ElementSnapshot): readonly ElementSnapshot[] {
  if (styleOf(el, "display") === "contents") return childrenOf(s, el).flatMap((c) => flowBoxes(s, c, heading))
  if (!flow(s, el) || spacer(s, el)) return []
  if (Math.min(right(el.rect), right(heading.rect)) - Math.max(el.rect.x, heading.rect.x) < 8) return []
  return [el]
}

function repeats(s: PageSnapshot, row: ElementSnapshot, heading: ElementSnapshot): boolean {
  const p = parentOf(s, row)
  if (!p) return false
  const kids = childrenOf(s, p)
  const i = kids.indexOf(row)
  const laysOut = (n: ElementSnapshot): boolean =>
    styleOf(n, "display") !== "none" && !outOfFlow(n) && n.rect.width >= 1 && n.rect.height >= 1 && !spacer(s, n)
  const neighbours = [kids.slice(0, i).reverse().find(laysOut), kids.slice(i + 1).find(laysOut)]
  const path = (n: ElementSnapshot, stop: ElementSnapshot): readonly string[] => {
    const steps: string[] = []
    let current = n
    while (current !== stop) {
      const parent = parentOf(s, current)
      if (!parent) return []
      steps.unshift(`${current.tag}:${childrenOf(s, parent).indexOf(current)}`)
      current = parent
    }
    return steps
  }
  const shape = (root: ElementSnapshot): string[] => {
    const tags: string[] = []
    let budget = 24
    const walk = (node: ElementSnapshot, depth: number): void => {
      tags.push(node.tag)
      if (depth === 0) return
      for (const child of childrenOf(s, node).filter(
        (n) => styleOf(n, "display") !== "none" && !outOfFlow(n) && n.rect.width >= 1 && n.rect.height >= 1,
      )) {
        if (budget-- <= 0) return
        walk(child, depth - 1)
      }
    }
    walk(root, 3)
    return tags
  }
  const ownPath = path(heading, row).join("/")
  const ownShape = shape(row)
  return neighbours.some((n) => {
    if (
      !n ||
      n.tag !== row.tag ||
      ![...descendants(s, n)].some((h) => h.tag === heading.tag && path(h, n).join("/") === ownPath)
    )
      return false
    const other = shape(n)
    const total = ownShape.length + other.length
    let shared = 0
    for (const tag of ownShape) {
      const at = other.indexOf(tag)
      if (at >= 0) {
        shared++
        other.splice(at, 1)
      }
    }
    return (shared * 2) / total >= 0.7
  })
}

export function neighbour(
  s: PageSnapshot,
  heading: ElementSnapshot,
  before: boolean,
  start = heading,
): ElementSnapshot | null {
  let cursor = start
  for (let depth = 0; depth < 20; depth++) {
    const parent = parentOf(s, cursor)
    if (!parent) return null
    const siblings = childrenOf(s, parent)
    if (!before && cursor !== heading && repeats(s, cursor, heading)) return null
    const i = siblings.indexOf(cursor)
    const choices = (before ? siblings.slice(0, i) : siblings.slice(i + 1))
      .flatMap((n) => flowBoxes(s, n, heading))
      .filter((n) => (before ? bottom(n.rect) <= start.rect.y + 2 : n.rect.y >= bottom(heading.rect) - 2))
      .sort((a, b) => (before ? bottom(b.rect) - bottom(a.rect) : a.rect.y - b.rect.y))
    const found = choices[0]
    if (found) return found
    if (
      parent.tag === "body" ||
      separates(s, parent) ||
      (!before && (parent.tag === "main" || parent.attributes["role"] === "main"))
    )
      return null
    cursor = parent
  }
  return null
}

export function headingCluster(s: PageSnapshot, heading: ElementSnapshot, below: number): ElementSnapshot {
  let top = heading
  for (let count = 0; count < 3; count++) {
    const previous = neighbour(s, heading, true, top)
    if (
      !previous ||
      isHeading(previous) ||
      previous.text.length === 0 ||
      previous.text.length > 80 ||
      previous.rect.height > 60
    )
      break
    const gap = top.rect.y - bottom(previous.rect)
    const words = [previous, ...descendants(s, previous)].filter((n) => n.ownText !== "")
    const word = words[0] ?? previous
    const p = parentOf(s, previous)
    const opens =
      p !== null &&
      childrenOf(s, p).filter((n) => styleOf(n, "display") !== "none" && n.rect.width >= 1 && n.rect.height >= 1)[0] ===
        previous
    const lines = words.flatMap((n) => textLines(s, n))
    const label =
      fontSizePx(word) <= fontSizePx(heading) &&
      (fontSizePx(word) <= 14 ||
        styleOf(word, "text-transform") === "uppercase" ||
        length(word, "letter-spacing") >= fontSizePx(word) * 0.05 ||
        (opens &&
          (styleOf(word, "font-style") === "italic" ||
            Number.parseFloat(styleOf(word, "font-weight")) < 400 ||
            styleOf(word, "color") !== styleOf(heading, "color"))))
    const subtitle = opens && gap <= 2 && fontSizePx(word) <= fontSizePx(heading) && lines.length <= 1
    if (gap < 0 || (gap >= 28 && !(opens && gap < below && gap <= 64)) || !(label || subtitle) || lines.length > 1)
      break
    top = previous
  }
  return top
}

export function rhythmExempt(s: PageSnapshot, el: ElementSnapshot): boolean {
  if (!flow(s, el) || el.text.length < 3 || !["h2", "h3", "h4"].includes(el.tag) || paintsEdge(el, "top")) return true
  return chain(s, el).some(
    (a) => ["blockquote", "q", "nav", "footer"].includes(a.tag) || (a !== el && cardLike(s, a) && a.rect.height < 200),
  )
}

export function closesInProse(
  s: PageSnapshot,
  el: ElementSnapshot,
  heading: ElementSnapshot,
  textSize: number,
): boolean {
  const blocks = [el, ...descendants(s, el)].filter(
    (n) => ["p", "li", "dd", "div"].includes(n.tag) && n.ownText !== "" && flow(s, n),
  )
  const last = blocks.sort((a, b) => bottom(b.rect) - bottom(a.rect))[0]
  return (
    last !== undefined &&
    last.text.length >= 80 &&
    textLines(s, last).length >= 2 &&
    last.rect.width >= heading.rect.width * 0.5 &&
    fontSizePx(last) < fontSizePx(heading) &&
    fontSizePx(last) <= textSize * 1.25
  )
}

export function separatesBelow(s: PageSnapshot, el: ElementSnapshot): boolean {
  if (el.tag === "hr" || el.rect.height <= 4) return true
  let node: ElementSnapshot | undefined = el
  let framed = false
  for (let depth = 0; depth < 8 && node; depth++) {
    const current = node
    framed ||= ["top", "left", "right"].some((side) => length(current, `border-${side}-width`) > 0)
    if (
      (!framed && length(node, "border-bottom-width") > 0 && node.rect.width >= el.rect.width * 0.9) ||
      (/^(img|picture|video|canvas|svg|iframe)$/.test(node.tag) && node.rect.width >= el.rect.width * 0.5) ||
      isHeading(node)
    )
      return true
    node = [...childrenOf(s, node)]
      .reverse()
      .find(
        (n) =>
          styleOf(n, "display") !== "none" &&
          n.rect.width >= 1 &&
          n.rect.height >= 1 &&
          bottom(n.rect) >= bottom(el.rect) - 2,
      )
  }
  return false
}

export function contentBottom(s: PageSnapshot, el: ElementSnapshot): number {
  let node = el
  for (let depth = 0; depth < 8; depth++) {
    if (paintsEdge(node, "bottom") || /^(img|picture|video|canvas|svg|iframe)$/.test(node.tag))
      return Math.min(bottom(node.rect), bottom(el.rect))
    const lowest = childrenOf(s, node)
      .filter((n) => flow(s, n) && !spacer(s, n))
      .sort((a, b) => bottom(b.rect) - bottom(a.rect))[0]
    if (!lowest) return Math.min(bottom(el.rect), bottom(node.rect) - Math.max(0, length(node, "padding-bottom")))
    node = lowest
  }
  return Math.min(bottom(el.rect), bottom(node.rect))
}
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall