Agent skill

Jenkinsfile Validator

by akin-ozer in akin-ozer/cc-devops-skills

Validate, lint, audit, or check Jenkinsfiles and shared libraries.

Apache-2.0Auto-check passedDevOps & Cloud

Install Jenkinsfile Validator

skills CLI
$ npx skills add akin-ozer/cc-devops-skills --skill jenkinsfile-validator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install akin-ozer/cc-devops-skills jenkinsfile-validator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/devops-skills-plugin/skills/jenkinsfile-validator .claude/skills/jenkinsfile-validator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
jenkinsfile-validator
GitHub stars
320
Token cost
~2.7k tokens
SKILL.md length
764 words
Files
27 (incl. scripts, references)
Skills in repo
30
Repo updated
First seen
Licence
Apache-2.0

At a glance

Validate, lint, audit, or check Jenkinsfiles and shared libraries.

  • Works in 6 steps: Detect pipeline type → Run syntax validation → Run security scan → …
  • Tasks that involve Linting and formatting
  • SKILL.md covers Trigger Phrases, Scope, Prerequisites and Quick Start (Normalized Paths), plus 4 more sections
  • Calls bash and node

What it does

Jenkinsfile Validator is an agent skill from akin-ozer/cc-devops-skills. Validate, lint, audit, or check Jenkinsfiles and shared libraries.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 33 other files, including scripts and reference files (for example `references/best_practices.md`).

It sits in DevOps & Cloud, covering Linting and formatting. It works with Jenkins and Bash. The repository describes itself as: DevOps skills for Claude Code and Codex. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Linting and formatting

Example prompts

  • “/jenkinsfile-validator”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Detect pipeline type
  2. Run syntax validation
  3. Run security scan
  4. Run best practices check
  5. Aggregate and return final status
  6. Run regression suite after script changes

What it can do on your machine

Read from SKILL.md and the folder at commit 276af75. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • jenkins.io
    • plugins.jenkins.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Jenkinsfile Validator loads about 2.7k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 22 tokens; SKILL.md has 764 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~22
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from akin-ozer/cc-devops-skills at commit 276af75, republished under its Apache-2.0 licence (© akin-ozer). 764 words, ~2,675 tokens.

