帮助你分叉、脱敏并打包私有项目,安全发布为开源仓库。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "opensource-pipeline" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/opensource-pipeline/SKILL.md 2. 保存为 ~/.claude/skills/opensource-pipeline/SKILL.md 3. 装好后重载技能,告诉我可以用了
请把这个私有项目开源:先创建可公开的分支副本,移除密钥、内部域名、专有配置和敏感文档,再整理 README、许可证和发布包,给我一份可公开发布清单。
一个完成脱敏和打包的开源发布版本,并附带风险与待确认项清单。
open source this repository,重点检查环境变量、API 密钥、公司名称、内部链接和注释中的敏感内容;保留通用功能代码,并生成适合 GitHub 公开的项目结构。
一份适合公开托管的平台化仓库结构,以及已识别并处理的敏感项说明。
make this public。请把当前私有项目整理成可发布的开源包:执行分叉、脱敏、补全文档、添加开源许可证,并说明哪些文件不应公开。
一个可直接发布的开源项目包,包含必要文档、许可证和非公开文件说明。
Safely open-source any project through a 3-stage pipeline: Fork (strip secrets) → Sanitize (verify clean) → Package (CLAUDE.md + setup.sh + README).
/opensource fork, /opensource verify, or /opensource package| Command | Action |
|---|---|
/opensource fork PROJECT | Full pipeline: fork + sanitize + package |
/opensource verify PROJECT | Run sanitizer on existing repo |
/opensource package PROJECT |
| Generate CLAUDE.md + setup.sh + README |
/opensource list | Show all staged projects |
/opensource status PROJECT | Show reports for a staged project |
Full pipeline — the main workflow.
Resolve the project path. If PROJECT contains /, treat as a path (absolute or relative). Otherwise check: current working directory, $HOME/PROJECT, then ask the user.
SOURCE_PATH="<resolved absolute path>"
STAGING_PATH="$HOME/opensource-staging/${PROJECT_NAME}"
Ask the user:
gh api user -q .login)mkdir -p $HOME/opensource-staging/
Spawn the opensource-forker agent:
Agent(
description="Fork {PROJECT} for open-source",
subagent_type="opensource-forker",
prompt="""
Fork project for open-source release.
Source: {SOURCE_PATH}
Target: {STAGING_PATH}
License: {chosen_license}
Follow the full forking protocol:
1. Copy files (exclude .git, node_modules, __pycache__, .venv)
2. Strip all secrets and credentials
3. Replace internal references with placeholders
4. Generate .env.example
5. Clean git history
6. Generate FORK_REPORT.md in {STAGING_PATH}/FORK_REPORT.md
"""
)
Wait for completion. Read {STAGING_PATH}/FORK_REPORT.md.
Spawn the opensource-sanitizer agent:
Agent(
description="Verify {PROJECT} sanitization",
subagent_type="opensource-sanitizer",
prompt="""
Verify sanitization of open-source fork.
Project: {STAGING_PATH}
Source (for reference): {SOURCE_PATH}
Run ALL scan categories:
1. Secrets scan (CRITICAL)
2. PII scan (CRITICAL)
3. Internal references scan (CRITICAL)
4. Dangerous files check (CRITICAL)
5. Configuration completeness (WARNING)
6. Git history audit
Generate SANITIZATION_REPORT.md inside {STAGING_PATH}/ with PASS/FAIL verdict.
"""
)
Wait for completion. Read {STAGING_PATH}/SANITIZATION_REPORT.md.
If FAIL: Show findings to user. Ask: "Fix these and re-scan, or abort?"
If PASS or PASS WITH WARNINGS: Continue to Step 5.
Spawn the opensource-packager agent:
Agent(
description="Package {PROJECT} for open-source",
subagent_type="opensource-packager",
prompt="""
Generate open-source packaging for project.
Project: {STAGING_PATH}
License: {chosen_license}
Project name: {PROJECT_NAME}
Description: {description}
GitHub repo: {github_repo}
Generate:
1. CLAUDE.md (commands, architecture, key files)
2. setup.sh (one-command bootstrap, make executable)
3. README.md (or enhance existing)
4. LICENSE
5. CONTRIBUTING.md
6. .github/ISSUE_TEMPLATE/ (bug_report.md, feature_request.md)
"""
)
Present to user:
Open-Source Fork Ready: {PROJECT_NAME}
Location: {STAGING_PATH}
License: {license}
…
帮助用户在回答前选择简短、标准或详细版本,控制回复深度与 token 用量。
将目标自动拆解为任务 DAG,编排多智能体协作完成复杂开发流程。