Add /drupal-work-on-issue agentic workflow skill#297
Merged
Conversation
Introduces a new slash-command skill that guides Claude through the end-to-end Drupal.org contribution workflow: fork verification, remote setup, branch checkout, MR inspection, and a fix→push→pipeline loop. Uses the drupal- prefix to avoid collisions with other installed skills. skill:install now deploys both skills in one pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new Claude Code agent skill /drupal-work-on-issue that implements an agentic workflow for contributing to Drupal.org issues via GitLab merge requests. The skill orchestrates the complete contribution process from fork verification through iterative code fixes and pipeline validation, acting as a "Contribution Pilot" that guides users through each step with pause points for authorization.
Changes:
- Added new skill file
skills/drupal-work-on-issue/SKILL.mddefining a multi-step workflow with pause points for user confirmation - Extended
skill:installcommand to deploy both the existingdrupalorg-cliskill and the newdrupal-work-on-issueskill
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Cli/Command/Skill/Install.php | Extends the install command to deploy the new drupal-work-on-issue skill alongside drupalorg-cli |
| skills/drupal-work-on-issue/SKILL.md | New agentic workflow skill implementing fork verification, remote setup, MR inspection, and iterative fix/push/pipeline loop |
Comments suppressed due to low confidence (1)
src/Cli/Command/Skill/Install.php:106
- The code for installing the drupal-work-on-issue skill duplicates the pattern used for installing the drupalorg-cli skill's SKILL.md file (lines 30-41). Consider extracting this into a helper method to reduce duplication and improve maintainability. For example, a method like
installSkillFile(string $skillName, string $sourceDir, string $destDir): boolwould make it easier to add additional skills in the future.
// Install the standalone /drupal-work-on-issue skill.
$woiSrcDir = __DIR__ . '/../../../../skills/drupal-work-on-issue';
$woiDestDir = $cwd . DIRECTORY_SEPARATOR . '.claude' . DIRECTORY_SEPARATOR . 'skills' . DIRECTORY_SEPARATOR . 'drupal-work-on-issue';
if (!is_dir($woiDestDir) && !mkdir($woiDestDir, 0755, true) && !is_dir($woiDestDir)) {
$this->stdErr->writeln(sprintf('<error>Failed to create directory: %s</error>', $woiDestDir));
return 1;
}
$woiSrc = $woiSrcDir . DIRECTORY_SEPARATOR . 'SKILL.md';
$woiDest = $woiDestDir . DIRECTORY_SEPARATOR . 'SKILL.md';
$woiContent = file_get_contents($woiSrc);
if ($woiContent === false) {
$this->stdErr->writeln(sprintf('<error>Could not read skill source: %s</error>', $woiSrc));
return 1;
}
if (file_put_contents($woiDest, $woiContent) === false) {
$this->stdErr->writeln(sprintf('<error>Failed to write skill file: %s</error>', $woiDest));
return 1;
}
$this->stdOut->writeln(sprintf('<comment>Skill installed to %s</comment>', $woiDest));
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Matches the pattern established in skills/drupalorg-cli/SKILL.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #274
Summary
skills/drupal-work-on-issue/SKILL.md— a new slash-command skill that Claude Code registers as/drupal-work-on-issue. It implements the "Contribution Pilot" workflow from the issue: fork verification → directory alignment → remote setup & checkout → inspect MR state → fix/push/pipeline loop.skill:installto deploy the new skill to.claude/skills/drupal-work-on-issue/SKILL.mdalongside the existingdrupalorg-cliskill.drupal-prefix to avoid collisions with any/work-on-issueskill the user may have from another tool.box.jsonchange needed —skills/is already included as a directory.Workflow overview
issue:show+issue:get-forkand pauses for user confirmation on working directory and branchissue:setup-remote+issue:checkoutmr:list,mr:files,mr:diff,mr:status(+mr:logson failure) and pauses with a summaryAll structured reads use
--format=llmas recommended by the reference guide.Test plan
drupalorg skill:installin a project and confirm.claude/skills/drupal-work-on-issue/SKILL.mdis created/drupal-work-on-issue 3456789and confirm the skill is picked up and the workflow beginscomposer box-buildand confirm the phar bundles the new skill file🤖 Generated with Claude Code