jenkins-cli
Skill8 starsChanged 6 months agoApache-2.0View on GitHub
Perform Jenkins operations using the jenkins-cli.
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use the CLI setup and command format below when constructing all jenkins-cli commands.
- Distinctive: line 12
Update the table below with your Jenkins server URLs and auth file paths:
- Distinctive: line 19
If the target server is unclear, ask the user before running any command.
- Very specific: line 26
All commands must be run from the working directory's root (where jenkins-cli/ directory exists).
- Very specific: line 30
If the jenkins-cli/ directory does not exist yet, or jenkins-cli.jar or the auth file for the target server is missing, inform the user …
- Very specific: line 32
Create the directory jenkins-cli in the working directory's root.
- Very specific: line 34
Create an auth file for each server you intend to use, with your credentials in this exact format: username:api-token
- Very specific: line 134
Always use jenkins-cli.jar for all Jenkins operations.
- Distinctive: line 135
NEVER target a server not listed in the instance table above.
- Distinctive: line 136
Update the instance table with your actual Jenkins URLs before using this skill.
- Distinctive: line 137
If a job name, parameter, or folder path references an unfamiliar environment, stop and ask the user before running.
- Distinctive: line 138
NEVER run commands in the "Never run" table above without explicit user instruction.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Jenkins CLI Skill
Use the CLI setup and command format below when constructing all jenkins-cli commands.
Instances
Update the table below with your Jenkins server URLs and auth file paths:
| Environment | Server URL | Auth File |
| Production | https://<your-jenkins-prod-url> | jenkins-cli/prod.auth |
| Staging | https://<your-jenkins-staging-url> | jenkins-cli/staging.auth |
If the target server is unclear, ask the user before running any command.
CLI Setup
- JAR File:
jenkins-cli/jenkins-cli.jar(working directory's root) - Auth Files: one per server — see instance table above. File contents format:
username:api-token
All commands must be run from the working directory's root (where jenkins-cli/ directory exists).
Prerequisites (one-time setup by user)
If the jenkins-cli/ directory does not exist yet, or jenkins-cli.jar or the auth file for the target server is missing, inform the user that setup is required and ask them to complete the following steps manually. Do not perform these steps yourself.
- Create the directory
jenkins-cliin the working directory's root. - Download the JAR from
<YOUR_JENKINS_URL>/jnlpJars/jenkins-cli.jarand save it asjenkins-cli/jenkins-cli.jar. - Create an auth file for each server you intend to use, with your credentials in this exact format:
username:api-tokenjenkins-cli/prod.authjenkins-cli/staging.auth
Command Format
java -jar jenkins-cli/jenkins-cli.jar -s <SERVER_URL> -auth @<AUTH_FILE> [command]Example (production):
java -jar jenkins-cli/jenkins-cli.jar -s https://<your-jenkins-prod-url> -auth @jenkins-cli/prod.auth who-am-iAvailable Commands
Read-only (safe, no confirmation needed)
| Command | Description |
who-am-i | Verify auth and show permissions |
version | Show Jenkins version |
list-jobs [folder] | List all jobs (optionally in a folder/view) |
get-job <job> | Dump job config XML to stdout |
console <job> [build#] | Get console output of a build; build# accepts integers or Jenkins specifiers like lastSuccessfulBuild, lastBuild, lastFailedBuild |
list-changes <job> [build#] | Show changelog for a build; build# must be an integer — specifiers like lastSuccessfulBuild are not accepted |
get-node <node> | Dump node config XML |
get-view <view> | Dump view config XML |
list-plugins | List installed plugins |
session-id | Show current session ID |
export-configuration | Export Jenkins config as YAML |
check-configuration | Validate YAML configuration |
declarative-linter | Validate a Declarative Jenkinsfile (reads from stdin) |
list-credentials <store> | List credentials in a store |
get-credentials-as-xml <store> <domain> <id> | Get credential XML (secrets redacted) |
get-credentials-domain-as-xml <store> <domain> | Get credentials domain XML |
list-credentials-context-resolvers | List credentials context resolvers |
list-credentials-providers | List credentials providers |
help [command] | List all commands or describe one command |
reload-job <job> | Reload job config from disk (read-only, no state change) |
Build operations (confirm if job looks like production)
| Command | Description |
build <job> [-s] [-v] [-p key=val] | Trigger a build (-s waits, -v streams output) |
stop-builds <job> | Stop all running builds for a job |
keep-build <job> <build#> | Mark a build to keep forever |
set-build-description <job> <build#> <desc> | Set build description |
set-build-display-name <job> <build#> <name> | Set build display name |
set-next-build-number <job> <number> | Set next build number |
replay-pipeline <job> [build#] | Replay a pipeline with edited script from stdin |
restart-from-stage <job> <build#> <stage> | Restart a Declarative Pipeline from a given stage |
Job / view management (ask user before running)
| Command | Description |
create-job <job> | Create a new job (XML from stdin) |
update-job <job> | Update job config (XML from stdin) |
copy-job <src> <dst> | Copy a job |
enable-job <job> | Enable a job |
disable-job <job> | Disable a job |
create-view <view> | Create a new view (XML from stdin) |
update-view <view> | Update view config (XML from stdin) |
add-job-to-view <view> <job> | Add a job to a view |
remove-job-from-view <view> <job> | Remove a job from a view |
connect-node <node> | Reconnect a node |
disconnect-node <node> | Disconnect a node |
offline-node <node> | Take a node offline temporarily |
online-node <node> | Bring a node back online |
create-node <node> | Create a new node (XML from stdin) |
update-node <node> | Update node config (XML from stdin) |
reload-configuration | Reload all config from disk |
reload-jcasc-configuration | Reload JCasC YAML config |
Never run — requires explicit human approval
| Command | Reason |
delete-job <job> | Irreversible deletion |
delete-node <node> | Irreversible deletion |
delete-view <view> | Irreversible deletion |
delete-credentials ... | Irreversible deletion |
delete-credentials-domain ... | Irreversible deletion |
clear-queue | Cancels all queued builds |
quiet-down / cancel-quiet-down | Affects all builds instance-wide |
restart / safe-restart | Restarts Jenkins for all users |
shutdown / safe-shutdown | Shuts down Jenkins for all users |
delete-builds <job> <range> | Irreversible deletion of build records |
apply-configuration | Applies YAML config changes to the entire Jenkins instance |
groovy / groovysh | Arbitrary code execution on Jenkins master |
install-plugin / enable-plugin / disable-plugin | Modifies Jenkins instance globally |
import-credentials-as-xml / update-credentials-by-xml | Modifies stored credentials |
mail | Sends email to real recipients |
support | Generates and may upload diagnostic bundles |
Rules
- Always use
jenkins-cli.jarfor all Jenkins operations. Do not usecurlor other HTTP clients against the Jenkins REST API. - NEVER target a server not listed in the instance table above. If asked to run against an unfamiliar server URL, stop and ask the user to confirm.
- Update the instance table with your actual Jenkins URLs before using this skill.
- If a job name, parameter, or folder path references an unfamiliar environment, stop and ask the user before running.
- NEVER run commands in the "Never run" table above without explicit user instruction.
In this repository54 other files it gives its agents.
- alibabacloud-cliSkill
- ansible-cliSkill
- appdynamics-cliSkill
- argocd-cliSkill
- aws-cliSkill
- aws-cloudwatch-cliSkill
- azure-cliSkill
- bash-lintingSkill
- betterstack-cliSkill
- bitbucket-cliSkill
- chef-cliSkill
- code-reviewSkill
- commit-codeSkill
- create-dockerfileSkill
- create-terraform-helm-upgrade-planSkill
- datadog-cliSkill
- digitalocean-cliSkill
- dockerfile-lintingSkill
- dynatrace-cliSkill
- elasticsearch-cliSkill
- gcp-cliSkill
- github-cliSkill
- gitlab-cliSkill
- go-lintingSkill
- grafana-cliSkill
- grafana-loki-cliSkill
- graylog-cliSkill
- helm-cliSkill
- hetzner-cliSkill
- huaweicloud-cliSkill
- jaeger-cliSkill
- jira-and-confluence-cliSkill
- kibana-cliSkill
- kubernetes-cliSkill
- loggly-cliSkill
- maintenance-check-aws-eksSkill
- maintenance-create-ticket-on-jiraSkill
- ms-teams-cliSkill
- mysql-cliSkill
- newrelic-cliSkill
- oci-cliSkill
- packer-cliSkill
- papertrail-cliSkill
- postgresql-cliSkill
- prometheus-cliSkill
- python-lintingSkill
- rollbar-cliSkill
- salesforce-cliSkill
- sentry-cliSkill
- slack-cliSkill
- splunk-cliSkill
- terraform-cliSkill
- terraform-lintingSkill
- vault-cliSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

