Automated summary
Generates production-ready CI/CD pipelines for Node.js and Angular applications deployed to Google Kubernetes Engine via Cloud Build.
Strengths
- Automates creation of pipelines with build, test, and multi-environment deployment steps.
- Enforces mandatory security scanning (Snyk, Trivy, SonarQube) and quality gates.
- Supports canary deployments and automatic rollback for production.
- Leverages native GCP services (Cloud Build, GKE, Secret Manager, Artifact Registry).
Limitations
- Limited to Node.js and Angular projects using npm.
- Requires GCP infrastructure and Kubernetes knowledge.
- May need adaptation for non-standard project structures.
Use this skill to set up comprehensive, secure CI/CD pipelines for Node.js or Angular applications targeting GCP with GKE.
Do not use it for other languages, frameworks (non-Node.js), or cloud providers (AWS, Azure).
Security analysis
SafeThe skill provides instructions for generating CI/CD pipeline configurations, including bash commands for context analysis (cat, grep, jq) and setting environment variables. It references legitimate security scanning tools (Snyk, Trivy, SonarQube) and standard GCP services. No destructive commands, data exfiltration, or obfuscated payloads are present.
No concerns found
How this analysis is madeExamples
Set up a CI/CD pipeline for my Node.js Express API on GCP using Cloud Build and GKE with security scanning and canary deployments.Create a deployment pipeline for my Angular application to GKE with dev, staging, and production environments.Add Snyk vulnerability scanning, Trivy container scanning, and SonarQube quality gates to my existing Node.js CI/CD pipeline for GCP.name: gcp-nodejs-cicd version: 2.1.0 description: Generate CI/CD pipelines for Node.js and Angular applications on GCP with Cloud Build and GKE deployment. Use when creating or updating deployment pipelines for Node.js services, Express APIs, NestJS applications, or Angular frontends targeting Google Cloud Platform. author: Platform Engineering Team tags: [nodejs, angular, gcp, cloud-build, gke]
Knowledge Dependency Graph: Explicit dependency declarations
See 06-KNOWLEDGE-GRAPH.md for full documentation
dependencies: required: - name: security-scanning version: ">=1.5.0" reason: "Mandatory security scans (Snyk, Trivy, SonarQube) for all pipelines" - name: gke-deployment version: "^3.0.0" reason: "Kubernetes deployment patterns and strategies" optional: - name: observability version: ">=2.0.0" condition: "context.monitoring_required == true" reason: "Enhanced monitoring for production services" suggested: - name: cost-optimization version: "*" reason: "Resource sizing recommendations"
Context requirements for this Skill
context_requirements:
- type: runtime values: [nodejs-18, nodejs-20]
- type: platform values: [gcp]
Policies this Skill enforces (for compliance traceability)
policies_enforced:
- security-scan-required
- test-coverage-minimum
- approval-gate-production
GCP Node.js CI/CD Pipeline Generation
This Skill generates production-ready CI/CD pipelines for Node.js and Angular applications deployed to Google Kubernetes Engine (GKE) via Cloud Build.
When to Use This Skill
- Creating new Node.js or Angular services
- Setting up deployment pipelines
- Configuring multi-environment deployments (dev, staging, production)
- Implementing security scanning and quality gates
- Deploying containerized applications to GKE
Organizational Context
Build Standards
- Node.js versions: 18.x, 20.x (LTS only)
- Package manager: npm (lock file required)
- Build process: Multi-stage Docker builds
- Test coverage: Minimum 80% for production deployments
- Linting: ESLint with organizational config
Security Requirements
- Dependency scanning: Snyk (0 critical vulnerabilities allowed)
- Container scanning: Trivy (no high/critical CVEs)
- SAST: SonarQube (Quality Gate must pass)
- SBOM: Generate and upload to Artifact Registry
- Secrets: Must use GCP Secret Manager (never hardcoded)
Deployment Strategies
- Development: Auto-deploy on commit
- Staging: Manual approval required
- Production: Canary deployment (5% → 50% → 100%)
- Rollback: Automatic on health check failures or error rate >5%
Instructions
Step 1: Analyze Service Context
First, determine the service type and requirements by checking:
# Check package.json for framework
cat package.json | jq '.dependencies'
# Identify service type
if [ -f "angular.json" ]; then
SERVICE_TYPE="angular"
elif grep -q "express" package.json; then
SERVICE_TYPE="express"
elif grep -q "@nestjs" package.json; then
SERVICE_TYPE="nestjs"
else
SERVICE_TYPE="nodejs-generic"
fi
Step 2: Generate Cloud Build Configuration
Use the appropriate template from templates/cloudbuild/:
For Node.js services:
# See templates/cloudbuild/nodejs-service.yaml
steps:
- name: 'node:${NODE_VERSION}'
entrypoint: npm
args: ['ci']
- name: 'node:${NODE_VERSION}'
entrypoint: npm
args: ['run', 'build']
- name: 'node:${NODE_VERSION}'
entrypoint: npm
args: ['test']
# Security scanning - see templates/security/
# Docker build - see templates/docker/
# GKE deployment - see templates/kubernetes/
For Angular applications:
# See templates/cloudbuild/angular-app.yaml
# Includes ng build with optimization flags
# Static asset handling
# Environment-specific configurations
Step 3: Implement Security Scanning
Always include all three security scans:
# Snyk dependency scan
- name: 'snyk/snyk:node'
entrypoint: 'sh'
args:
- '-c'
- 'snyk test --severity-threshold=high || exit 1'
secretEnv: ['SNYK_TOKEN']
# Trivy container scan
- name: 'aquasec/trivy'
args: ['image', '--severity', 'HIGH,CRITICAL', '${IMAGE_NAME}']
# SonarQube SAST
- name: 'sonarsource/sonar-scanner-cli'
args: ['sonar-scanner', '-Dsonar.qualitygate.wait=true']
Use validator at validators/security-policy.rego to verify all scans are present.
Step 4: Generate Kubernetes Manifests
Create deployment, service, and HPA configurations:
# See templates/kubernetes/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${SERVICE_NAME}
namespace: ${NAMESPACE}
spec:
replicas: ${REPLICAS}
template:
spec:
containers:
- name: ${SERVICE_NAME}
image: ${IMAGE_NAME}
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
Step 5: Configure Multi-Environment Deployment
Set up deployment strategy per environment:
Development:
- Auto-deploy on every commit
- No approval required
- Rolling update strategy
Staging:
- Manual approval required (team lead)
- Smoke tests must pass
- Rolling update strategy
Production:
- Two approvals required (team lead + platform lead)
- Canary deployment strategy
- Automated rollback on metrics degradation
Step 6: Add Monitoring and Observability
Include Cloud Monitoring configuration:
# Metrics to collect
metrics:
- http_requests_total
- http_request_duration_seconds
- http_errors_total
# Alerts to configure
alerts:
- error_rate_high (>5% for 5 minutes)
- latency_p99_high (>2s for 5 minutes)
- pod_restart_frequent (>3 in 10 minutes)
Step 7: Generate Documentation
Create comprehensive documentation:
# Service Name
## CI/CD Pipeline
This service uses the following deployment pipeline:
- Build: Multi-stage Docker with Node.js ${VERSION}
- Test: Unit tests with 80%+ coverage
- Security: Snyk + Trivy + SonarQube
- Deploy: Canary to GKE with automated rollback
## Deployment
**Development:**
- Auto-deployed on commit to main
- URL: https://dev.example.com
**Production:**
- Requires 2 approvals
- Canary deployment (5% → 50% → 100%)
- URL: https://api.example.com
## Rollback
If deployment fails:
```bash
platform-cli rollback payment-api --to-version previous
## Validation Rules
Before completing generation, validate using `validators/security-policy.rego`:
```rego
# Validation checks
package cloudbuild
# Rule: Security scans required
deny[msg] {
not input.steps[_].name == "snyk/snyk:node"
msg = "Snyk dependency scan is required"
}
deny[msg] {
not input.steps[_].name == "aquasec/trivy"
msg = "Trivy container scan is required"
}
# Rule: Secrets must be in Secret Manager
deny[msg] {
input.steps[_].args[_] contains "password"
msg = "Hardcoded secrets detected. Use Secret Manager."
}
# Rule: Production requires approval
deny[msg] {
input.environment == "production"
not input.approvals
msg = "Production deployments require approval"
}
Examples
For complete working examples, see:
examples/payment-service/- Express API with PCI complianceexamples/user-api/- NestJS service with authenticationexamples/frontend-app/- Angular SPA with SSR
Troubleshooting
Build fails with "npm ci" error:
- Ensure package-lock.json is committed
- Check Node.js version matches package.json engines
Security scan fails:
- Review Snyk dashboard for vulnerabilities
- Update dependencies to patch CVEs
- Request exception if no patch available
Deployment fails:
- Check GKE cluster has sufficient resources
- Verify namespace exists
- Confirm image was pushed to Artifact Registry
Canary rollback triggered:
- Check Cloud Monitoring for error rates
- Review logs in Cloud Logging
- Validate health check endpoints
Additional Resources
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/gcp-node-js-ci-cd-pipelines-mmio71ss/download' --output '.skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss/SKILL.md.part' && mv '.skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss/SKILL.md.part' '.skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss/SKILL.md' && test -s '.skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/gcp-nodejs-cicd' && cp -R '.skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss' '.claude/skills/gcp-nodejs-cicd'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss'openskills read 'gcp-node-js-ci-cd-pipelines-mmio71ss'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/gcp-node-js-ci-cd-pipelines-mmio71ss/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.