Skip to content

fcakyon/claude-codex-settings / plugins/heroui-skills/skills/heroui-native

heroui-native

Verified

HeroUI Native component library for React Native (Tailwind v4 via Uniwind). Use when building mobile UIs with HeroUI Native — creating Buttons, Cards, TextFields, Dialogs; installing heroui-native; configuring dark/light themes; or fetching component docs. Keywords: HeroUI Native, heroui-native, React Native UI, Uniwind, mobile components.

FileKindSize
LICENSE.txtmarkdown11.0 KB
SKILL.mdskill md7.1 KB
scripts/get_component_docs.mjsscript3.9 KB
scripts/get_docs.mjsscript4.1 KB
scripts/get_theme.mjsscript5.1 KB
scripts/list_components.mjsscript3.6 KB

scripts/get_docs.mjs

View on GitHub
#!/usr/bin/env node
/**
 * Get non-component HeroUI Native documentation (guides, theming, releases).
 *
 * Usage:
 *   node get_docs.mjs /docs/native/getting-started/theming
 *   node get_docs.mjs /docs/native/releases/beta-12
 *
 * Output:
 *   MDX documentation content
 *
 * Note: For component docs, use get_component_docs.mjs instead.
 */

const API_BASE = process.env.HEROUI_NATIVE_API_BASE || "https://native-mcp-api.heroui.com";
const FALLBACK_BASE = "https://heroui.com";
const APP_PARAM = "app=native-skills";

/**
 * Fetch documentation from HeroUI Native API.
 * Uses v1 endpoint pattern: /v1/docs/:path
 */
async function fetchApi(path) {
  // The v1 API expects path without /docs/ prefix
  // Input: /docs/native/getting-started/theming
  // API expects: native/getting-started/theming (route is /v1/docs/:path(*))
  let apiPath = path.startsWith("/docs/")
    ? path.slice(6) // Remove /docs/ prefix
    : path.startsWith("/")
      ? path.slice(1) // Remove leading /
      : path;

  const separator = "?";
  const url = `${API_BASE}/v1/docs/${apiPath}${separator}${APP_PARAM}`;

  try {
    const response = await fetch(url, {
      headers: {"User-Agent": "HeroUI-Native-Skill/1.0"},
      signal: AbortSignal.timeout(30000),
    });

    if (!response.ok) {
      console.error(`# API Error: HTTP ${response.status}`);

      return null;
    }

    return await response.json();
  } catch (error) {
    console.error(`# API Error: ${error.message}`);

    return null;
  }
}

/**
 * Fetch MDX directly from v3.heroui.com as fallback.
 */
async function fetchFallback(path) {
  // Ensure path starts with /docs and ends with .mdx
  let cleanPath = path.replace(/^\//, "");

  if (!cleanPath.endsWith(".mdx")) {
    cleanPath = `${cleanPath}.mdx`;
  }

  const url = `${FALLBACK_BASE}/${cleanPath}`;

  try {
    const response = await fetch(url, {
      headers: {"User-Agent": "HeroUI-Native-Skill/1.0"},
      signal: AbortSignal.timeout(30000),
    });

    if (!response.ok) {
      return {error: `HTTP ${response.status}: ${response.statusText}`, path};
    }

    const content = await response.text();

    return {
      content,
      contentType: "mdx",
      path,
      source: "fallback",
      url,
    };
  } catch (error) {
    return {error: `Fetch Error: ${error.message}`, path};
  }
}

/**
 * Main function to get documentation for specified path.
 */
async function main() {
  const args = process.argv.slice(2);

  if (args.length === 0) {
    console.error("Usage: node get_docs.mjs <path>");
    console.error("Example: node get_docs.mjs /docs/native/getting-started/theming");
    console.error();
    console.error("Available paths include:");
    console.error("  /docs/native/getting-started/theming");
    console.error("  /docs/native/getting-started/colors");
    console.error("  /docs/native/getting-started/styling");
    console.error("  /docs/native/releases/beta-12");
    console.error();
    console.error("Note: For component docs, use get_component_docs.mjs instead.");
    process.exit(1);
  }

  const path = args[0];

  // Check if user is trying to get component docs
  if (path.includes("/components/")) {
    console.error("# Warning: Use get_component_docs.mjs for component documentation.");
    const componentName = path.split("/").pop().replace(".mdx", "");
    const titleCase = componentName.charAt(0).toUpperCase() + componentName.slice(1);

    console.error(`# Example: node get_component_docs.mjs ${titleCase}`);
  }

  // Validate Native path
  if (!path.startsWith("/docs/native/")) {
    console.error("# Warning: Native documentation paths should start with /docs/native/");
    console.error(`# Provided path: ${path}`);
  }

  console.error(`# Fetching Native documentation for ${path}...`);

  // Try API first
  const data = await fetchApi(path);

  if (data && data.content) {
    data.source = "api";
    console.log(data.content);

    return;
  }

  // Fallback to direct fetch
  console.error("# API failed, using fallback...");
  const fallbackData = await fetchFallback(path);

  if (fallbackData.content) {
    console.log(fallbackData.content);
  } else {
    console.log(JSON.stringify(fallbackData, null, 2));
    process.exit(1);
  }
}

main();
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 321kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 197kUpdated Claude CodeCodexVerifiedInstall