-
Notifications
You must be signed in to change notification settings - Fork 249
Add skill invocation via slash commands #1623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| --- | ||
| name: bump-go-dependencies | ||
| description: Update direct Go module dependencies one by one, validating each bump with tests and linter, committing individually, and producing a summary table for a PR description | ||
| --- | ||
|
|
||
| # Bump Direct Go Dependencies | ||
|
|
||
| When asked to update or bump Go dependencies, follow this procedure. | ||
|
|
||
| ## 1. List Outdated Direct Dependencies | ||
|
|
||
| Run the following to get a list of direct dependencies that have newer versions available: | ||
|
|
||
| ```sh | ||
| go list -m -u -json all 2>/dev/null | jq -r 'select(.Indirect != true and .Update != null) | "\(.Path) \(.Version) \(.Update.Path) \(.Update.Version)"' | ||
| ``` | ||
|
|
||
| This produces lines of the form: | ||
|
|
||
| ``` | ||
| module/path current_version update_path new_version | ||
| ``` | ||
|
|
||
| If the command produces no output, all direct dependencies are already up to date. Inform the user and stop. | ||
|
|
||
| ## 2. Update Each Dependency One by One | ||
|
|
||
| For **each** outdated dependency, perform the following steps in order: | ||
|
|
||
| ### a. Upgrade | ||
|
|
||
| ```sh | ||
| go get <module_path>@<new_version> | ||
| ``` | ||
|
|
||
| ### b. Tidy | ||
|
|
||
| ```sh | ||
| go mod tidy | ||
| ``` | ||
|
|
||
| ### c. Validate | ||
|
|
||
| Run the linter and the tests: | ||
|
|
||
| ```sh | ||
| task lint | ||
| task test | ||
| ``` | ||
|
|
||
| ### d. Decide | ||
|
|
||
| - **If both pass**: stage and commit the changes: | ||
| ```sh | ||
| git add -A | ||
| git commit -m "bump <module_path> from <old_version> to <new_version>" -m "" -m "Assisted-By: cagent" | ||
| ``` | ||
| Record the dependency as **bumped** in your tracking table. | ||
|
|
||
| - **If either fails**: revert all changes and move on: | ||
| ```sh | ||
| git checkout -- . | ||
|
Comment on lines
+56
to
+62
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm generally strongly against agents committing for me or generally manipulating git too much, but lets see if others feel the same. If users don't use a good enough model, disasters are bound to happen 😅 |
||
| ``` | ||
| Record the dependency as **skipped** in your tracking table, noting the reason (lint failure, test failure, or both). | ||
|
|
||
| ## 3. Produce a Summary Table | ||
|
|
||
| After processing every dependency, output a **copy-pastable** Markdown table inside a fenced code block. | ||
| The table must list every dependency that was considered, with columns for the module path, old version, new version, and status. | ||
| Don't use emojis, just plain markdown. | ||
|
|
||
| Example: | ||
|
|
||
| ~~~ | ||
| ```markdown | ||
| | Module | From | To | Status | | ||
| |--------|------|----|--------| | ||
| | github.com/example/foo | v1.2.0 | v1.3.0 | bumped | | ||
| | github.com/example/bar | v0.4.1 | v0.5.0 | skipped — test failure | | ||
| | golang.org/x/text | v0.21.0 | v0.22.0 | bumped | | ||
| ``` | ||
| ~~~ | ||
|
|
||
| This table is meant to be pasted directly into a pull-request description. | ||
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is not reusable anywhere outside of this repo, should this even be a skill or rather something our agent just knows how to do? 🤔
we could probably compact the prompt quite a bit, include it in the system prompt and get the same results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we could but I want to play a bit more with it.
Also, by activating this as a skill, I realised the things we were missing (/command support and schema)