Agent Skills
› rcarmo/piclaw
› extension-design
extension-design
GitHub指导安全设计与审计 Pi 扩展,避免使用易失效的工作区路径导入,强制使用已安装包的 dist 路径。提供安全检查清单、快速审计命令及骨架更新流程,确保扩展在重载后稳定运行。
Trigger Scenarios
创建新的 Pi 扩展模块
审查现有扩展代码的导入路径
检查扩展是否依赖工作区源码导致重载失败
Install
npx skills add rcarmo/piclaw --skill extension-design -g -y
SKILL.md
Frontmatter
{
"name": "extension-design",
"description": "Design and audit Pi extensions safely (avoid workspace source imports).",
"distribution": "public"
}
Extension design notes
Use this skill when creating or reviewing extensions so imports keep working after reloads.
Avoid this pattern
Do not import from the workspace source tree (for example /workspace/piclaw/runtime/src/... or /workspace/.../node_modules).
The running agent uses the installed package. Workspace paths can drift or break after reloads.
Use the installed package instead
Reference the installed dist paths, for example:
import { createBatchExecTool } from "/home/agent/.bun/install/global/node_modules/piclaw/dist/tools/context-tools.js";
Safety checklist
- Use installed dist paths (not workspace source).
- Avoid touching the DB before init.
- Wrap tool handlers in
try/catchto avoid crashes. - Guard filesystem access and
saveToolOutputcalls. - Keep dependencies minimal and explicit.
Quick audit
rg -n "/workspace/piclaw/runtime/src|/workspace/.*/node_modules" /workspace/.pi/extensions
Update skel when changing extensions
cp /workspace/.pi/extensions/<name>.ts /workspace/piclaw/skel/.pi/extensions/<name>.ts
Version History
- 5fa0ce5 Current 2026-07-25 10:25


