Jenkins cli operations
Cross-platform Agent Skill for safe Jenkins CLI setup, job discovery, build triggering, and monitoring.
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.
2 things to look at
- 15 days oldThe repository was created 15 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 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.
What its author says it does
Copied from the file, not written here
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.
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
Gives 0 of the 12 instructions most ci cd skills give in ~1.2k tokens
Counted across 392 of the 394 authors here whose files we hold, read 2026-08-06
- pin third-party actions to full commit SHAsin 33 of 392
- cache dependencies appropriatelyin 24 of 392, across 12 files
- optimize pipelines exceeding ten minutesin 20 of 392, across 6 files
- enforce all quality gates before mergein 20 of 392, across 7 files
- Configure branch protection rulesin 19 of 392, across 5 files
- use environments for deployment trackingin 19 of 392, across 7 files
- implement manual gates for productionin 19 of 392, across 7 files
- implement security scanningin 18 of 392, across 5 files
- fix failing code instead of disabling checksin 18 of 392, across 4 files
- use CI/CD variables for secretsin 18 of 392, across 6 files
- move checks upstream in the pipelinein 17 of 392, across 3 files
- use specific image tagsin 17 of 392, across 5 files
Said here and by no other author read
- use bundled scripts for authentication
- direct users to protected credential stores
- run read-only commands without confirmation
- show job details and obtain confirmation before triggering builds
- inspect job parameters before preparing a build
- filter large job lists locally before output
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.