
Open Source Pipeline
FreeSecurely prepare your projects for open source release.
Free · Opens the source repo
What Open Source Pipeline does
The Open Source Pipeline skill provides a structured approach to safely open-sourcing private projects. It consists of a three-step process: Forking, Sanitizing, and Packaging. Each step is executed by a dedicated agent, ensuring that sensitive information is removed and the project is appropriately prepared for public release. This skill is particularly useful for developers and teams looking to transition their private repositories to open source while maintaining security and compliance.
When a user triggers the skill, they can initiate the full pipeline with commands like /opensource fork PROJECT, which handles everything from forking the repository to generating necessary documentation. The forker agent creates a sanitized copy of the project, stripping out secrets and credentials, and prepares a staging directory for further processing. The sanitizer agent then runs a comprehensive set of scans to ensure that the project is free of sensitive data before packaging it for public release.
The final step involves the packager agent, which generates essential files such as CLAUDE.md, setup.sh, and README.md, ensuring that the project is not only secure but also well-documented for future contributors. This skill is ideal for developers who want to ensure a clean and secure transition to open source, as well as for organizations that need to comply with best practices in software development and data security.
When to use it
Use this skill when you want to prepare a private repository for public release while ensuring that all sensitive data is removed and the necessary documentation is created.
When not to use it
This skill is not suitable for projects that do not require sanitization or for users who are not ready to make their project public.
What you can build with it
Transitioning a Private Repo
When a developer wants to make a private GitHub repository public, they can use this skill to ensure all sensitive data is removed.
Preparing for Open Source Contribution
A team planning to open source their project can utilize this skill to streamline the process and ensure compliance with best practices.
Automating Project Sanitization
Developers can automate the sanitization of multiple projects before public release, ensuring consistency and security.
How to install Open Source Pipeline
View source1. Install with the skills CLI
npx skills add affaan-m/ecc/opensource-pipeline --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by affaan-mオープンソースパイプラインスキル
3段階のパイプラインを通じて任意のプロジェクトを安全にオープンソース化する: フォーク(シークレット除去)→ サニタイズ(クリーンな状態を確認)→ パッケージ(CLAUDE.md + setup.sh + README)。
アクティベートするタイミング
- ユーザーが「このプロジェクトをオープンソース化する」または「これを公開する」と言うとき
- ユーザーがプライベートリポジトリを公開リリースのために準備したいとき
- ユーザーがGitHubにプッシュする前にシークレットを除去する必要があるとき
- ユーザーが
/opensource fork、/opensource verify、または/opensource packageを呼び出すとき
コマンド
| コマンド | アクション |
|---|---|
/opensource fork PROJECT | 完全なパイプライン: フォーク + サニタイズ + パッケージ |
/opensource verify PROJECT | 既存のリポジトリにサニタイザーを実行 |
/opensource package PROJECT | CLAUDE.md + setup.sh + READMEを生成 |
/opensource list | ステージングされたすべてのプロジェクトを表示 |
/opensource status PROJECT | ステージングされたプロジェクトのレポートを表示 |
プロトコル
/opensource fork PROJECT
完全なパイプライン — メインワークフロー。
ステップ1: パラメータを収集する
プロジェクトパスを解決する。PROJECTに/が含まれる場合、パス(絶対または相対)として扱う。それ以外の場合: 現在の作業ディレクトリ、$HOME/PROJECTをチェックし、見つからない場合はユーザーに尋ねる。
SOURCE_PATH="<解決された絶対パス>"
STAGING_PATH="$HOME/opensource-staging/${PROJECT_NAME}"
ユーザーに尋ねる:
- 「どのプロジェクト?」(見つからない場合)
- 「ライセンス?(MIT / Apache-2.0 / GPL-3.0 / BSD-3-Clause)」
- 「GitHubのorgまたはユーザー名?」(デフォルト:
gh api user -q .loginで検出) - 「GitHubリポジトリ名?」(デフォルト: プロジェクト名)
- 「READMEの説明?」(提案のためにプロジェクトを分析)
ステップ2: ステージングディレクトリを作成する
mkdir -p $HOME/opensource-staging/
ステップ3: フォーカーエージェントを実行する
opensource-forkerエージェントをスポーン:
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
"""
)
完了を待つ。{STAGING_PATH}/FORK_REPORT.mdを読む。
ステップ4: サニタイザーエージェントを実行する
opensource-sanitizerエージェントをスポーン:
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.
"""
)
完了を待つ。{STAGING_PATH}/SANITIZATION_REPORT.mdを読む。
FAILの場合: 結果をユーザーに表示する。「これらを修正して再スキャンしますか、それとも中止しますか?」と尋ねる。
- 修正する場合: 修正を適用し、サニタイザーを再実行する(最大3回の再試行 — 3回のFAIL後、すべての結果を提示しユーザーに手動で修正するよう依頼する)
- 中止する場合: ステージングディレクトリをクリーンアップする
PASSまたはWARNINGS付きPASSの場合: ステップ5に進む。
ステップ5: パッケージャーエージェントを実行する
opensource-packagerエージェントをスポーン:
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)
"""
)
ステップ6: 最終レビュー
ユーザーに提示する:
Open-Source Fork Ready: {PROJECT_NAME}
Location: {STAGING_PATH}
License: {license}
Files generated:
- CLAUDE.md
- setup.sh (executable)
- README.md
- LICENSE
- CONTRIBUTING.md
- .env.example ({N} variables)
Sanitization: {sanitization_verdict}
Next steps:
1. Review: cd {STAGING_PATH}
2. Create repo: gh repo create {github_org}/{github_repo} --public
3. Push: git remote add origin ... && git push -u origin main
Proceed with GitHub creation? (yes/no/review first)
ステップ7: GitHubへの公開(ユーザーの承認後)
cd "{STAGING_PATH}"
gh repo create "{github_org}/{github_repo}" --public --source=. --push --description "{description}"
/opensource verify PROJECT
サニタイザーを独立して実行する。パスを解決: PROJECTに/が含まれる場合、パスとして扱う。それ以外の場合は$HOME/opensource-staging/PROJECT、$HOME/PROJECT、現在のディレクトリを確認する。
Agent(
subagent_type="opensource-sanitizer",
prompt="Verify sanitization of: {resolved_path}. Run all 6 scan categories and generate SANITIZATION_REPORT.md."
)
/opensource package PROJECT
パッケージャーを独立して実行する。「ライセンス?」と「説明?」を尋ねてから:
Agent(
subagent_type="opensource-packager",
prompt="Package: {resolved_path} ..."
)
/opensource list
ls -d $HOME/opensource-staging/*/
FORK_REPORT.md、SANITIZATION_REPORT.md、CLAUDE.mdの存在でパイプラインの進捗を各プロジェクトと共に表示する。
/opensource status PROJECT
cat $HOME/opensource-staging/${PROJECT}/SANITIZATION_REPORT.md
cat $HOME/opensource-staging/${PROJECT}/FORK_REPORT.md
ステージングレイアウト
$HOME/opensource-staging/
my-project/
FORK_REPORT.md # フォーカーエージェントから
SANITIZATION_REPORT.md # サニタイザーエージェントから
CLAUDE.md # パッケージャーエージェントから
setup.sh # パッケージャーエージェントから
README.md # パッケージャーエージェントから
.env.example # フォーカーエージェントから
... # サニタイズされたプロジェクトファイル
アンチパターン
- ユーザーの承認なしにGitHubにプッシュすることは絶対にしない
- サニタイザーをスキップすることは絶対にしない — これは安全ゲートである
- 重大な結果をすべて修正せずにサニタイザーのFAIL後に続行することは絶対にしない
- ステージングディレクトリに
.env、*.pem、またはcredentials.jsonを残すことは絶対にしない
ベストプラクティス
- 新しいリリースには常に完全なパイプライン(フォーク → サニタイズ → パッケージ)を実行する
- ステージングディレクトリは明示的にクリーンアップされるまで持続する — レビューに使用する
- 公開前に手動修正後にサニタイザーを再実行する
- 削除ではなくシークレットをパラメータ化する — プロジェクトの機能を維持する
関連スキル
サニタイザーが使用するシークレット検出パターンについてはsecurity-reviewを参照。
Frequently asked questions about Open Source Pipeline
Similar skills
Turborepo
Optimized build system for JavaScript/TypeScript monorepos.
Azure Pipelines Validation
Streamline your Azure DevOps pipeline changes locally.
Azure Developer CLI
Streamline your Azure project workflows with best practices.
Azure Container Registry CLI
Manage Azure Container Registry resources with ease.
Aspire
Build and orchestrate polyglot distributed applications seamlessly.
Vercel CLI
Manage and deploy Vercel projects from the command line.