Download SKILL.mdSave it as .claude/skills/jenkinsfile-validator/SKILL.md (or your agent's skills folder). This skill also uses 26 other files; get the full folder from GitHub.
name
jenkinsfile-validator
description
Validate, lint, audit, or check Jenkinsfiles and shared libraries.

Jenkinsfile Validator Skill

Use this skill to validate Jenkins pipelines and shared libraries with local scripts first, then optionally enrich findings with plugin documentation.

Trigger Phrases

Use this skill when requests look like:

  • "Validate this Jenkinsfile"
  • "Check this pipeline for security issues"
  • "Lint my Declarative/Scripted pipeline"
  • "Why is this Jenkins pipeline failing syntax checks?"
  • "Validate vars/.groovy or src/**/.groovy shared library files"

Scope

This skill validates:

  • Declarative pipelines (pipeline { ... })
  • Scripted pipelines (node { ... } and Groovy-style pipelines)
  • Shared library files (vars/*.groovy, src/**/*.groovy)
  • Hardcoded credential patterns
  • Pipeline best practices and maintainability signals

Prerequisites

Run commands from repository root unless noted.

Required tools
  • bash
  • grep
  • sed
  • awk
  • head
  • wc
  • find (needed for shared-library directory scans)
  • jq (optional; improves JSON-heavy troubleshooting workflows)
Script prerequisites
  • Scripts live in devops-skills-plugin/skills/jenkinsfile-validator/scripts/
  • Main orchestrator can run child scripts even if +x is missing (it uses bash fallback)
  • If you want direct execution (./script.sh), make scripts executable:
bash
chmod +x devops-skills-plugin/skills/jenkinsfile-validator/scripts/*.sh
bash
SKILL_DIR="devops-skills-plugin/skills/jenkinsfile-validator"

command -v bash grep sed awk head wc find >/dev/null && echo "required tools: ok" || echo "required tools: missing"
command -v jq >/dev/null && echo "jq: installed (optional)" || echo "jq: missing (optional)"

[ -d "$SKILL_DIR/scripts" ] && echo "scripts dir: ok" || echo "scripts dir: missing"
[ -f "$SKILL_DIR/scripts/validate_jenkinsfile.sh" ] && echo "main validator: ok" || echo "main validator: missing"

Quick Start (Normalized Paths)

Use a single base path variable to avoid path ambiguity.

bash
SKILL_DIR="devops-skills-plugin/skills/jenkinsfile-validator"
TARGET_JENKINSFILE="Jenkinsfile"

# Full validation (recommended)
bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" "$TARGET_JENKINSFILE"
Common options
bash
SKILL_DIR="devops-skills-plugin/skills/jenkinsfile-validator"
TARGET_JENKINSFILE="Jenkinsfile"

bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" --syntax-only "$TARGET_JENKINSFILE"
bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" --security-only "$TARGET_JENKINSFILE"
bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" --best-practices "$TARGET_JENKINSFILE"
bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" --no-security "$TARGET_JENKINSFILE"
bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" --no-best-practices "$TARGET_JENKINSFILE"
bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" --strict "$TARGET_JENKINSFILE"
bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" --assume-declarative "$TARGET_JENKINSFILE"
bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" --assume-scripted "$TARGET_JENKINSFILE"
Shared library validation
bash
SKILL_DIR="devops-skills-plugin/skills/jenkinsfile-validator"

bash "$SKILL_DIR/scripts/validate_shared_library.sh" vars/myStep.groovy
bash "$SKILL_DIR/scripts/validate_shared_library.sh" vars/
bash "$SKILL_DIR/scripts/validate_shared_library.sh" src/
bash "$SKILL_DIR/scripts/validate_shared_library.sh" /path/to/shared-library
Regression and local CI checks
bash
SKILL_DIR="devops-skills-plugin/skills/jenkinsfile-validator"
bash "$SKILL_DIR/tests/run_local_ci.sh"

run_local_ci.sh is the supported local/CI entrypoint for regression coverage. It runs:

  • bash -n syntax checks for all scripts/*.sh and tests/*.sh files
  • tests/test_validate_jenkinsfile.sh regression scenarios

Deterministic Validation Flow

1) Detect pipeline type
  • pipeline { => Declarative validator
  • node (...) or node { => Scripted validator
  • Unknown => fails closed by default (ERROR [TypeDetection])
  • Override intentionally ambiguous files with --assume-declarative or --assume-scripted
2) Run syntax validation
  • Declarative: validate_declarative.sh
  • Scripted: validate_scripted.sh
3) Run security scan
  • common_validation.sh check_credentials
4) Run best practices check
  • best_practices.sh
5) Aggregate and return final status
  • Unified summary with pass/fail per phase and final exit code
6) Run regression suite after script changes
  • bash tests/run_local_ci.sh
  • Intended for both local pre-commit checks and CI job wiring

Individual Script Commands (Advanced)

bash
SKILL_DIR="devops-skills-plugin/skills/jenkinsfile-validator"
TARGET_JENKINSFILE="Jenkinsfile"

# Type detection
bash "$SKILL_DIR/scripts/common_validation.sh" detect_type "$TARGET_JENKINSFILE"

# Syntax-only by type
bash "$SKILL_DIR/scripts/validate_declarative.sh" "$TARGET_JENKINSFILE"
bash "$SKILL_DIR/scripts/validate_scripted.sh" "$TARGET_JENKINSFILE"

# Security-only
bash "$SKILL_DIR/scripts/common_validation.sh" check_credentials "$TARGET_JENKINSFILE"

# Best-practices-only
bash "$SKILL_DIR/scripts/best_practices.sh" "$TARGET_JENKINSFILE"

Exit Code and Log Interpretation

Main orchestrator: validate_jenkinsfile.sh
  • 0: Validation passed
  • 1: Validation failed (syntax/security errors, or warnings in --strict mode)
  • 2: Usage or environment error (bad args, missing file, missing required tools)
Sub-scripts
  • validate_declarative.sh: 0 pass (errors=0), 1 usage/file/validation failure
  • validate_scripted.sh: 0 pass (errors=0), 1 usage/file/validation failure
  • common_validation.sh check_credentials: 0 no credential errors, 1 credential issues found
  • validate_shared_library.sh: 0 pass, 1 validation errors found, 2 invalid input target
  • best_practices.sh: 1 only for usage/file errors; content findings are reported in logs and score output
Log severity patterns
  • ERROR [Line N]: ... => must fix
  • WARNING [Line N]: ... => should review
  • INFO [Line N]: ... => optional improvement
  • Summary banners (VALIDATION PASSED/FAILED) determine final interpretation quickly
Practical interpretation rules
  • For CI gating, rely on main orchestrator exit code.
  • Use --strict when warnings should fail pipelines.
  • When best_practices.sh is run standalone, read report sections (CRITICAL ISSUES, IMPROVEMENTS RECOMMENDED, score); do not rely only on exit code.

Fallback Behavior

Missing optional tools
  • If jq is missing, continue validation; treat as non-blocking.
Non-executable child scripts
  • Main orchestrator warns and falls back to bash <script> execution.
Show full SKILL.md (300 more words)Show less
Missing child scripts
  • Main orchestrator reports runner error and returns failure for that phase.
Unknown plugin steps

Use this order:

  1. Check local reference: devops-skills-plugin/skills/jenkinsfile-validator/references/common_plugins.md
  2. Context7 lookup:
    • mcp__context7__resolve-library-id with query like jenkinsci <plugin-name>-plugin
    • mcp__context7__query-docs for usage and parameters
  3. Web fallback: plugins.jenkins.io and official Jenkins docs
Offline/air-gapped mode
  • Run all local validators.
  • If plugin docs cannot be fetched, report: "Plugin docs lookup skipped due to environment constraints; local validation only."

Plugin Documentation Lookup Workflow

When plugin-specific validation is requested:

  1. Identify unknown steps from Jenkinsfile or validator logs.
  2. Check references/common_plugins.md first.
  3. If missing, use Context7 (resolve-library-id then query-docs).
  4. If still missing, use web search against official plugin index/docs.
  5. Return required parameters, optional parameters, version-sensitive notes, and security guidance.

References

Local references:

  • devops-skills-plugin/skills/jenkinsfile-validator/references/declarative_syntax.md
  • devops-skills-plugin/skills/jenkinsfile-validator/references/scripted_syntax.md
  • devops-skills-plugin/skills/jenkinsfile-validator/references/best_practices.md
  • devops-skills-plugin/skills/jenkinsfile-validator/references/common_plugins.md

External references:

Reporting Template

Use this structure in validation responses:

text
Validation Target: <path>
Pipeline Type: <Declarative|Scripted|Shared Library|Unknown>

Findings:
- ERROR [Line X]: <issue>
- WARNING [Line Y]: <issue>
- INFO [Line Z]: <suggestion>

Phase Results:
- Syntax: <PASSED|FAILED|SKIPPED>
- Security: <PASSED|FAILED|SKIPPED>
- Best Practices: <PASSED|REVIEW NEEDED|SKIPPED>

Exit Code: <0|1|2>
Next Actions:
1. <highest-priority fix>
2. <second fix>

Example Flows

Example 1: Full Jenkinsfile validation
bash
SKILL_DIR="devops-skills-plugin/skills/jenkinsfile-validator"
bash "$SKILL_DIR/scripts/validate_jenkinsfile.sh" Jenkinsfile

Expected behavior:

  • Runs syntax + security + best practices
  • Prints per-phase results and unified summary
  • Returns 0/1/2 per orchestrator rules
Example 2: Shared library directory validation
bash
SKILL_DIR="devops-skills-plugin/skills/jenkinsfile-validator"
bash "$SKILL_DIR/scripts/validate_shared_library.sh" examples/shared-library

Expected behavior:

  • Validates both vars/ and src/ files
  • Aggregates issues with line references
  • Returns 1 when errors are present
Example 3: Unknown plugin step follow-up

Input step:

groovy
nexusArtifactUploader artifacts: [[...]], nexusUrl: 'https://nexus.example.com'

Flow:

  1. Validate locally first.
  2. If step behavior is unclear, resolve docs via Context7.
  3. If unavailable, use plugin site docs.
  4. Report usage guidance and security-safe parameter patterns.

Done Criteria

The skill usage is complete when all are true:

  • Commands use normalized paths ($SKILL_DIR/scripts/...) with no cwd ambiguity.
  • Prerequisites and optional dependencies are explicit.
  • Exit-code semantics and log-severity interpretation are documented.
  • Fallback behavior is defined for missing tools/docs and constrained environments.
  • At least one runnable example exists for full validation and shared-library validation.
  • Reporting format is deterministic and actionable.

© akin-ozer, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 26 other files (scripts, references) in devops-skills-plugin/skills/jenkinsfile-validator of akin-ozer/cc-devops-skills.

  • SKILL.md
  • examples/bad-declarative-pipeline.Jenkinsfile
  • examples/bad-scripted-pipeline.Jenkinsfile
  • examples/declarative-docker.Jenkinsfile
  • examples/declarative-kubernetes.Jenkinsfile
  • examples/declarative-parallel.Jenkinsfile
  • examples/declarative-unknown-plugins.Jenkinsfile
  • examples/scripted-basic.Jenkinsfile
  • examples/scripted-conditional.Jenkinsfile
  • examples/scripted-docker.Jenkinsfile
  • examples/shared-library/src/com/example/BuildConfig.groovy
  • examples/shared-library/vars/BadStep.groovy
  • examples/shared-library/vars/buildApp.groovy
  • references/best_practices.md
  • … and 13 more

Open the folder on GitHubat commit 276af75

Compare with similar skills

Jenkinsfile Validator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Jenkinsfile Validator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Jenkinsfile Validator this skillakin-ozer/cc-devops-skills320—~2.7kAutomated safety check: PassApache-2.0
Rtk Skillsopaco/deepwiki-rs3.1k—~1.4kAutomated safety check: PassMIT
Flow Contextflowexec/flow138—~654Automated safety check: PassApache-2.0
Postman Newman Automationsickn33/agentic-awesome-skills47k1 repos~2.1kAutomated safety check: PassMIT
Bash Defensive Patternspromovaweb/setupvibe10314 repos~572Automated safety check: PassGPL-3.0
Maintainer Triageredis/node-redis18k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Rtk Skill

    sopaco/deepwiki-rs

    A skill your agent uses when running shell commands that produce verbose output (git, test, build, lint, package managers, docker).

    3.1k GitHub stars~1.4k tokensUpdated 25 days ago
    DevOps & CloudAuto-check passed
  • Flow Context

    flowexec/flow

    This project uses flow for automation. An agent skill from flowexec/flow.

    138 GitHub stars~654 tokensUpdated 8 days ago
    DevOps & CloudAuto-check passed
  • Postman Newman Automation

    sickn33/agentic-awesome-skills

    Generate Newman CLI commands, configuration files, Jenkins pipeline scripts, and shell automation for running Postman collections in CI/CD or local environments.

    47k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed
  • Bash Defensive Patterns

    promovaweb/setupvibe

    Master defensive Bash programming techniques for production-grade scripts.

    103 GitHub starsUsed in 14 repos~572 tokens
    DevOps & CloudAuto-check passed
  • Maintainer Triage

    redis/node-redis

    Official

    Batch-triage and act on a set of node-redis PRs (or issues) by filter — fan out the maintainer-review methodology across them, present a one-word verdict plus a tldr to the user one at a time for…

    18k GitHub stars~1.9k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • GitHub Actions Creator

    FNOSP/FlyNarwhal

    A skill your agent uses when the user wants to create, generate, or set up a GitHub Actions workflow.

    509 GitHub starsUsed in 1 repo~2.4k tokens
    DevOps & CloudAuto-check passed

More from akin-ozer/cc-devops-skills

All 30 skills in this repo
  • GitHub Actions Generator

    akin-ozer/cc-devops-skills

    Create, generate, or scaffold GitHub Actions workflows, action.yml, or .github/workflows CI/CD pipelines.

    320 GitHub stars~3.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Helm Generator

    akin-ozer/cc-devops-skills

    Create, scaffold, or generate Helm charts, Chart.yaml, values.yaml, templates, helpers.

    320 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Jenkinsfile Generator

    akin-ozer/cc-devops-skills

    Generate/create/scaffold Jenkinsfile — declarative, scripted, shared library, CI/CD pipelines.

    320 GitHub stars~3.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Dockerfile Validator

    akin-ozer/cc-devops-skills

    Validate, lint, audit, or scan a Dockerfile for security and best practices.

    320 GitHub stars~2.3k tokensUpdated 2 mo ago
    Auto-check passed
  • GitHub Actions Validator

    akin-ozer/cc-devops-skills

    Validate, lint, audit, fix GitHub Actions workflows (.github/workflows).

    320 GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • K8s Debug

    akin-ozer/cc-devops-skills

    Diagnose and fix Kubernetes pods, CrashLoopBackOff, Pending, DNS, networking, storage, and rollout failures with kubectl.

    320 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Jenkinsfile Validator

What does Jenkinsfile Validator do?

Validate, lint, audit, or check Jenkinsfiles and shared libraries. Jenkinsfile Validator is an agent skill from akin-ozer/cc-devops-skills. Validate, lint, audit, or check Jenkinsfiles and shared libraries.

When should I use Jenkinsfile Validator?

Jenkinsfile Validator fits situations like: tasks that involve Linting and formatting.

How do I install Jenkinsfile Validator in Claude Code?

Run `npx skills add akin-ozer/cc-devops-skills --skill jenkinsfile-validator -a claude-code`. Or copy the skill folder (devops-skills-plugin/skills/jenkinsfile-validator in akin-ozer/cc-devops-skills) into .claude/skills/jenkinsfile-validator in your project. Claude Code loads it when a task matches its description.

How do I install Jenkinsfile Validator in Codex?

Run `npx skills add akin-ozer/cc-devops-skills --skill jenkinsfile-validator -a codex`. Or copy the skill folder (devops-skills-plugin/skills/jenkinsfile-validator in akin-ozer/cc-devops-skills) into .agents/skills/jenkinsfile-validator in your project. Codex loads it when a task matches its description.

Can I use Jenkinsfile Validator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add akin-ozer/cc-devops-skills --skill jenkinsfile-validator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/jenkinsfile-validator, .gemini/skills/jenkinsfile-validator, .github/skills/jenkinsfile-validator and .opencode/skills/jenkinsfile-validator in your project.

What does Jenkinsfile Validator need to run?

Going by SKILL.md and its folder, Jenkinsfile Validator needs the command-line tools its instructions call (bash and node).

Does Jenkinsfile Validator access the network?

SKILL.md names 2 domains. As links in the text: jenkins.io and plugins.jenkins.io. This is read from the text; nothing was executed.

Is Jenkinsfile Validator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Jenkinsfile Validator use?

Jenkinsfile Validator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Jenkinsfile Validator use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 15k tokens, read only when the agent opens those files.

What are the alternatives to Jenkinsfile Validator?

Skills that share tags, products or a category with Jenkinsfile Validator: Rtk Skill (sopaco/deepwiki-rs, 3.1k stars), Flow Context (flowexec/flow, 138 stars), Postman Newman Automation (sickn33/agentic-awesome-skills, 47k stars) and Bash Defensive Patterns (promovaweb/setupvibe, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Jenkinsfile Validator?

akin-ozer (a GitHub user) maintains it in akin-ozer/cc-devops-skills, which has 320 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on July 26, 2026.

Source: akin-ozer/cc-devops-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.