kata-prompts
by yh594774855
README.md
# 招式库 · kata-prompts
A personal prompt library where prompts evolve with retrospectives: every prompt has a version, structured
lessons (helped / hurt / noise), a changelog and measured results. Use it on the web, over HTTP, or as an MCP server.
- Web: https://prompts.5aos.com
- MCP (stateless JSON-RPC, Streamable-HTTP compatible POST): `https://prompts.5aos.com/mcp`
- HTTP API: `GET /api/prompts?q=&type=&tag=&page=` · `GET /api/prompts/<id>` · `POST /api/prompts/<id>/render {"variables":{...}}` · `GET /api/types`
> 中文:一个"随复盘升级"的提示词库。每条提示有版本、结构化教训、变更记录和效果记录。网页、HTTP API、MCP 三种用法。
## License — read before use / 使用前请阅读
| What | License |
|---|---|
| Prompt content (`prompts/`, `partials/`) | **CC BY-NC-SA 4.0** — attribution, **non-commercial**, share-alike |
| Code (everything else) | **AGPL-3.0-or-later** — if you run a modified version as a network service, you must publish its source |
**Commercial use (selling these prompts, bundling them in a paid product or a closed-source service) requires prior written permission.** Open an issue to ask.
**商业使用(出售提示词、打包进收费产品或闭源服务)须事先取得书面授权。** 请开 issue 联系。
This public repository holds the *general* editions only. It is a sanitized export of a private source repository.
## Prompt format
One folder per prompt: `prompts/<type>/<slug>/`
```
prompt.md YAML front matter + body
lessons.md structured lessons (YAML list)
CHANGELOG.md version log
results.jsonl version -> measured effect
evals/ optional promptfoo config
```
Front matter fields: `id, title, description, version (semver), label (production|staging), type, tags, lang, models,
visibility, edition, variables[{name, desc, required, default}], includes, acceptance, evals, updated`.
See `schema/prompt.schema.json`.
Template syntax: `{{NAME}}` variables (defaults may reference other variables), `{{> partials/x}}` includes,
`{{lessons:top N}}` lesson injection at build time, `\{{` for a literal `{{`. The renderer only substitutes text;
it never evaluates code. Missing variables are returned as `missingVariables` so an agent can ask and call again.
Types: `coding-task, review, blind-test, fix-list, writing, scheduled, browser-op, research, partial`.
## MCP
Tools: `search_prompts`, `get_prompt`, `list_types` (public) and `submit_lesson`, `record_result`
(Bearer token required; submissions are queued for maintainer review, nothing changes until merged).
Native MCP prompts: `prompts/list`, `prompts/get` (missing arguments → error `-32602` with `data.missingVariables`).
Example client config:
```json
{ "mcpServers": { "kata-prompts": { "type": "http", "url": "https://prompts.5aos.com/mcp" } } }
```
## Develop
```bash
npm ci
npm test # renderer + worker tests
node scripts/lint.mjs --dir . --public
node scripts/build.mjs --dir . --out dist
git config core.hooksPath .githooks # gitleaks pre-commit (install gitleaks first)
```
Security policy and the latest self-test: see [SECURITY.md](SECURITY.md).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues