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.
npx skills add aj-geddes/useful-ai-prompts --skill jenkins-pipeline -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/jenkins-pipeline/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/jenkins-pipeline/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill jenkins-pipeline -a codex2Manually: put the files in place
.agents/skills/jenkins-pipeline/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill jenkins-pipeline -a cursor2Manually: put the files in place
.cursor/skills/jenkins-pipeline/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts jenkins-pipeline2Manually: put the files in place
.github/skills/jenkins-pipeline/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill jenkins-pipeline -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/jenkins-pipelineManually: put the files in place
.devin/skills/jenkins-pipeline/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill jenkins-pipeline -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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