Metadata-Version: 2.5
Name: promptex-py
Version: 0.0.1a1
Summary: promptex 的 Python SDK 最小原型（alpha）：宣告 skill 並投影成 SKILL.md
Project-URL: Homepage, https://github.com/promptex-ai/promptex
Project-URL: Repository, https://github.com/promptex-ai/promptex
Project-URL: Issues, https://github.com/promptex-ai/promptex/issues
Author: promptex-ai
License: MIT OR Apache-2.0
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
Keywords: agent,ai,claude,codegen,llm,prompt,prompt-engineering,skills
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Code Generators
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# promptex-py（alpha 原型）

promptex 的 Python SDK **最小原型**。目前的能力只有一項：宣告 skill，建置成
Claude Code 的 `SKILL.md` 產物。

## 這不是什麼

本套件是早期 alpha，**不是**完整的 promptex。正式版的單一套件內含 SDK、核心的
預編譯二進位綁定與完整命令列工具三者；本原型只有 SDK 的最窄一條路徑，命令列
工具只有 `build` 一個動詞，沒有原生綁定、沒有多平台投影、沒有引用與關係圖、
沒有安裝與所有權登記。

介面與產物格式在正式版之前都會變，不保證任何相容性。正式版發布時本原型會被
整份取代。

## 安裝

```bash
pip install --pre promptex-py
```

需要 Python 3.10 以上。`--pre` 是必要的：預發布版號不會被 pip 預設選中。

## 用法

把宣告寫在 `prompts/` 下：

```python
# prompts/skill.py
from promptex import config, define_skill

commit_helper = define_skill(
    "commit-helper",
    "Commit 訊息協助",
    config=config(when_to_use="當使用者要求撰寫 commit 訊息時使用"),
    content=[
        "依 Conventional Commits 撰寫：type(scope): subject。",
        "subject 用繁體中文、50 字內，不以句號結尾；body 說明變更動機而非變更內容。",
    ],
)
```

建置：

```bash
promptex build
```

產出 `./.claude/skills/commit-helper/SKILL.md`：

```text
---
name: commit-helper
description: 當使用者要求撰寫 commit 訊息時使用
---

依 Conventional Commits 撰寫：type(scope): subject。

subject 用繁體中文、50 字內，不以句號結尾；body 說明變更動機而非變更內容。
```

### 命令列選項

```text
promptex build [--src <目錄>] [--out <目錄>]

  --src <目錄>   宣告檔所在目錄，預設 prompts
  --out <目錄>   產物輸出目錄，預設當前目錄
```

### 程式化呼叫

```python
from promptex import build, config, define_skill

define_skill("commit-helper", "Commit 訊息協助", config=config(when_to_use="..."), content="...")
written = build(".")
```

## 授權

MIT OR Apache-2.0，見 `LICENSE-MIT` 與 `LICENSE-APACHE`。
