CW Scaffolding Generation

VerifiedSafe

Adds standardized components like GitHub workflows, CODEOWNERS, Helm charts, or Backstage catalog files to existing repositories, or generates complete project archetypes locally. Ideal for bootstrapping new projects or applying compliance and automation patterns.

Sby Skills Guide Bot
DevOpsIntermediate
606/2/2026
Claude Code
#scaffolding#code-generation#devops#project-templates

Recommended for

Our review

Adds standardized components (e.g., CODEOWNERS, GitHub workflows, Helm charts, Backstage catalog) to existing repositories or generates complete project archetypes using the cw CLI tool.

Strengths

  • Automates repetitive setup tasks
  • Supports multiple component types and archetypes
  • Offers both interactive and non-interactive modes
  • Includes validation and troubleshooting commands

Limitations

  • Requires the cw CLI to be installed
  • Modifies files directly, requiring explicit user confirmation
  • Limited to predefined templates
When to use it

Use this skill when you need to add common DevOps components like GitHub workflows, CODEOWNERS, or Backstage catalog files to a repository, or when generating a new project structure.

When not to use it

Avoid this skill when custom components not covered by the predefined templates are needed, or when you want to manually configure each file.

Security analysis

Safe
Quality score90/100

The skill only uses the cw CLI tool to scaffold files (codeowners, workflows, helm charts, etc.) within the current repository. It requires user confirmation before modifying files and does not execute arbitrary system commands, destructive actions, or exfiltrate data. The allowed-tools are scoped to cw scaffold:* and cw version, both safe.

No concerns found

Examples

Add CODEOWNERS to a repository
Add CODEOWNERS to this repository. The team name is 'my-team'.
Generate a Go HTTP service
Generate a new Go HTTP service project in a directory called 'my-service'.

name: cw-scaffold description: Add components to existing repos or generate archetypes locally. Use when adding GitHub workflows, CODEOWNERS, Helm charts, Backstage catalog files, or generating new project structures. allowed-tools:

  • Bash(cw scaffold:*)
  • Bash(cw version)

CW Scaffolding

Add standardized components to existing repositories or generate complete project archetypes locally.

When to Use This Skill

Use this skill when:

  • Adding CODEOWNERS to a repository
  • Setting up GitHub workflows (linting, dependency updates, PR review)
  • Adding Backstage catalog configuration
  • Creating Helm charts
  • Generating a new project structure locally

Instructions

Step 1: Understand the Request

Determine what the user wants:

  • Component: Add a specific feature to an existing repo
  • Archetype: Generate a complete project structure

Available Components:

| Group | Component | Purpose | |-------|-----------|---------| | backstage | catalog-yaml-component | Register as Backstage Component | | backstage | catalog-yaml-location | Register as Backstage Location | | backstage | catalog-yaml-system | Register as Backstage System | | github | codeowners | Define code ownership | | github | workflow-claude-review-prs | AI-powered PR review | | github | workflow-close-stale-prs | Auto-close stale PRs | | github | workflow-megalinter | Comprehensive linting | | github | workflow-renovate | Automated dependency updates | | helm | chart-basic | Kubernetes Helm chart |

Available Archetypes:

| Archetype | Purpose | |-----------|---------| | blank-repo | Minimal starter with CODEOWNERS and Backstage | | go-http-service | Production-ready Go HTTP service |

Step 2: Pre-flight Checks

cw version  # Verify CLI installed
pwd         # Confirm in correct directory (for components)

For components, user should be in the repository root.

Step 3: Component Generation

IMPORTANT: This modifies files in the repository. Get user confirmation before running.

Interactive mode:

cw scaffold generate -c

With specific version:

cw scaffold generate -c --version v2.5.0

Non-interactive mode (for automation):

Create config.yaml:

componentGroup: github
componentName: codeowners
inputs:
  github_team_name: your-team

Run:

cw scaffold generate --config config.yaml --skip-pr

Step 4: Archetype Generation

Interactive mode:

cw scaffold generate -a

This prompts for:

  • Archetype selection
  • Output directory
  • Project-specific inputs

Step 5: Post-Generation

After generation:

  1. Review generated files:

    git status
    git diff
    
  2. Commit changes: Use /commit skill for proper commit message

  3. Create PR if needed: The CLI may offer to create a PR automatically

Common Workflows

Add CODEOWNERS

cd your-repo
cw scaffold generate -c
# Select: github -> codeowners
# Provide: team name

Add Megalinter

cd your-repo
cw scaffold generate -c
# Select: github -> workflow-megalinter

Add Renovate for Dependency Updates

cd your-repo
cw scaffold generate -c
# Select: github -> workflow-renovate

Generate Go Service Locally

cw scaffold generate -a
# Select: go-http-service
# Specify: output directory
# Provide: project name, team, etc.

Validation

To validate templates (useful for template maintainers):

cw scaffold validate <path> -c   # Validate as component
cw scaffold validate <path> -a   # Validate as archetype
cw scaffold validate <path> -f   # Fail fast on first error

Troubleshooting

Component not found:

rm -rf ~/.cw/cli/cached-templates/
cw scaffold generate -c  # Re-fetches templates

Wrong version:

cw scaffold generate -c --version v2.5.0

Test local templates:

cw scaffold generate -c --path /path/to/local/repo-templates

View available components/archetypes:

cw scaffold info -c
cw scaffold info -a
Related skills