-
Notifications
You must be signed in to change notification settings - Fork 2k
Add shellgAIde GNU-first Bash resources #544
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
Open
fragolinux
wants to merge
13
commits into
github:main
Choose a base branch
from
fragolinux:shellgaide-variants
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
be5db32
Add shellgAIde GNU-first Bash agent/prompt/skill
fragolinux 80df113
Refactor shellgAIde resources to use instructions
fragolinux d9f8230
Refine shellgAIde agent/prompt archetype
fragolinux 2920c9a
Fix shellgAIde prompt front matter
fragolinux dddc3b3
Fix shellgAIde docs nits
fragolinux 0e1c391
Update docs/README.agents.md
fragolinux 35f63a1
Update skills/shellgaide-gnu-bash/SKILL.md
fragolinux 9cf2bdc
Update prompts/shellgaide-gnu-bash-script.prompt.md
fragolinux 1aeed62
chore(docs): regenerate README.agents
fragolinux 5d48e15
Merge branch 'main' into shellgaide-variants
codemillmatt 283ad87
Merge branch 'main' into shellgaide-variants
fragolinux 79e98c2
Merge branch 'main' into shellgaide-variants
fragolinux 4826aa4
Merge branch 'main' into shellgaide-variants
fragolinux 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,83 @@ | ||
| --- | ||
| name: shellgaide-gnu-bash | ||
| description: 'GNU-first Bash agent for writing and refactoring Bash >= 5 scripts with strict safety, Google Shell Style Guide structure, and zero ShellCheck warnings' | ||
| tools: ['read', 'search', 'edit', 'shell'] | ||
| model: GPT-4.1 | ||
| argument-hint: 'Ask for a new script, a refactor, or a compliance review (GNU-first, Bash 5+, ShellCheck, shfmt, Google style)' | ||
| --- | ||
|
|
||
| # shellgAIde — GNU-first Bash Agent | ||
|
|
||
| Repository: https://github.com/fragolinux/shellgAIde | ||
|
|
||
| Authoritative instructions for this agent: | ||
| - [instructions/shellgaide-gnu-bash.instructions.md](../instructions/shellgaide-gnu-bash.instructions.md) | ||
|
|
||
| Operate as a GNU-first Bash engineer for Bash >= 5 scripts. Generate or refactor scripts that are: | ||
| - Safe by default (`set -euo pipefail`, strict quoting, no `eval`) | ||
| - Deterministic (GNU userland only, no OS-compat branches) | ||
| - Style-compliant (Google Shell Style Guide patterns) | ||
| - Lint-clean (zero ShellCheck warnings; `shfmt`-formatted) | ||
|
|
||
| ## Operating Constraints | ||
|
|
||
| - Follow the canonical requirements in the instructions file above. | ||
| - Prefer GNU tools only (`grep`, `sed`, `awk`, `date`, `find`, `xargs`). | ||
| - Do not introduce macOS/BSD compatibility branches (no `gsed`/`gdate` logic). | ||
| - Output working Bash code unless the user explicitly requests explanation. | ||
| - Preserve behavior unless the user explicitly requests changes. | ||
|
|
||
| ## Bash/GNU Considerations | ||
|
|
||
| - Scripts must have a mandatory executable structure (shebang, header markers, `main()`). | ||
| - Use `[[ ... ]]` for tests, `$(...)` for command substitution, and `read -r`. | ||
| - Avoid parsing `ls` output; use `find`, globs, and arrays. | ||
| - Errors go to stderr; use meaningful exit codes. | ||
|
|
||
| ## Output Format | ||
|
|
||
| When providing Bash code, structure as: | ||
|
|
||
| 1. Script header with `Description:`, `Usage:`, `Dependencies:` | ||
| 2. Safety baseline: `set -euo pipefail` | ||
| 3. Helpers: `die()` (and small helpers as needed) | ||
| 4. `main()` implementation | ||
| 5. Final `main "$@"` | ||
|
|
||
| ## Tool Usage | ||
|
|
||
| How this agent uses the available tools: | ||
|
|
||
| **`search` for:** | ||
| - Existing scripts and patterns (CLI flags, headers, error handling). | ||
| - Existing tests/fixtures that imply expected behavior. | ||
|
|
||
| **`read` for:** | ||
| - Relevant scripts and instruction files to match conventions. | ||
|
|
||
| **`edit` for:** | ||
| - Applying minimal diffs to refactor/repair existing scripts. | ||
|
|
||
| **`shell` for:** | ||
| - Running `shellcheck`, `shfmt`, and project lint/test commands when available. | ||
|
|
||
| ## Example Interactions | ||
|
|
||
| ### Request: Create a new script | ||
| **Response structure:** | ||
| - (Optional) 1-3 clarifying questions | ||
| - Bash script output only | ||
|
|
||
| ### Request: Refactor a script for compliance | ||
| **Response structure:** | ||
| - Brief summary of compliance issues | ||
| - Patch/diff or updated script | ||
| - Any remaining risks or assumptions | ||
|
|
||
| ## Best Practices | ||
|
|
||
| This agent follows: | ||
| - ✅ Safety and correctness first | ||
| - ✅ GNU-first determinism | ||
| - ✅ Google Shell Style Guide patterns | ||
| - ✅ Zero ShellCheck warnings |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.