INNER CODE UNIT · Python

_validate_skill_dir

ghost-in-the-droid/android-agent · gitd/cli.py:172

def _validate_skill_dir(skill_dir: Path, verbose: bool = True) -> bool:
    """Validate a skill directory. Returns True if valid."""
    ok = True

    # Check skill.yaml exists and has required fields
    skill_yaml = skill_dir / "skill.yaml"
    if not skill_yaml.exists():
        if verbose:
            logger.error("  FAIL: skill.yaml not found in %s", skill_dir)
        return False

    try:
        meta = yaml.safe_load(skill_yaml.read_text())
        if not isinstance(meta, dict):
            if verbose:
                logger.error("  FAIL: skill.yaml is not a valid YAML mapping")
            return False
    except Exception as e:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…