mirror of
https://github.com/tradecatlabs/vibe-coding-cn.git
synced 2026-08-18 21:38:05 +00:00
chore: governance - tighten repo hygiene
This commit is contained in:
+60
-250
@@ -1,282 +1,92 @@
|
||||
<!--
|
||||
-------------------------------------------------------------------------------
|
||||
项目头部区域 (HEADER)
|
||||
这是用户第一眼看到的地方。一个精美的横幅或 Logo 能立刻提升专业感。
|
||||
-------------------------------------------------------------------------------
|
||||
-->
|
||||
<p align="center">
|
||||
<!-- 建议尺寸: 1280x640px。可以使用 Canva, Figma 或 https://banners.beyondco.de/ 等工具制作 -->
|
||||
<img src="https://github.com/tukuaiai.png" alt="项目横幅">
|
||||
</p>
|
||||
# prompts-library
|
||||
|
||||
<div align="center">
|
||||
`tools/prompts-library/` 是本仓内的提示词格式转换工具,用于在 Excel、Markdown 和 JSONL 之间转换提示词资产。
|
||||
|
||||
# Prompt Library
|
||||
它不是独立仓库首页,也不再引用旧的 `tukuaiai/prompt-library` 仓库口径。当前目录作为 `vibe-coding-cn` 的内部工具维护。
|
||||
|
||||
**一个全面的高质量AI提示词库,支持Excel和Markdown格式之间的双向转换。**
|
||||
## 功能
|
||||
|
||||
---
|
||||
- Excel -> Markdown:把表格提示词导出为 Markdown 文档目录。
|
||||
- Markdown -> Excel:把 Markdown 文档目录还原为 Excel 工作簿。
|
||||
- Markdown -> JSONL:把 Markdown 提示词转换为 JSONL。
|
||||
- JSONL -> Excel:把 JSONL 数据转换为 Excel。
|
||||
- Excel(JSONL) -> JSONL:把内部 JSONL 格式的 Excel 按工作表拆成 JSONL 文件。
|
||||
|
||||
<!--
|
||||
徽章区域 (BADGES)
|
||||
从 https://shields.io/ 生成。选择与你的品牌色一致的颜色。
|
||||
建议包含:构建状态, 版本, 许可证, 语言, 代码大小, 下载量, 社区链接等。
|
||||
-->
|
||||
<p>
|
||||
<a href="https://github.com/tukuaiai/prompt-library/actions/workflows/sync.yml"><img src="https://img.shields.io/github/actions/workflow/status/tukuaiai/prompt-library/sync.yml?style=for-the-badge" alt="构建状态"></a>
|
||||
<a href="https://github.com/tukuaiai/prompt-library/releases"><img src="https://img.shields.io/github/v/release/tukuaiai/prompt-library?style=for-the-badge" alt="最新版本"></a>
|
||||
<a href="https://github.com/tukuaiai/prompt-library/blob/main/LICENSE"><img src="https://img.shields.io/github/license/tukuaiai/prompt-library?style=for-the-badge" alt="许可证"></a>
|
||||
<a href="https://github.com/tukuaiai/prompt-library"><img src="https://img.shields.io/github/languages/top/tukuaiai/prompt-library?style=for-the-badge" alt="主要语言"></a>
|
||||
<a href="https://github.com/tukuaiai/prompt-library"><img src="https://img.shields.io/github/languages/code-size/tukuaiai/prompt-library?style=for-the-badge" alt="代码大小"></a>
|
||||
</p>
|
||||
## 目录结构
|
||||
|
||||
[✨ 功能特性](#功能特性) •
|
||||
[🚀 快速开始](#快速开始) •
|
||||
[⚙️ 架构与工作流程](#architecture-workflow) •
|
||||
[🤝 参与贡献](#参与贡献) •
|
||||
[🗺️ 路线图](#roadmap)
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
-------------------------------------------------------------------------------
|
||||
概览与核心视觉区域 (OVERVIEW & VISUALS)
|
||||
展示项目最直观的部分。
|
||||
-------------------------------------------------------------------------------
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
## 🖼️ 概览与演示
|
||||
|
||||
本词库是一个结构化的、高质量的AI提示词(Prompts)集合,旨在为开发人员、研究人员和内容创作者提供强大而灵活的工具。与许多静态的提示词列表不同,本项目提供了一个双向转换的工作流程,允许用户在易于协作的Excel格式和便于版本控制的Markdown格式之间无缝切换。
|
||||
|
||||
> **核心理念**: 让高质量的提示词像代码一样被管理、分享和迭代。
|
||||
|
||||
<p align="center">
|
||||
<!-- 建议使用 GIF,工具: ScreenToGif, GIPHY CAPTURE -->
|
||||
<img src="https://user-images.githubusercontent.com/12523395/269150161-1a83689c-2f3a-4a0e-8d18-114cec03be8d.gif" alt="项目演示动画" width="80%">
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
-------------------------------------------------------------------------------
|
||||
主要内容区域 (MAIN CONTENT)
|
||||
详细介绍项目的方方面面。
|
||||
-------------------------------------------------------------------------------
|
||||
-->
|
||||
|
||||
## ✨ 功能特性
|
||||
|
||||
- 📊 **双向转换**: 支持Excel ↔️ Markdown格式互转,兼顾易用性与版本控制。
|
||||
- 🗂️ **结构化管理**: 包含多个分类,覆盖从软件工程到哲学思辨的广泛领域。
|
||||
- 🤖 **多平台兼容**: 提示词设计兼容Claude、GPT、Gemini等主流AI模型。
|
||||
- 🛠️ **自动化工具**: 提供命令行工具,支持批量转换和管理。
|
||||
- 🎨 **易于扩展**: 可以方便地添加新的提示词、分类和自定义属性。
|
||||
|
||||
---
|
||||
|
||||
<a id="architecture-workflow"></a>
|
||||
|
||||
## ⚙️ 架构与工作流程
|
||||
|
||||
本项目的工作流程围绕“以结构化数据为中心”的思想构建。
|
||||
|
||||
```mermaid
|
||||
graph LR
|
||||
subgraph "Excel-First 工作流"
|
||||
A[1. 在 Excel 中编辑提示词] --> B{运行转换脚本};
|
||||
end
|
||||
|
||||
subgraph "Git-Native 工作流"
|
||||
D[3. 在 Markdown 文件中编辑] --> E{运行转换脚本};
|
||||
end
|
||||
|
||||
subgraph "中央产物"
|
||||
B --> C[2. 生成结构化的 Markdown 文件];
|
||||
E --> F[4. 更新或生成 Excel 文件]
|
||||
end
|
||||
|
||||
style A fill:#D5E8D4
|
||||
style D fill:#DAE8FC
|
||||
style C fill:#F8CECC
|
||||
style F fill:#F8CECC
|
||||
```text
|
||||
tools/prompts-library/
|
||||
README.md
|
||||
AGENTS.md
|
||||
main.py
|
||||
requirements.txt
|
||||
docs/
|
||||
scripts/
|
||||
```
|
||||
这个流程确保了无论是喜欢电子表格的非技术人员,还是习惯于Git和代码编辑器的开发人员,都可以高效地协作。
|
||||
|
||||
---
|
||||
|
||||
## 🚀 快速开始
|
||||
|
||||
### 1. 环境依赖
|
||||
|
||||
- [Python](https://www.python.org/) >= 3.8
|
||||
|
||||
### 2. 安装
|
||||
|
||||
<details>
|
||||
<summary><b>从源码构建</b>(点击展开/收起)</summary>
|
||||
## 安装依赖
|
||||
|
||||
```bash
|
||||
git clone https://github.com/tukuaiai/prompt-library.git
|
||||
cd prompt-library
|
||||
pip install -r requirements.txt
|
||||
cd tools/prompts-library
|
||||
python3 -m pip install -r requirements.txt
|
||||
```
|
||||
</details>
|
||||
|
||||
### 3. 使用
|
||||
部分辅助脚本有单独依赖:
|
||||
|
||||
<details>
|
||||
<summary><b>Excel → Markdown 转换</b>(点击展开/收起)</summary>
|
||||
```bash
|
||||
python3 -m pip install -r scripts/requirements.txt
|
||||
```
|
||||
|
||||
## 常用命令
|
||||
|
||||
查看入口参数:
|
||||
|
||||
```bash
|
||||
python3 main.py --help
|
||||
```
|
||||
|
||||
交互式转换:
|
||||
|
||||
```bash
|
||||
# 运行交互式转换
|
||||
python3 main.py
|
||||
```
|
||||
程序将扫描 `prompt_excel` 目录下的 `.xlsx` 文件,并让你选择一个进行转换。结果将输出到 `prompt_docs` 目录下一个带时间戳的文件夹中。
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Markdown → Excel 转换</b>(点击展开/收起)</summary>
|
||||
指定转换模式:
|
||||
|
||||
```bash
|
||||
# 运行交互式转换
|
||||
python3 main.py
|
||||
```
|
||||
程序将扫描 `prompt_docs` 目录,让你选择一个文档集,然后将其转换回 Excel 文件,并输出到 `prompt_excel` 目录下一个带时间戳的文件夹中。
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>非交互式转换</b>(点击展开/收起)</summary>
|
||||
|
||||
```bash
|
||||
# 指定要转换的 Excel 文件
|
||||
python3 main.py --select "prompt_excel/your_file.xlsx"
|
||||
|
||||
# 指定要转换的 Markdown 目录
|
||||
python3 main.py --select "prompt_docs/your_docs_folder"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Gemini 无头:Markdown → JSONL 批处理</b>(点击展开/收起)</summary>
|
||||
|
||||
```bash
|
||||
# 将目录中的 .md 提示词批量转为 JSONL(默认输入 2/,输出 2/prompts.jsonl)
|
||||
python3 scripts/gemini_jsonl_batch.py --input 2 --output 2/prompts.jsonl --model gemini-2.5-flash
|
||||
```
|
||||
|
||||
- 脚本内置固定系统提示词,调用 `gemini --allowed-tools '' --output-format text` 确保纯文本 JSONL。
|
||||
- 需要本地已登录的 Gemini CLI;如需代理,请自行设置 `http_proxy/https_proxy` 环境变量。
|
||||
- 可用 `-v` 查看逐文件处理日志,`--gemini-cmd` 自定义 CLI 可执行路径。
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>内部 JSONL Excel → JSONL 目录</b>(点击展开/收起)</summary>
|
||||
|
||||
```bash
|
||||
# 将内部 JSONL 格式的 xlsx 按工作表拆分为多个 jsonl 文件
|
||||
python3 main.py --select "prompt_excel/example.xlsx" --mode excel2docs
|
||||
python3 main.py --select "prompt_docs/example" --mode docs2excel
|
||||
python3 main.py --select "prompt_docs/example" --mode docs2jsonl
|
||||
python3 main.py --select "prompt_jsonl/example.jsonl" --mode jsonl2excel
|
||||
python3 main.py --select "prompt_excel/prompt_jsonl.xlsx" --mode jsonl_excel2jsonl
|
||||
```
|
||||
|
||||
- 输出目录格式为 `prompt_jsonl/<excel_name>_<timestamp>/`
|
||||
- 每个工作表输出一个独立的 `.jsonl` 文件
|
||||
- 文件名格式为 `<序号>_<sheet_name>.jsonl`
|
||||
- 若工作表中没有标准 JSON 单元格,会对纯文本单元格做 JSONL 兜底转换
|
||||
- 自动忽略名为 `说明` 的工作表
|
||||
</details>
|
||||
无交互执行:
|
||||
|
||||
---
|
||||
|
||||
<details>
|
||||
<summary>❓ 常见问题 (FAQ) (可选)(点击展开/收起)</summary>
|
||||
|
||||
- **Q: 为什么转换会失败?**
|
||||
- **A:** 请确保您的Excel文件格式与提供的示例一致,特别是工作表(Sheet)的名称和列的标题。
|
||||
|
||||
- **Q: 我可以添加自己的转换逻辑吗?**
|
||||
- **A:** 当然可以。核心逻辑位于 `scripts/` 目录下,您可以自由修改或扩展它们。
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
-------------------------------------------------------------------------------
|
||||
社区与治理区域 (COMMUNITY & GOVERNANCE)
|
||||
展示项目的健康度和发展方向。
|
||||
-------------------------------------------------------------------------------
|
||||
-->
|
||||
|
||||
<a id="roadmap"></a>
|
||||
|
||||
## 🗺️ 路线图
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title 项目发展路线图
|
||||
dateFormat YYYY-MM
|
||||
section 核心功能
|
||||
双向转换脚本 :done, 2024-10, 30d
|
||||
交互式CLI :done, 2024-11, 20d
|
||||
section 未来计划
|
||||
Web界面 :2025-01, 30d
|
||||
更丰富的导出格式 :2025-02, 20d
|
||||
云同步功能 : 2025-03, 30d
|
||||
```bash
|
||||
python3 main.py --select "prompt_excel/example.xlsx" --mode excel2docs --non-interactive
|
||||
```
|
||||
|
||||
---
|
||||
## 输入输出约定
|
||||
|
||||
## 🤝 参与贡献
|
||||
- 默认 Excel 输入目录:`prompt_excel/`
|
||||
- 默认 Markdown 输入/输出目录:`prompt_docs/`
|
||||
- 默认 JSONL 输出目录:`prompt_jsonl/`
|
||||
- `prompt_jsonl/` 是生成物,已在 `.gitignore` 中忽略。
|
||||
|
||||
我们热烈欢迎各种形式的贡献!如果您对本项目有任何想法或建议,请随时开启一个 [Issue](https://github.com/tukuaiai/prompt-library/issues) 或提交一个 [Pull Request](https://github.com/tukuaiai/prompt-library/pulls)。
|
||||
## 维护规则
|
||||
|
||||
在您开始之前,请花点时间阅读我们的 [**贡献指南 (CONTRIBUTING.md)**](https://github.com/tukuaiai/prompt-library/blob/main/CONTRIBUTING.md) 和 [**行为准则 (CODE_OF_CONDUCT.md)**](https://github.com/tukuaiai/prompt-library/blob/main/CODE_OF_CONDUCT.md)。
|
||||
- 修改转换逻辑时,优先阅读 `main.py` 和 `scripts/` 中对应脚本。
|
||||
- 新增依赖必须同步更新 `requirements.txt` 或 `scripts/requirements.txt`。
|
||||
- 不提交生成目录、缓存、临时导出或本地凭证。
|
||||
- 修改后至少运行:
|
||||
|
||||
### ✨ 贡献者们
|
||||
```bash
|
||||
python3 main.py --help
|
||||
```
|
||||
|
||||
感谢所有为本项目做出贡献的开发者!
|
||||
如改动影响仓库文档或链接,还需要在仓库根目录运行:
|
||||
|
||||
<a href="https://github.com/tukuaiai/prompt-library/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=tukuaiai/prompt-library" />
|
||||
</a>
|
||||
|
||||
---
|
||||
|
||||
## 🛡️ 安全策略
|
||||
|
||||
我们非常重视项目的安全性。如果您发现了任何安全漏洞,请不要公开讨论,而是通过电子邮件 `tukuaiai@example.com` 与我们联系。
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
-------------------------------------------------------------------------------
|
||||
页脚区域 (FOOTER)
|
||||
最后的行动号召和感谢。
|
||||
-------------------------------------------------------------------------------
|
||||
-->
|
||||
|
||||
## 📜 许可证
|
||||
|
||||
本项目采用 [MIT](https://github.com/tukuaiai/prompt-library/blob/main/LICENSE) 许可证。
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
**如果这个项目对您有帮助,请不要吝啬您的 Star ⭐!**
|
||||
|
||||
<!-- Star History: https://star-history.com/ -->
|
||||
<a href="https://star-history.com/#tukuaiai/prompt-library&Date">
|
||||
<img src="https://api.star-history.com/svg?repos=tukuaiai/prompt-library&type=Date" alt="Star History Chart" width="80%">
|
||||
</a>
|
||||
|
||||
<br>
|
||||
|
||||
**Made with ❤️ by tukuaiai**
|
||||
|
||||
[⬆ 回到顶部](#prompt-library)
|
||||
|
||||
</div>
|
||||
```bash
|
||||
make test
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user