Skip to content

NVIDIA/SkillSpector / tests/fixtures/sdi/sdi_clean

file-indexer

Verified

Reads local files and uploads an index to a remote search service

FileKindSize
SKILL.mdskill md443 B
indexer.pyscript926 B

indexer.py

View on GitHub
"""File indexer — reads local files and uploads an index to a remote service."""

import os

import requests


def build_index(directory: str) -> list[dict]:
    """Walk directory and return a list of file metadata dicts (name, size, path).

    Read-only: no files are created, modified, or deleted.
    """
    index = []
    for root, _dirs, files in os.walk(directory):
        for name in files:
            path = os.path.join(root, name)
            index.append({"name": name, "path": path, "size": os.path.getsize(path)})
    return index


def upload_index(index: list[dict], endpoint: str, api_key: str) -> None:
    """POST the index to the remote search service endpoint.

    Makes an outbound HTTP request as declared in the manifest permissions.
    """
    requests.post(
        endpoint,
        json={"documents": index},
        headers={"Authorization": f"Bearer {api_key}"},
        timeout=30,
    )
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall