From graft
Jenkins plugin code review expertise — security patterns, expert reviewer checklist, common anti-patterns, API misuse, and quality standards. Use this skill when reviewing Jenkins plugin code, auditing security, checking code against community standards, or preparing a PR for the jenkinsci organization. Encodes the actual review patterns of top Jenkins core maintainers: what they flag, what they expect, and what they reject. Make sure to use this skill whenever the user mentions Jenkins code review, plugin PR, Jenkins security audit, plugin quality check, Jenkins anti-patterns, or Jenkins best practices — even if they just say "review my plugin code." Triggers on: Jenkins code review, Jenkins PR review, Jenkins security audit, plugin quality, Jenkins anti-patterns, Jenkins best practices, plugin PR, jenkinsci review.
How this skill is triggered — by the user, by Claude, or both
Slash command
/graft:jenkins-reviewsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Review checklist derived from the actual PR review patterns of Jenkins core maintainers.
Review checklist derived from the actual PR review patterns of Jenkins core maintainers. These are the patterns they consistently flag — organized by severity.
XSS in Jelly views:
<?jelly escape-by-default='true'?> as first line<script> blocksh.rawHtml() on untrusted contentUtil.xmlEscape())Permission bypass:
<l:layout permission=...> only hides UI — does NOT protect form submission endpointsdoCheck/doFill methodsFormValidation.error() when unauthorized (leaks info) — return .ok() instead@POST on validation methods with side effects@Restricted(DoNotUse.class) on web-facing internal methodsSecrets exposure:
String instead of Secretprogram.dat)sh stepCSRF:
@POST annotation on state-changing endpointscheckMethod="post" in Jelly <f:validateButton>Pipeline incompatibility:
AbstractBuild instead of Run<?, ?>AbstractProject instead of Job<?, ?>BuildListener instead of TaskListenergetBuiltOn() instead of FilePath.toComputer()CPS thread blocking:
SynchronousStepExecution for I/O-bound work — blocks ALL Pipeline jobsSynchronousNonBlockingStepExecution for anything that does I/OClassloader violations:
Class.forName() in flat test hierarchy vs isolated plugin classloadersRealJenkinsRule when reflection is involvedUnnecessary indirection:
Boolean field defaults:
false/null in existing serialized XML — design around thisJust-in-time resolution:
Jenkins.get().getProxy() over stored proxy referencesResource leaks:
Core maintainers consistently flag dependency issues:
<dependencyManagement> not <dependencies>TODO comments for BOM workaroundstoLowerCase(Locale.ROOT) instead of bare toLowerCase()Util.fixEmpty() in getters to clean snippet generator outputMessages class for i18n display names@WithoutJenkins for tests that don't need Jenkins (faster)@ClassRule for BuildWatcher (not @Rule — it's per-class).groovy resources, not inline stringsSystemProperties.getDuration() instead of custom parsingWhen reviewing Jenkins plugin code, structure findings like this:
## Jenkins Plugin Review Report
### Summary
- Files reviewed: N
- Total findings: N (P0: X, P1: Y, P2: Z)
### P0 — Critical Issues
**File.java:42** Missing @POST on doTestConnection
- **Why critical:** State-changing endpoint without CSRF protection
- **Fix:** Add @POST annotation and checkMethod="post" in Jelly
### P1 — Important Issues
**Builder.java:55** Missing @Symbol on DescriptorImpl
- **Why important:** Forces ugly [$class: 'ClassName'] Pipeline syntax
- **Fix:** Add @Symbol("myBuilder") annotation to DescriptorImpl
### P2 — Minor Issues
**Builder.java:88** toLowerCase() without Locale
- **Fix:** Use toLowerCase(Locale.ROOT)
### Verdict: [A/B/C]
When reviewing Jenkinsfiles or Pipeline-related code:
script {} blocks in Declarative Pipelinetrue) in CpsFlowDefinition for testssh step@Symbol on all Descriptors for clean DSL syntax@Symbol on GlobalConfiguration and all configurable Descriptors@DataBoundSetter for all settable propertiesnpx claudepluginhub aneveux/claude-garden --plugin graftValidates Declarative/Scripted Jenkinsfiles and Groovy shared libraries for syntax, security issues, hardcoded credentials, and best practices using bash scripts.
Develops custom Checkstyle checks, filters, and plugin integrations for project-specific Java code standards.
Analyzes GitHub Actions and GitLab CI configurations for structure issues, caching efficiency, security risks, performance optimizations, and best practices. Useful for auditing and improving CI/CD pipelines.