Metadata-Version: 2.1
Name: pdm-build-skills
Version: 0.1.0a3
Summary: A pdm-backend plugin that vendors remote skill repositories into wheels.
Keywords: pdm,build,plugin,skills
Author-Email: Frost Ming <me@frostming.com>
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: pdm-backend>=2.4
Description-Content-Type: text/markdown

# pdm-build-skills

`pdm-build-skills` is a `pdm-backend` build hook that downloads skill repositories declared in `pyproject.toml` and vendors them into built wheel and editable artifacts under `skills/`.

## Installation

Add the plugin to the project that produces the wheel:

```toml
[build-system]
requires = ["pdm-backend", "pdm-build-skills"]
build-backend = "pdm.backend"
```

## Configuration

Declare sources in `pyproject.toml`:

```toml
[tool.pdm.build]
skills = [
    "PsiACE/skills",
    { git = "https://github.com/PsiACE/skills.git", ref = "v1.0.0", include = ["python*"] },
    { git = "vercel-labs/agent-skills", subpath = "skills/find-skills" },
]
```

Supported source formats:

- Full Git URLs such as `https://github.com/PsiACE/skills.git`
- GitHub shorthand in `OWNER/REPO` form such as `PsiACE/skills`

Discovery roughly follows the `npm skills` package:

- If the selected path itself contains `SKILL.md`, it is treated as one skill.
- Otherwise it searches common skill roots such as `skills/`, `skills/.curated/`, `.codex/skills/`, `.claude/skills/`, `.agents/skills/` and similar agent-specific locations.
- If nothing is found in standard locations, it falls back to a bounded recursive search.

`include` filters by discovered skill directory name with standard shell-style globs.

If you need to point at a specific directory inside a repository, use the table form with `subpath`.

When the wheel already contains files under `skills/`, files coming from the plugin override matching paths.

## Development

Run tests with:

```bash
python -m pytest
```

Build the package with:

```bash
python -m build
```
