Jenkins cli operations
Configure and use the official Jenkins CLI safely across Windows, Ubuntu/Linux, and macOS. Use for Jenkins authentication setup, job and folder discovery, parameter inspection, build triggering with explicit confirmation, build monitoring, console output, and troubleshooting CLI transport or permissions.From its SKILL.md
npx -y skills add stagefright5/jenkins-cli-operationsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.6 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Jenkins CLI Operations
Use the bundled scripts to avoid putting API tokens directly in commands, chat, shell history, or repository files.
Non-negotiable safety rules
- Never ask a user to paste an API token into chat. Direct them to a protected auth file, environment variables, or a native credential store.
- Never print tokens, auth-file contents, Authorization headers, cookies, or secret build-parameter values.
- Read-only commands may run without confirmation.
- Before triggering a build, show the exact job, non-secret parameters, redacted sensitive parameters, wait/follow behavior, and expected side effects. Obtain explicit user confirmation.
- Run
trigger-build.mjs --yesonly after that confirmation. Without--yes, the script itself requires interactive confirmation. - Do not stop, cancel, disable, delete, or reconfigure jobs unless the user explicitly requests that separate mutation and confirms it.
- Avoid passing secrets through ordinary Jenkins String/Text parameters. They are commonly retained in build metadata. Prefer Jenkins credential bindings or Password parameters.
- Never use
-noCertificateCheckas a routine workaround. Resolve trust/certificate configuration instead.
Locate the skill
Set SKILL_DIR to this skill directory before using scripts:
SKILL_DIR=/path/to/jenkins-cli-operations
On PowerShell:
$SkillDir = 'C:\path\to\jenkins-cli-operations'
Workflow
1. Establish intent
Determine:
- Jenkins base URL;
- whether the task is read-only or triggers a build;
- exact job/folder if known;
- desired build parameters;
- whether to wait and stream output.
Do not collect the token in conversation.
2. Configure authentication
Read Authentication for OS-specific file and native credential-store setup.
Create the non-secret configuration with configure.mjs:
node "$SKILL_DIR/scripts/configure.mjs" \
--url https://jenkins.example.com \
--auth-provider file \
--auth-file ~/.config/jenkins/cli-auth
For a downloaded jar, add --jar /path/to/jenkins-cli.jar. For a launcher already on PATH, add --command jenkins-cli.
Configuration defaults:
- Windows:
%APPDATA%\jenkins-cli-operations\config.json - Linux/macOS:
${XDG_CONFIG_HOME:-~/.config}/jenkins-cli-operations/config.json - Override:
JENKINS_SKILL_CONFIGor--config <path>
3. Verify access
node "$SKILL_DIR/scripts/jenkins.mjs" -- who-am-i
node "$SKILL_DIR/scripts/jenkins.mjs" -- help
The wrapper defaults to WebSocket transport. If the reverse proxy does not support it, configure --transport http and retry. An HTTP 401 means the Jenkins user ID/token pair is invalid; do not bypass it.
4. Discover jobs
Root jobs:
node "$SKILL_DIR/scripts/jenkins.mjs" -- list-jobs
Folder contents:
node "$SKILL_DIR/scripts/jenkins.mjs" -- list-jobs 'Folder Name'
Large controllers may return thousands of jobs. Filter locally and avoid dumping an unbounded list into chat:
node "$SKILL_DIR/scripts/jenkins.mjs" -- list-jobs | grep -i 'search-term'
Use PowerShell Select-String on Windows.
5. Inspect the selected job
Always inspect parameter names and types before preparing a build:
node "$SKILL_DIR/scripts/inspect-job.mjs" --job 'Folder/Job Name'
This is read-only and supports nested folders and multibranch job paths.
6. Prepare and confirm a build
Prefer a mode-restricted JSON parameter file over long shell arguments:
{
"BRANCH": "main",
"SUITES": "api-specs"
}
Show the user a summary, redacting names containing password, secret, token, credential, private, key, or auth. Explain that build parameters and the build itself are server-side mutations.
After explicit confirmation:
node "$SKILL_DIR/scripts/trigger-build.mjs" \
--job 'Folder/Job Name' \
--params-file /secure/path/params.json \
--follow \
--verbose \
--yes
For a small non-secret parameter set:
node "$SKILL_DIR/scripts/trigger-build.mjs" \
--job 'Folder/Job Name' \
--param BRANCH=main \
--param RUN_TESTS=true \
--follow \
--yes
Without --follow, the command queues the build and returns. With --follow, it propagates the final Jenkins result as its exit status. --verbose streams console output.
7. Report the outcome
Return:
- exact job and build number;
- Jenkins build URL;
- final status;
- relevant test/build summary;
- artifact/report URLs when available;
- warnings that did not affect the final result.
Do not copy secrets or complete environment payloads from console output or build parameters.
Direct CLI escape hatch
Use the authenticated wrapper for Jenkins commands not covered by helpers:
node "$SKILL_DIR/scripts/jenkins.mjs" -- help <command>
node "$SKILL_DIR/scripts/jenkins.mjs" -- console 'Folder/Job' 123
Mutating commands still require explicit confirmation under the safety rules above.
References
What ships with it: 10 files
35.4 KB alongside SKILL.md, 5 of them executable
references/
- AUTHENTICATION.md5.7 KB
- OPERATIONS.md4.5 KB
scripts/
- configure.mjsruns3.7 KB
- inspect-job.mjsruns2.5 KB
- jenkins.mjsruns1.3 KB
- lib/config.mjsruns8.4 KB
- trigger-build.mjsruns5.7 KB
- .gitignore133 B
- LICENSE1.0 KB
- README.md2.4 KB
Gives 0 of the 12 instructions most operations skills give in ~1.2k tokens
Counted across 483 of the 484 authors here whose files we hold, read 2026-08-07
- Collect monitoring data throughout the simulationin 14 of 483, across 6 files
- Set the random seed for reproducibilityin 14 of 483, across 6 files
- Validate simulations against analytical solutionsin 12 of 483, across 4 files
- Clarify goals, constraints, and inputsin 11 of 483, across 2 files
- Implement contract tests for integration pointsin 11 of 483, across 2 files
- Implement strangler fig infrastructure with API gatewayin 11 of 483, across 2 files
- Audit modernized components for security vulnerabilitiesin 11 of 483, across 2 files
- Avoid Python blocking calls in processesin 10 of 483, across 3 files
- Use resource context managers for automatic cleanupin 9 of 483, across 2 files
- Maintain consistent time unitsin 9 of 483, across 2 files
- Validate outcomes against success criteriain 8 of 483, across 1 file
- Analyze the legacy codebase for technical debtin 8 of 483, across 1 file
Said here and by no other author read
- use bundled scripts for authentication
- direct users to protected credential stores
- inspect job parameters before preparing a build
- filter large job lists locally before output
- redact sensitive parameter names in summaries
- pass build parameters via mode-restricted JSON file
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.