home / skills / ehtbanton / claudeskillsrepo / jenkins-pipeline-generator

jenkins-pipeline-generator skill

/jenkins-pipeline-generator

This skill generates complete Jenkins pipelines (Jenkinsfile) in declarative or scripted syntax, delivering ready-to-run CI/CD configurations.

npx playbooks add skill ehtbanton/claudeskillsrepo --skill jenkins-pipeline-generator

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
725 B
---
name: jenkins-pipeline-generator
description: Generate Jenkins pipeline files (Jenkinsfile) with declarative or scripted syntax. Triggers on "create jenkinsfile", "generate jenkins pipeline", "jenkins ci config", "jenkins build pipeline".
---

# Jenkins Pipeline Generator

Generate Jenkins pipeline files with declarative or scripted syntax.

## Output Requirements

**File Output:** `Jenkinsfile`
**Format:** Valid Jenkins pipeline syntax
**Standards:** Jenkins Pipeline 2.x

## When Invoked

Immediately generate a complete Jenkinsfile with stages and deployment.

## Example Invocations

**Prompt:** "Create Jenkinsfile for Node.js with Docker"
**Output:** Complete `Jenkinsfile` with build, test, and deploy stages.

Overview

This skill generates complete Jenkins pipeline files (Jenkinsfile) in either declarative or scripted syntax. It produces a ready-to-run Jenkinsfile that follows Pipeline 2.x conventions and includes build, test, and deploy stages. Outputs are tailored to the project tech stack and CI requirements.

How this skill works

When triggered it inspects the requested language, build tool, containerization, and deployment targets from the prompt and produces a valid Jenkinsfile named Jenkinsfile. It can emit declarative or scripted pipelines, include agent configuration, environment variables, stage-level steps, credentials usage, and post actions. The generated file conforms to Jenkins Pipeline 2.x syntax and aims to be immediately usable with minimal edits.

When to use it

  • You need a ready-to-run Jenkinsfile for a new or existing repo.
  • Setting up CI for a Node.js, Java, Python, or containerized app.
  • Migrating manual build steps into an automated pipeline.
  • Generating pipelines that use Docker agents or Kubernetes agents.
  • Creating example Jenkinsfiles for demos, documentation, or templates.

Best practices

  • Prefer declarative syntax for clarity and maintainability unless scripted behaviors are required.
  • Define credentials and secrets in Jenkins credentials store and reference them with environment variables.
  • Keep stages small and focused: checkout, build, test, package, deploy, and cleanup.
  • Use agents and labels that reflect your executor environment (docker, kubernetes, or specific nodes).
  • Include post blocks for notifications and cleanup to ensure consistent pipeline state.

Example use cases

  • Create Jenkinsfile for Node.js app that builds inside Docker, runs unit tests, and publishes a Docker image.
  • Generate a Jenkinsfile for a Java project using Maven with parallel test stages and artifact deployment.
  • Produce a lightweight scripted pipeline for legacy jobs that require dynamic step injection.
  • Create a declarative pipeline that deploys to a Kubernetes cluster using kubectl and stored kubeconfig.
  • Generate a pipeline template that integrates code quality scans, unit tests, and automated releases.

FAQ

Can the skill produce both declarative and scripted pipelines?

Yes. You can request either syntax and the skill will generate a valid Jenkinsfile in the chosen style.

Does the Jenkinsfile include credentials and secrets?

It includes placeholders and recommended patterns for credentials; you should store secrets in Jenkins credentials and reference them rather than embedding secrets in the file.