Skip to main content
skill CX Codex

jenkins-pipeline — Claude Code skill: Jenkins CI/CD pipelines

A skill that helps write Jenkinsfiles: declarative and scripted pipelines with stages, agents, parameters and plugins.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill jenkins-pipeline -a claude-code
Open on GitHub

What jenkins-pipeline does

The skill covers both ways of describing a Jenkins build — declarative and scripted Groovy. It ships reference guides: one for the declarative Jenkinsfile, another for scripted pipelines that walks through multi-branch setups, parameterized builds and credentials. There is also a short working example: checkout, dependency install, lint, tests with a junit report, and artifact archiving.

For the agent this is scaffolding when you need stages, secrets pulled from the credentials plugin, or an approval gate before production. The author's advice is to keep pipelines modular and never keep passwords in pipeline code.

What it will not do is inspect your Jenkins instance or know which plugins you have. If a plugin is missing, the stage fails at runtime — worth checking your plugin list first. Install is a single npx skills add command.

What it helps with

  • write a declarative Jenkinsfile with build and test stages
  • port an old scripted pipeline to Groovy without losing steps
  • set up a multi-branch build across several branches
  • move secrets into the credentials plugin instead of code
  • add an approval gate before a production deploy

Example prompts for the agent

  • Write a Jenkinsfile for a Node project: checkout, npm ci, lint, tests with junit, archive artifacts
  • Create a parameterized pipeline that picks the environment from DEPLOY_ENV
  • Rewrite this scripted pipeline as declarative and add an approval before production

How to install jenkins-pipeline

1Skills CLI (Vercel)

npx skills add aj-geddes/useful-ai-prompts --skill jenkins-pipeline -a claude-code

2Manually: put the files in place

~/.claude/skills/jenkins-pipeline/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/jenkins-pipeline/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about jenkins-pipeline

How do I install jenkins-pipeline in Claude?

Run npx skills add aj-geddes/useful-ai-prompts --skill jenkins-pipeline -a claude-code. The skill file then lands at ~/.claude/skills/jenkins-pipeline/SKILL.md.

What does jenkins-pipeline do?

It guides the agent through writing Jenkins pipelines: stages, agents, parameters, plugin usage, multi-branch builds and deployment automation.

Declarative or scripted pipeline — which one?

Declarative uses a fixed block structure and reads more easily; scripted is full Groovy with loops and conditionals. The skill has references for both.

Source text

SKILL.md · MIT
---
name: jenkins-pipeline
description: >
  Build Jenkins declarative and scripted pipelines with stages, agents,
  parameters, and plugins. Implement multi-branch pipelines and deployment
  automation.
---

# Jenkins Pipeline

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## Overview

Create enterprise-grade Jenkins pipelines using declarative and scripted approaches to automate building, testing, and deploying with advanced control flow.

## When to Use

- Enterprise CI/CD infrastructure
- Complex multi-stage builds
- On-premise deployment automation
- Parameterized builds

## Quick Start

Minimal working example:

```groovy
pipeline {
    agent { label 'linux-docker' }
    environment {
        REGISTRY = 'docker.io'
        IMAGE_NAME = 'myapp'
    }
    parameters {
        string(name: 'DEPLOY_ENV', defaultValue: 'staging')
    }
    stages {
        stage('Checkout') { steps { checkout scm } }
        stage('Install') { steps { sh 'npm ci' } }
        stage('Lint') { steps { sh 'npm run lint' } }
        stage('Test') {
            steps {
                sh 'npm run test:coverage'
                junit 'test-results.xml'
            }
        }
        stage('Build') {
            steps {
                sh 'npm run build'
                archiveArtifacts artifacts: 'dist/**/*'
            }
        }
// ... (see reference guides for full implementation)
```

## Reference Guides

Detailed implementations in the `references/` directory:

| Guide | Contents |
|---|---|
| [Declarative Pipeline (Jenkinsfile)](references/declarative-pipeline-jenkinsfile.md) | Declarative Pipeline (Jenkinsfile) |
| [Scripted Pipeline](references/scripted-pipeline.md) | Scripted Pipeline (Groovy), Multi-Branch Pipeline, Parameterized Pipeline, Pipeline with Credentials |

## Best Practices

### ✅ DO

- Use declarative pipelines for clarity
- Use credentials plugin for secrets
- Archive artifacts and reports
- Implement approval gates for production
- Keep pipelines modular and reusable

### ❌ DON'T

- Store credentials in pipeline code
- Ignore pipeline errors
- Skip test coverage reporting
- Use deprecated plugins

© aj-geddes · MIT · aj-geddes/useful-ai-prompts

Similar skills

Everything for DevOps and infrastructure →

From the same set118

nodejs-express-server A skill that guides your agent through building Express.js servers: routing, middleware chains, JWT auth, database integration. Useful for REST APIs in Node.js. CX Codex +1 3,300installs code-review-analysis A skill that walks the agent through a systematic review: code quality, security, performance, tests. Useful when you are checking a pull request before merge. CX Codex +1 2,400installs rest-api-design This skill gives your agent rules for resource naming, HTTP methods, status codes and versioning when you build new endpoints or clean up old ones. CX Codex +1 2,100installs architecture-diagrams Generates system architecture diagrams, data flows, and C4 models using code formats like Mermaid and PlantUML. Useful when documenting service design directly inside your coding agent. CX Codex +1 2,000installs ansible-automation An Ansible skill for your coding agent: write playbooks, roles and inventory, deploy apps and patch servers. CX Codex +1 1,800installs android-kotlin-development A skill that steers your coding agent through native Android work in Kotlin: MVVM, Compose, Retrofit, Room. CX Codex +1 1,500installs ios-swift-development A skill for building native iOS apps in Swift: MVVM, SwiftUI, URLSession networking, Combine and Core Data persistence. CX Codex +1 1,500installs flask-api-development Builds modular Flask REST APIs using blueprints, SQLAlchemy ORM, and JWT authentication. It helps organize microservices and validate incoming request payloads. CX Codex +1 1,400installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor