Skip to content

RandallLiuXin/GodotMaker / skills/assets/card-kit

card-kit

Verified

Produce reusable card art sources and native Godot card UI resources.

standalone_validation.py

View on GitHub
"""Standalone Card Kit validation entry point."""
from __future__ import annotations

import sys
from pathlib import Path


def _configure_runtime_imports() -> None:
    """Add the source or published shared runtime to the import path."""
    runner = Path(__file__).resolve()
    project_root = runner.parents[3]
    source_runtime = runner.parents[1] / "_shared"
    runtime_candidates = (
        project_root / ".godotmaker" / "asset-runtime",
        source_runtime,
    )
    source_layout = (
        runner.parents[1].name == "assets"
        and runner.parents[2].name == "skills"
    )
    runtime = next(
        (
            path for path in runtime_candidates
            if path.is_dir() and (path != source_runtime or source_layout)
        ),
        None,
    )
    tools = project_root / "tools"
    if runtime is None:
        raise ImportError(
            "GodotMaker asset runtime is missing for standalone card-kit validation: "
            "checked " + ", ".join(str(path) for path in runtime_candidates)
        )
    if not tools.is_dir():
        raise ImportError(
            "GodotMaker tools directory is missing for standalone card-kit validation: "
            f"expected {tools}"
        )
    # Appended, never inserted: these flat directories must not shadow the
    # standard library or installed packages for the rest of the process.
    for path in (str(runtime), str(tools)):
        if path not in sys.path:
            sys.path.append(path)


_configure_runtime_imports()

from ui_card_standalone_validation import UICardSkillError, compile_and_validate as _compile_and_validate  # noqa: E402


def compile_and_validate(request, result, *, project_root, godot_path):
    return _compile_and_validate(request, result, project_root=project_root, godot_path=godot_path, expected_family="card-kit")

__all__ = ["UICardSkillError", "compile_and_validate"]
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: 322kUpdated 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: 198kUpdated 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: 198kUpdated 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: 198kUpdated Claude CodeCodexVerifiedInstall