Build With Public Writer
v1.0.2Use "bwp" command to create technical content for codewithriver. Supports articles, courses, theory, persona with version management and link sharing
Security Scan
OpenClaw
Benign
medium confidencePurpose & Capability
The name/description (create technical content, manage versions, share links) matches the provided files: a shell helper (scripts/bwp.sh), templates, and instructions for initializing a local project and running a small server. Minor incoherence: SKILL.md examples use /home/claw/codewithriver while the script defaults PROJECT_ROOT to /home/node/cwr (and allows BWP_PROJECT_ROOT). This path mismatch is likely a packaging/configuration oversight but not evidence of malicious intent.
Instruction Scope
SKILL.md and the script operate on local project files, create directories, generate README/.env/server.py and content files, and instruct the user to edit ~/.bashrc to add an alias. They also direct running a local Python server and using Git to commit changes. These actions are within the stated purpose, but the guidance to append an alias to ~/.bashrc (which modifies the user's shell config) and the automatic git add -A / git commit behavior can have side effects if PROJECT_ROOT is not set to an isolated project directory. The skill reads the local .env file for credentials (used for Basic Auth) — expected for serving content but worth noting.
Install Mechanism
No network installs or downloads; this is an instruction-only skill with included scripts and templates. Nothing in the install path writes code from remote sources or runs a package manager, so install risk is low.
Credentials
The skill declares no required environment variables or external credentials. It creates a local .env with PORT, CUSTOM_DOMAIN, AUTH_USERNAME, and AUTH_PASSWORD and loads those in the generated server.py. That is proportionate to the stated purpose (local sharing with optional Basic Auth). However, the default AUTH_PASSWORD is weak ('changeme') and .env contains plaintext credentials — the user should change them and ensure PROJECT_ROOT points to a dedicated directory.
Persistence & Privilege
always is false and the skill does not request elevated platform privileges. The SKILL.md suggests adding an alias to ~/.bashrc (persistent change to the user's shell config) — the README warns to review before executing, but this is a persistent change the user must consciously accept. The script also creates files and a local server; those are normal for this use-case.
Assessment
This skill appears to do what it says: generate local markdown content and run a simple local server for sharing. Before using it: 1) Inspect scripts/bwp.sh and the generated server.py yourself (they are included) to confirm paths and behaviour. 2) Set BWP_PROJECT_ROOT (or edit the script) to a dedicated project directory you control — avoid running init in your home or other repositories. 3) Do not blindly run the alias append command; instead add the alias manually after review. 4) Update the generated .env AUTH_PASSWORD to a strong secret if you run the server, and only expose CUSTOM_DOMAIN/port when you understand the network exposure. 5) Be cautious with bwp commit: it runs git add -A and commits under the project root — verify the repo contents before committing to avoid adding unrelated files. If you want extra safety, run the script commands manually rather than installing the alias.Like a lobster shell, security has layers — review code before you run it.
bloggingbuild-in-publiclatesttechnical-writingwriting
Build with Public (bwp) - 技术内容创作系统
快速开始
使用 bwp 命令:
有两种方式使用 bwp:
选项1:直接使用完整路径(推荐,无需修改配置)
/home/claw/.openclaw/workspace/skills/build-with-public-writer/scripts/bwp.sh help
选项2:手动添加 alias(可选)
# 如果你希望使用简短的 bwp 命令,可以手动添加 alias 到 ~/.bashrc
# ⚠️ 注意:这会修改你的 shell 配置文件,请审查后再执行
echo 'alias bwp="/home/claw/.openclaw/workspace/skills/build-with-public-writer/scripts/bwp.sh"' >> ~/.bashrc
source ~/.bashrc
查看帮助:
bwp help
核心命令
场景0: 初始化项目 (必做)
bwp init
输出:
🚀 Initializing Build with Public project...
✅ Directory structure created
✅ README.md created
✅ .env created
✅ server.py created
📁 Project structure:
articles/ - Technical articles and blog posts
courses/ - Course outlines and tutorials
theory/ - Frameworks and methodologies
persona/ - Writing personas and styles
images/ - Article images and diagrams
Next steps:
1. Edit /home/claw/codewithriver/.env to configure your settings
2. Run 'bwp article "Your First Article"' to create content
3. Start server: cd /home/claw/codewithriver && python server.py
说明:
- 创建完整的目录结构
- 生成 README.md 说明文档
- 自动生成 .env 配置文件(包含端口、认证信息)
- 自动生成 server.py Web 服务器(支持 Markdown 渲染和 Basic Auth)
- 只需执行一次,或在目录缺失时执行
场景1: 写文章
bwp article "AI 趋势 2026"
输出:
✅ Created: articles/bwp-2026-03-13-ai-trends-2026-v1.md
📝 Edit: /home/claw/codewithriver/articles/bwp-2026-03-13-ai-trends-2026-v1.md
自动生成的模板包含:
- Frontmatter (title, date, version)
- Introduction 章节
- Main Content 章节
- Conclusion 章节
场景2: 创建课程大纲
bwp course "OpenClaw 技能训练营"
输出:
✅ Created: courses/openclaw-bootcamp/syllabus-v1.md
📝 Edit: /home/claw/codewithriver/courses/openclaw-bootcamp/syllabus-v1.md
自动生成的模板包含:
- 课程概述
- 学习目标
- 4周课程大纲
- 先修要求
- 学习资源
场景3: 创建理论框架
bwp theory "写作框架"
创建 /home/claw/codewithriver/theory/writing-framework-v1.md
场景4: 定义写作风格
bwp persona "技术专家"
创建 /home/claw/codewithriver/persona/tech-expert-style-v1.md
其他命令
列出所有内容
bwp list
输出示例:
📁 Content in codewithriver:
📄 Articles (25):
2026-03-13-ai-trends-v1.md
2026-03-12-vibe-coding-v1.md
...
📚 Courses (3):
openclaw-bootcamp
openclaw-masterclass
...
📖 Theory (5):
writing-framework-v1.md
...
🎭 Persona (2):
tech-expert-style-v1.md
...
Git 提交
bwp commit "添加 AI 趋势文章"
自动执行:
git add -A
git commit -m "content: 添加 AI 趋势文章 (2026-03-13)"
生成分享链接
bwp link articles/2026-03-13-ai-trends-v1.md
输出:
🔗 Shareable Link:
http://localhost:12000/articles/2026-03-13-ai-trends-v1.md
👤 Access credentials configured in .env
(Check /home/claw/codewithriver/.env for AUTH_USERNAME and AUTH_PASSWORD)
查看项目状态
bwp status
输出:
📊 Build with Public - Status
📁 Project: codewithriver
📍 Location: /home/claw/codewithriver
📝 Recent commits:
abc1234 content: Add new article (2026-03-13)
def5678 content: Update course outline (2026-03-12)
📊 Content stats:
Articles: 25 files
Courses: 3 directories
Theory: 5 files
Persona: 2 files
🟢 Server: Running
目录结构
codewithriver/
├── articles/ # 📄 技术文章和博客
├── courses/ # 📚 课程大纲和教程
├── theory/ # 📖 理论框架和方法论
├── persona/ # 🎭 写作人设和风格
├── images/ # 🖼️ 文章图片
├── server.py # 🌐 Web 服务器
└── .git/ # 版本控制
完整工作流示例
示例1: 发布一篇新文章
# 1. 创建文章
bwp article "AI Agent 入门指南"
# 2. 编辑内容 (使用你喜欢的编辑器)
vim /home/claw/codewithriver/articles/2026-03-13-ai-agent-guide-v1.md
# 3. 提交到 Git
bwp commit "添加 AI Agent 入门指南"
# 4. 生成分享链接
bwp link articles/2026-03-13-ai-agent-guide-v1.md
示例2: 创建课程
# 1. 创建课程大纲
bwp course "OpenClaw 技能训练营"
# 2. 编辑课程结构
vim /home/claw/codewithriver/courses/openclaw-bootcamp/syllabus-v1.md
# 3. 提交
bwp commit "创建 OpenClaw 课程大纲"
# 4. 分享链接
bwp link courses/openclaw-bootcamp/syllabus-v1.md
版本迭代
创建新版本(手动复制并修改版本号):
# 从 v1 创建 v1.1
cp articles/2026-03-13-topic-v1.md articles/2026-03-13-topic-v1.1.md
# 编辑改进
vim articles/2026-03-13-topic-v1.1.md
# 提交
bwp commit "改进文章 v1.1"
最佳实践
文件命名
✅ 推荐:
2026-03-13-vibe-coding-article-v1.md
2026-03-13-openclaw-syllabus-v1.md
2026-03-13-writing-framework-v1.md
❌ 避免:
article.md
final-draft.md
untitled.md
内容类型选择
| 你想写... | 使用命令 | 生成位置 |
|---|---|---|
| 技术博客文章 | bwp article "标题" | articles/ |
| 课程/教程 | bwp course "课程名" | courses/ |
| 方法论/框架 | bwp theory "框架名" | theory/ |
| 写作风格定义 | bwp persona "人设名" | persona/ |
快捷别名
添加到 ~/.bashrc:
alias bwp="/home/claw/.openclaw/workspace/skills/build-with-public-writer/scripts/bwp.sh"
alias bwpa="bwp article"
alias bwpc="bwp course"
alias bwpt="bwp theory"
alias bwpp="bwp persona"
alias bwpls="bwp list"
alias bwpg="bwp commit"
简化创作,专注内容 🚀
.env 配置说明
bwp link 命令会读取 /home/claw/codewithriver/.env 文件中的配置:
# /home/claw/codewithriver/.env
PORT=12000
CUSTOM_DOMAIN=your-domain.com # 可选,用于生成分享链接
AUTH_USERNAME=user
AUTH_PASSWORD=your_password
CUSTOM_DOMAIN: 设置后,bwp link会生成http://your-domain.com:PORT/...的链接- 未设置时,默认使用
localhost - 注意: 出于安全考虑,
bwp link不会显示实际的凭证值,请直接查看 .env 文件
Comments
Loading comments...
