opensource-pipeline

Open-source pipeline: fork, sanitize, and package private projects for safe public release. Chains 3 agents (forker, sanitizer, packager). Triggers: '/opensource', 'open source this', 'make this public', 'prepare for open source'. Use when a private project must be forked, stripped of secrets, and p

By affaan-m · 2,803 installs

npx skills add affaan-m/ecc --skill opensource-pipeline

Source repository · Upstream listing

Open Source Pipeline Skill Safely open source any project through a 3 stage pipeline: Fork (strip secrets) → Sanitize (verify clean) → Package (CLAUDE.md + setup.sh + README). When to Activate User says "open source this project" or "make this public" User wants to prepare a private repo for public release User needs to strip secrets before pushing to GitHub User invokes /opensource fork , /opensource verify , or /opensource package Commands 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 Protocol /opensource fork PROJECT Full pipeline — the main workflow. Step 1: Gather Parameters 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. Ask the user: 1. "Which project?" (if not found) 2. "License? (MIT / Apache 2.0 / GPL 3.0 / BSD 3 Clause)" 3. "GitHub org or username?" (default: detect via gh api user q .login ) 4. "GitHub repo name?" (default: project name) 5. "Description for README?" (analyze project for suggestion) Step 2: Create Staging Directory Step 3: Run Forker Agent Spawn the opensource forker agent: Wait for completion. Read {STAGING PATH}/FORK REPORT.md . Step 4: Run Sanitizer Agent Spawn the opensource sanitizer agent: Wait for completion. Read {STAGING PATH}/SANITIZATION REPORT.md . If FAIL: Show findings to user. Ask: "Fix these and re scan, or abort?" If fix: Apply fixes, re run sanitizer (maximum 3 retry attempts — after 3 FAILs, present all findings and ask user to fix manually) If abort: Clean up staging directory If PASS or PASS WITH WARNINGS: Continue to Step 5. Step 5: Run Packager Agent Spawn the opensource packager agent: Step 6: Final Review Present to user: Step 7: GitHub Publish (on user approval) /opensource verify PROJECT Run sanitizer independently. Resolve path: if PROJECT contains / , treat as a path. Otherwise check $HOME/opensource staging/PROJECT , then $HOME/PROJECT , then current directory. /opensource package PROJECT Run packager independently. Ask for "License?" and "Description?", then: /opensource list Show each project with pipeline progress (FORK REPORT.md, SANITIZATION REPORT.md, CLAUDE.md presence). /opensource status PROJECT Staging Layout Anti Patterns Never push to GitHub without user approval Never skip the sanitizer — it is the safety gate Never proceed after a sanitizer FAIL without fixing all critical findings Never leave .env , .pem , or credentials.json in the staging directory Best Practices Always run the full pipeline (fork → sanitize → package) for new releases The staging directory persists until explicitly cleaned up — use it for review Re run the sanitizer after any manual fixes before publishing Parameterize secrets rather than deleting them — preserve project functionality Related Skills See security review for secret detection patterns used by the sanitizer.