mcpField
W
workflow-template-extractor

workflow-template-extractor

github.com/heyvhuangDevelopment33850 installsUpdated 30w ago
Repository

About workflow-template-extractor

workflow-template-extractor is a skill for turning an existing project into a reusable, runnable template. It guides developers through cleanup, documentation, secret removal, and verification while keeping the work focused on copying and adapting the source.

Key features

  1. 01Copy a project into the templates directory
  2. 02Remove secrets and replace IDs with environment variables
  3. 03Replace branding with neutral placeholders
  4. 04Add template README, environment example, and metadata
  5. 05Record install, dev, and build verification

Use cases

  1. 01Reuse a proven project as a starting point
  2. 02Prepare a project template for sharing
  3. 03Remove project-specific details before distributing a baseline

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/heyvhuang/ship-faster --skill workflow-template-extractor

After installing, type/workflow-template-extractorin Claude Code to confirm it loaded.

Details

From the project README

Workflow: Template Extractor (Real Project → Template)

Goal: Turn a real project into a shareable, runnable template in templates/ with minimal manual cleanup.

This is intended for “proven projects” you want to reuse as a baseline for future builds.

Input (pass paths only)

  • source_repo_root: Path to the real project
  • target_repo_root: Ship Faster repository root (where templates/ lives)
  • run_dir: runs/template-extractor/active/<run_id>/
  • extract_spec.md: What to keep/remove/generalize (brand, copy, assets, integrations, auth gates)

Output (persisted)

  • 03-plans/extract-plan.md
  • 05-final/extract-summary.md
  • templates/<NNN>-<slug>/ (runnable)

Workflow

0) Initialize
  1. Create run_dir.
  2. Decide <slug> and <NNN> (next available template number).
  3. Copy source_repo_root → templates/<NNN>-<slug>/ (no build outputs, no caches).
1) De-secrets + de-brand

Must do:

  • Remove secret values from all files (.env*, config, hard-coded tokens).
  • Replace project IDs (Stripe price IDs, Supabase URLs/keys, webhook secrets) with env var keys.
  • Replace branding (names/domains/logos) with neutral placeholders unless the template is intentionally branded.
2) Normalize template entry docs

Required files:

  • README.md (5‑minute runnable)
  • .env.local.example (keys only)
  • metadata.json (name + description)

Recommended:

  • Ensure scripts exist for dev, build, start
  • If lint/typecheck/format are missing and the repo is TS-heavy, add minimal guardrails (avoid heavy governance)
3) Verification

Document in 05-final/extract-summary.md:

  • install works
  • dev starts
  • build succeeds (or clearly document why it can’t without credentials)

Constraints

  • Never commit secret values.
  • Extraction should be “copy + cleanup”, not a refactor project.

Comments

Markdown supported