Skip to content

About

opencode.ai skill for interacting with Jenkins via SSH CLI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins Skill for opencode.ai

A skill that lets AI agents interact with Jenkins over SSH using the Jenkins CLI. Once configured, you can ask the AI to trigger builds, tail console output, manage jobs, nodes, plugins, credentials, views, and run Groovy scripts — all without leaving your opencode session.

Requirements

  • SSH access to a Jenkins instance with the CLI enabled on port 2222
  • Your SSH public key added to your Jenkins user account
  • opencode.ai with skills support

Installation

1. Clone the repo into your opencode skills directory

mkdir -p ~/.config/opencode/my-skills
git clone https://github.com/YOUR_USERNAME/jenkins-skill ~/.config/opencode/my-skills/jenkins

2. Configure SSH

Copy the example config and fill in your values:

cd ~/.config/opencode/my-skills/jenkins
cp references/ssh_config.example ssh_config

Edit ssh_config and replace the placeholders:

Host jenkins
  HostName <jenkins-host-or-ip>
  Port 2222
  User <your-username>

3. Verify connectivity

Run this from the skill directory:

ssh -F ssh_config jenkins who-am-i

You should see your Jenkins username and permissions. If it hangs or errors, check that your SSH key is registered with Jenkins and the host/port are correct.

4. Allow the SSH command in opencode

Add the following to the bash permissions block in your opencode.json:

"bash": {
  "*": "ask",
  "ssh jenkins *": "allow"
}

This lets the AI run Jenkins CLI commands without prompting for confirmation each time.

Usage

Once installed, just describe what you want in natural language. Example prompts:

  • "Trigger the deploy-prod job and tail the logs"
  • "Show me the last 50 lines of console output for the build-api job"
  • "List all failing jobs"
  • "Disable the nightly-tests job until Monday"
  • "Run this Groovy script on Jenkins and show me the output"
  • "What plugins are installed and which ones are out of date?"
  • "Restart Jenkins safely after the current builds finish"

Security Notes

  • ssh_config is gitignored — your hostname, port, and username stay local
  • Secrets in credentials are redacted by the Jenkins CLI when exported as XML
  • The ssh jenkins * permission allows any Jenkins CLI command — scope your user's Jenkins permissions appropriately

About

opencode.ai skill for interacting with Jenkins via SSH CLI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors