Node-first pipeline that turns WordPress sources into a reusable skill.md.
- Ingests WordPress JSON, URL, or pasted JSON in the UI
- Normalizes posts/pages into a corpus
- Analyzes two tracks:
- Knowledge
- Persona (writing tone/style)
- Builds artifacts:
skill.md(primary)knowledge.mdpersona.mdrag.jsonmeta.json
- Stores profiles under
profiles/{slug}/with version snapshots
- English (
en) - Traditional Chinese (
zh-TW)
aimode: usesOPENAI_API_KEYand model generationparsermode: deterministic fallback when no API key is present
If OPENAI_API_KEY is missing, the system automatically falls back to parser mode.
npm install
npm run devOpen http://localhost:3000.
OPENAI_API_KEY(optional)OPENAI_MODEL(optional, defaultgpt-4.1-mini)PORT(optional, default3000)BLOB_READ_WRITE_TOKEN(optional, required for persistent storage on Vercel)
Storage behavior:
- If
BLOB_READ_WRITE_TOKENis present, profile data is saved to Vercel Blob. - Otherwise, profile data is saved to local filesystem under
profiles/{slug}/.
This repo includes vercel.json tuned for Express.
Recommended project settings:
- Framework Preset: Other
- Root Directory: repository root
- Production Branch:
main - Environment Variables:
OPENAI_API_KEY(optional)OPENAI_MODEL(optional)BLOB_READ_WRITE_TOKEN(required if you use profile save/update/rollback in production)
POST /api/normalize- body:
{ "data": <wordpress_json> }
- body:
POST /api/extract-url- body:
{ "url": "https://example.wordpress.com/" }
- body:
POST /api/analyze- body:
{ "items": [...], "options": { "language": "en|zh-TW|auto", "mode": "parser|ai" } }
- body:
POST /api/build- body:
{ "slug": "x", "name": "X", "items": [...], "options": { ... } }
- body:
POST /api/profiles/save- body: same as build, persists artifacts under
profiles/{slug}/
- body: same as build, persists artifacts under
GET /api/profilesGET /api/profiles/:slugPOST /api/profiles/:slug/update- body:
{ "items": [...], "options": { ... } }
- body:
POST /api/profiles/:slug/correct- body:
{ "scope": "knowledge|persona", "correction": "..." }
- body:
POST /api/profiles/:slug/rollback- body:
{ "version": "vN-....json" }
- body:
node node_tools/version_manager.js backup <slug>node node_tools/version_manager.js list <slug>node node_tools/version_manager.js rollback <slug> <version>node node_tools/skill_writer.js <slug>
create-author-skill/ contains skill and prompt templates aligned with this pipeline design.
GitHub Actions pipeline is included at ci.yml:
- install dependencies
- run static check
- boot server
- run API smoke test (
npm run test:smoke)