@hybridlabor-api/aos 4.8.0 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/.agents/{agents.md → AGENTS.md} +3 -1
  2. package/.agents/nodes.json +3 -1
  3. package/.agents/vendor-manifest.json +23 -1
  4. package/.claude/agents/godmode-media-eventtech.md +1 -1
  5. package/.claude/hooks/conventional-commits.mjs +125 -0
  6. package/.claude/hooks/env-file-protection.mjs +105 -0
  7. package/.claude/hooks/go-gate.mjs +101 -81
  8. package/.claude/hooks/memb-inject.mjs +29 -1
  9. package/.claude/settings.json +13 -0
  10. package/.claude/workflows/startcycle-dispatch.mjs +23 -1
  11. package/.opencode/agents/godmode-media-eventtech.md +1 -1
  12. package/.opencode/plugins/bdb-aos.js +31 -4
  13. package/CLAUDE.md +0 -571
  14. package/README.de.md +1 -1
  15. package/README.md +1 -1
  16. package/README.pt.md +1 -1
  17. package/THIRD_PARTY_NOTICES.md +126 -0
  18. package/bin/aos-doctor.mjs +1 -1
  19. package/docs/skills_table.md +1 -1
  20. package/installer.js +187 -55
  21. package/package.json +7 -3
  22. package/packages/aos-cli/README.md +80 -0
  23. package/packages/aos-cli/bin/aos-cli.mjs +134 -0
  24. package/packages/aos-cli/core-skills.json +12 -0
  25. package/packages/aos-cli/extensions/aos.ts +321 -0
  26. package/packages/aos-cli/package-lock.json +1923 -0
  27. package/packages/aos-cli/package.json +29 -0
  28. package/packages/aos-cli/scripts/check-theme.mjs +63 -0
  29. package/packages/aos-cli/themes/aos.json +97 -0
  30. package/scripts/build-plugin-manifest.mjs +131 -0
  31. package/scripts/validate-skills.mjs +81 -6
  32. package/skills/basic/ao-orchestrator/SKILL.md +116 -0
  33. package/skills/basic/bdb-eventagency-skill/SKILL.md +252 -0
  34. package/skills/basic/bdb-shipping-skill/SKILL.md +161 -0
  35. package/skills/basic/godmode-eventtech/SKILL.md +4 -1
  36. package/skills/global_config/agenttrail/SKILL.md +6 -1
  37. package/skills/global_config/aos-project-init/SKILL.md +2 -0
  38. package/skills/global_config/aos-project-init/assets/AGENTS.template.md +1 -1
  39. package/skills/global_config/aos-project-init/scripts/aos-project-doctor.mjs +1 -1
  40. package/skills/global_config/aos-setup/SKILL.md +1 -1
  41. package/skills/global_config/aos-setup/scripts/aos-doctor.mjs +1 -1
  42. package/skills/global_config/ask-tim/SKILL.md +7 -7
  43. package/skills/global_config/bash-script-generator/SKILL.md +201 -0
  44. package/skills/global_config/bash-script-generator/assets/templates/standard-template.sh +96 -0
  45. package/skills/global_config/bash-script-generator/docs/bash-scripting-guide.md +729 -0
  46. package/skills/global_config/bash-script-generator/docs/generation-best-practices.md +193 -0
  47. package/skills/global_config/bash-script-generator/docs/script-patterns.md +566 -0
  48. package/skills/global_config/bash-script-generator/docs/text-processing-guide.md +437 -0
  49. package/skills/global_config/bash-script-generator/examples/log-analyzer.sh +92 -0
  50. package/skills/global_config/bash-script-generator/scripts/generate_script_template.sh +123 -0
  51. package/skills/global_config/bash-script-generator/scripts/run_ci_checks.sh +172 -0
  52. package/skills/global_config/bash-script-generator/scripts/test_generator.sh +413 -0
  53. package/skills/global_config/bash-script-validator/SKILL.md +249 -0
  54. package/skills/global_config/bash-script-validator/docs/awk-reference.md +449 -0
  55. package/skills/global_config/bash-script-validator/docs/bash-reference.md +468 -0
  56. package/skills/global_config/bash-script-validator/docs/common-mistakes.md +623 -0
  57. package/skills/global_config/bash-script-validator/docs/grep-reference.md +395 -0
  58. package/skills/global_config/bash-script-validator/docs/regex-reference.md +391 -0
  59. package/skills/global_config/bash-script-validator/docs/sed-reference.md +454 -0
  60. package/skills/global_config/bash-script-validator/docs/shell-reference.md +463 -0
  61. package/skills/global_config/bash-script-validator/docs/shellcheck-reference.md +399 -0
  62. package/skills/global_config/bash-script-validator/examples/bad-bash.sh +55 -0
  63. package/skills/global_config/bash-script-validator/examples/bad-shell.sh +54 -0
  64. package/skills/global_config/bash-script-validator/examples/good-bash.sh +71 -0
  65. package/skills/global_config/bash-script-validator/examples/good-shell.sh +69 -0
  66. package/skills/global_config/bash-script-validator/scripts/run_ci_checks.sh +23 -0
  67. package/skills/global_config/bash-script-validator/scripts/shellcheck_wrapper.sh +174 -0
  68. package/skills/global_config/bash-script-validator/scripts/test_validate.sh +446 -0
  69. package/skills/global_config/bash-script-validator/scripts/validate.sh +512 -0
  70. package/skills/global_config/ci-pipeline/SKILL.md +135 -0
  71. package/skills/global_config/deja-memory/SKILL.md +3 -1
  72. package/skills/global_config/dispatching-parallel-agents/SKILL.md +170 -0
  73. package/skills/global_config/dockerfile-generator/SKILL.md +1038 -0
  74. package/skills/global_config/dockerfile-generator/examples/example.dockerignore +95 -0
  75. package/skills/global_config/dockerfile-generator/examples/golang-distroless.Dockerfile +34 -0
  76. package/skills/global_config/dockerfile-generator/examples/java-springboot.Dockerfile +45 -0
  77. package/skills/global_config/dockerfile-generator/examples/nextjs-production.Dockerfile +49 -0
  78. package/skills/global_config/dockerfile-generator/examples/nodejs-multistage.Dockerfile +55 -0
  79. package/skills/global_config/dockerfile-generator/examples/python-fastapi.Dockerfile +48 -0
  80. package/skills/global_config/dockerfile-generator/references/language_specific_guides.md +510 -0
  81. package/skills/global_config/dockerfile-generator/references/multistage_builds.md +570 -0
  82. package/skills/global_config/dockerfile-generator/references/optimization_patterns.md +492 -0
  83. package/skills/global_config/dockerfile-generator/references/security_best_practices.md +375 -0
  84. package/skills/global_config/dockerfile-generator/scripts/generate_dockerignore.sh +199 -0
  85. package/skills/global_config/dockerfile-generator/scripts/generate_golang.sh +172 -0
  86. package/skills/global_config/dockerfile-generator/scripts/generate_java.sh +185 -0
  87. package/skills/global_config/dockerfile-generator/scripts/generate_nodejs.sh +279 -0
  88. package/skills/global_config/dockerfile-generator/scripts/generate_python.sh +218 -0
  89. package/skills/global_config/dockerfile-generator/scripts/test_generator.sh +210 -0
  90. package/skills/global_config/dockerfile-validator/SKILL.md +300 -0
  91. package/skills/global_config/dockerfile-validator/examples/.dockerignore.example +34 -0
  92. package/skills/global_config/dockerfile-validator/examples/bad-example.Dockerfile +37 -0
  93. package/skills/global_config/dockerfile-validator/examples/golang-distroless.Dockerfile +50 -0
  94. package/skills/global_config/dockerfile-validator/examples/good-example.Dockerfile +52 -0
  95. package/skills/global_config/dockerfile-validator/examples/python-optimized.Dockerfile +53 -0
  96. package/skills/global_config/dockerfile-validator/examples/security-issues.Dockerfile +42 -0
  97. package/skills/global_config/dockerfile-validator/references/docker_best_practices.md +348 -0
  98. package/skills/global_config/dockerfile-validator/references/optimization_guide.md +473 -0
  99. package/skills/global_config/dockerfile-validator/references/security_checklist.md +208 -0
  100. package/skills/global_config/dockerfile-validator/scripts/dockerfile-validate.sh +699 -0
  101. package/skills/global_config/dockerfile-validator/scripts/test_validate.sh +35 -0
  102. package/skills/global_config/dockerfile-validator/tests/fixtures/copy-before-yarn-lock-read.Dockerfile +6 -0
  103. package/skills/global_config/dockerfile-validator/tests/fixtures/copy-before-yarn.Dockerfile +6 -0
  104. package/skills/global_config/dockerfile-validator/tests/fixtures/from-platform-nonroot.Dockerfile +7 -0
  105. package/skills/global_config/dockerfile-validator/tests/test_regression.sh +164 -0
  106. package/skills/global_config/finishing-a-development-branch/SKILL.md +228 -0
  107. package/skills/global_config/github-actions-generator/SKILL.md +353 -0
  108. package/skills/global_config/github-actions-generator/assets/templates/action/composite/action.yml +82 -0
  109. package/skills/global_config/github-actions-generator/assets/templates/action/docker/Dockerfile +25 -0
  110. package/skills/global_config/github-actions-generator/assets/templates/action/docker/action.yml +42 -0
  111. package/skills/global_config/github-actions-generator/assets/templates/action/docker/entrypoint.sh +27 -0
  112. package/skills/global_config/github-actions-generator/assets/templates/action/javascript/action.yml +33 -0
  113. package/skills/global_config/github-actions-generator/assets/templates/action/javascript/index.js +50 -0
  114. package/skills/global_config/github-actions-generator/assets/templates/action/javascript/package.json +27 -0
  115. package/skills/global_config/github-actions-generator/assets/templates/workflow/basic_workflow.yml +242 -0
  116. package/skills/global_config/github-actions-generator/assets/templates/workflow/reusable_workflow.yml +106 -0
  117. package/skills/global_config/github-actions-generator/examples/README.md +147 -0
  118. package/skills/global_config/github-actions-generator/examples/actions/setup-node-cached/action.yml +93 -0
  119. package/skills/global_config/github-actions-generator/examples/caching/docker-buildkit.yml +256 -0
  120. package/skills/global_config/github-actions-generator/examples/security/dependency-review.yml +62 -0
  121. package/skills/global_config/github-actions-generator/examples/security/sbom-attestation.yml +119 -0
  122. package/skills/global_config/github-actions-generator/examples/triggers/chatops-commands.yml +475 -0
  123. package/skills/global_config/github-actions-generator/examples/triggers/repository-dispatch.yml +418 -0
  124. package/skills/global_config/github-actions-generator/examples/triggers/workflow-orchestration.yml +404 -0
  125. package/skills/global_config/github-actions-generator/examples/workflows/docker-build-push.yml +68 -0
  126. package/skills/global_config/github-actions-generator/examples/workflows/go-ci.yml +161 -0
  127. package/skills/global_config/github-actions-generator/examples/workflows/monorepo-ci.yml +340 -0
  128. package/skills/global_config/github-actions-generator/examples/workflows/multi-environment-deploy.yml +406 -0
  129. package/skills/global_config/github-actions-generator/examples/workflows/nodejs-ci.yml +122 -0
  130. package/skills/global_config/github-actions-generator/examples/workflows/python-ci.yml +157 -0
  131. package/skills/global_config/github-actions-generator/examples/workflows/scheduled-tasks.yml +376 -0
  132. package/skills/global_config/github-actions-generator/references/advanced-triggers.md +917 -0
  133. package/skills/global_config/github-actions-generator/references/best-practices.md +755 -0
  134. package/skills/global_config/github-actions-generator/references/common-actions.md +715 -0
  135. package/skills/global_config/github-actions-generator/references/custom-actions.md +320 -0
  136. package/skills/global_config/github-actions-generator/references/expressions-and-contexts.md +688 -0
  137. package/skills/global_config/github-actions-generator/references/modern-features.md +421 -0
  138. package/skills/global_config/github-actions-generator/scripts/test_generator.sh +344 -0
  139. package/skills/global_config/github-actions-templates/SKILL.md +7 -0
  140. package/skills/global_config/github-actions-validator/SKILL.md +576 -0
  141. package/skills/global_config/github-actions-validator/examples/README.md +88 -0
  142. package/skills/global_config/github-actions-validator/examples/outdated-versions.yml +76 -0
  143. package/skills/global_config/github-actions-validator/examples/valid-ci.yml +79 -0
  144. package/skills/global_config/github-actions-validator/examples/with-errors.yml +47 -0
  145. package/skills/global_config/github-actions-validator/references/act_usage.md +233 -0
  146. package/skills/global_config/github-actions-validator/references/action_versions.md +122 -0
  147. package/skills/global_config/github-actions-validator/references/actionlint_usage.md +343 -0
  148. package/skills/global_config/github-actions-validator/references/common_errors.md +512 -0
  149. package/skills/global_config/github-actions-validator/references/modern_features.md +384 -0
  150. package/skills/global_config/github-actions-validator/references/runners.md +317 -0
  151. package/skills/global_config/github-actions-validator/scripts/install_tools.sh +113 -0
  152. package/skills/global_config/github-actions-validator/scripts/validate_workflow.sh +910 -0
  153. package/skills/global_config/github-actions-validator/tests/test_validate_workflow.sh +237 -0
  154. package/skills/global_config/makefile-generator/SKILL.md +614 -0
  155. package/skills/global_config/makefile-generator/assets/templates/.gitkeep +1 -0
  156. package/skills/global_config/makefile-generator/docs/makefile-structure.md +530 -0
  157. package/skills/global_config/makefile-generator/docs/optimization-guide.md +784 -0
  158. package/skills/global_config/makefile-generator/docs/patterns-guide.md +642 -0
  159. package/skills/global_config/makefile-generator/docs/security-guide.md +361 -0
  160. package/skills/global_config/makefile-generator/docs/targets-guide.md +642 -0
  161. package/skills/global_config/makefile-generator/docs/variables-guide.md +596 -0
  162. package/skills/global_config/makefile-generator/scripts/add_standard_targets.sh +539 -0
  163. package/skills/global_config/makefile-generator/scripts/generate_makefile_template.sh +690 -0
  164. package/skills/global_config/makefile-generator/test/test_helper_scripts.sh +190 -0
  165. package/skills/global_config/makefile-validator/SKILL.md +244 -0
  166. package/skills/global_config/makefile-validator/docs/bake-tool.md +1000 -0
  167. package/skills/global_config/makefile-validator/docs/best-practices.md +858 -0
  168. package/skills/global_config/makefile-validator/docs/common-mistakes.md +944 -0
  169. package/skills/global_config/makefile-validator/examples/bad-makefile.mk +77 -0
  170. package/skills/global_config/makefile-validator/examples/good-makefile.mk +103 -0
  171. package/skills/global_config/makefile-validator/scripts/test_validate.sh +382 -0
  172. package/skills/global_config/makefile-validator/scripts/validate_makefile.sh +712 -0
  173. package/skills/global_config/{MCP_Manage → mcp-manage}/SKILL.md +3 -3
  174. package/skills/global_config/plan-canvas/SKILL.md +9 -2
  175. package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/ui.js +10 -2
  176. package/skills/global_config/plan-canvas/scripts/plan-canvas.js +1 -1
  177. package/skills/global_config/read-the-damn-docs/SKILL.md +175 -0
  178. package/skills/global_config/requesting-code-review/SKILL.md +98 -0
  179. package/skills/global_config/requesting-code-review/code-reviewer.md +198 -0
  180. package/skills/global_config/using-git-worktrees/SKILL.md +170 -0
  181. package/skills/global_config/verification-before-completion/SKILL.md +123 -0
  182. package/skills/global_config/writing-plans/SKILL.md +126 -46
  183. package/skills/global_config/writing-plans-legacy/SKILL.md +152 -0
  184. package/.claude/CLAUDE.md +0 -12
  185. package/mcps/RhinoMCP/docs/content/docs/getting-started/gemini.md +0 -61
  186. /package/{GEMINI.md → RULES.md} +0 -0
@@ -0,0 +1,242 @@
1
+ # [WORKFLOW_NAME]
2
+ #
3
+ # [WORKFLOW_DESCRIPTION]
4
+ #
5
+ # Triggers:
6
+ # - [TRIGGER_EVENTS]
7
+ #
8
+ # Required secrets:
9
+ # - [SECRET_NAME]: [SECRET_DESCRIPTION]
10
+ #
11
+ # Required permissions:
12
+ # - [PERMISSION_SCOPE]: [read/write]
13
+
14
+ name: [WORKFLOW_NAME]
15
+
16
+ on:
17
+ # Trigger on push to specific branches
18
+ push:
19
+ branches: [main, develop]
20
+ paths:
21
+ - '[PATH_PATTERN]/**'
22
+ - '!**.md'
23
+
24
+ # Trigger on pull requests
25
+ pull_request:
26
+ branches: [main]
27
+ types: [opened, synchronize, reopened]
28
+
29
+ # Manual trigger
30
+ workflow_dispatch:
31
+ inputs:
32
+ environment:
33
+ description: 'Environment to deploy'
34
+ required: true
35
+ type: choice
36
+ options:
37
+ - dev
38
+ - staging
39
+ - production
40
+ default: 'dev'
41
+ debug:
42
+ description: 'Enable debug mode'
43
+ required: false
44
+ type: boolean
45
+ default: false
46
+
47
+ # Scheduled trigger (daily at 2 AM UTC)
48
+ schedule:
49
+ - cron: '0 2 * * *'
50
+
51
+ # Set default permissions to read-only (security best practice)
52
+ permissions:
53
+ contents: read
54
+
55
+ # Prevent duplicate runs
56
+ concurrency:
57
+ group: ${{ github.workflow }}-${{ github.ref }}
58
+ cancel-in-progress: true
59
+
60
+ # Environment variables available to all jobs
61
+ env:
62
+ [ENV_VAR_NAME]: '[ENV_VAR_VALUE]'
63
+
64
+ jobs:
65
+ # Job 1: Linting and validation
66
+ lint:
67
+ name: Lint and Validate
68
+ runs-on: ubuntu-latest
69
+ timeout-minutes: 10
70
+
71
+ permissions:
72
+ contents: read
73
+
74
+ steps:
75
+ - name: Checkout code
76
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
77
+ with:
78
+ fetch-depth: 1
79
+
80
+ - name: [SETUP_STEP_NAME]
81
+ uses: [SETUP_ACTION]
82
+ with:
83
+ [SETUP_INPUT]: [SETUP_VALUE]
84
+ cache: '[CACHE_TYPE]'
85
+
86
+ - name: Install dependencies
87
+ run: [INSTALL_COMMAND]
88
+
89
+ - name: Run linter
90
+ run: [LINT_COMMAND]
91
+
92
+ # Job 2: Testing
93
+ test:
94
+ name: Test on [PLATFORM] [VERSION]
95
+ runs-on: ${{ matrix.os }}
96
+ timeout-minutes: 30
97
+
98
+ permissions:
99
+ contents: read
100
+ checks: write # For test reporting
101
+
102
+ strategy:
103
+ matrix:
104
+ os: [ubuntu-latest, windows-latest, macos-latest]
105
+ [VERSION_KEY]: [[VERSION_1], [VERSION_2], [VERSION_3]]
106
+ exclude:
107
+ # Exclude expensive combinations if needed
108
+ - os: macos-latest
109
+ [VERSION_KEY]: [VERSION_1]
110
+ fail-fast: false
111
+
112
+ steps:
113
+ - name: Checkout code
114
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
115
+
116
+ - name: "[SETUP_STEP_NAME] ${{ matrix.[VERSION_KEY] }}"
117
+ uses: [SETUP_ACTION]
118
+ with:
119
+ [VERSION_INPUT]: ${{ matrix.[VERSION_KEY] }}
120
+ cache: '[CACHE_TYPE]'
121
+
122
+ - name: Install dependencies
123
+ run: [INSTALL_COMMAND]
124
+
125
+ - name: Run tests
126
+ run: [TEST_COMMAND]
127
+
128
+ - name: Upload test results
129
+ if: always()
130
+ uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
131
+ with:
132
+ name: test-results-${{ matrix.os }}-${{ matrix.[VERSION_KEY] }}
133
+ path: [TEST_RESULTS_PATH]
134
+ retention-days: 7
135
+
136
+ - name: Upload coverage
137
+ if: matrix.os == 'ubuntu-latest' && matrix.[VERSION_KEY] == [MAIN_VERSION]
138
+ uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1
139
+ with:
140
+ token: ${{ secrets.CODECOV_TOKEN }}
141
+ files: [COVERAGE_FILE_PATH]
142
+ fail_ci_if_error: true
143
+
144
+ # Job 3: Build
145
+ build:
146
+ name: Build Application
147
+ needs: [lint, test]
148
+ runs-on: ubuntu-latest
149
+ timeout-minutes: 20
150
+
151
+ permissions:
152
+ contents: read
153
+
154
+ outputs:
155
+ build-id: ${{ steps.build.outputs.id }}
156
+
157
+ steps:
158
+ - name: Checkout code
159
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
160
+
161
+ - name: [SETUP_STEP_NAME]
162
+ uses: [SETUP_ACTION]
163
+ with:
164
+ [SETUP_INPUT]: [SETUP_VALUE]
165
+ cache: '[CACHE_TYPE]'
166
+
167
+ - name: Install dependencies
168
+ run: [INSTALL_COMMAND]
169
+
170
+ - name: Build application
171
+ id: build
172
+ run: |
173
+ [BUILD_COMMAND]
174
+ echo "id=build-${{ github.sha }}" >> $GITHUB_OUTPUT
175
+
176
+ - name: Upload build artifacts
177
+ uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
178
+ with:
179
+ name: build-${{ github.sha }}
180
+ path: [BUILD_OUTPUT_PATH]
181
+ retention-days: 7
182
+ if-no-files-found: error
183
+
184
+ # Job 4: Deploy (conditional)
185
+ deploy:
186
+ name: Deploy to [ENVIRONMENT]
187
+ needs: build
188
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
189
+ runs-on: ubuntu-latest
190
+ timeout-minutes: 15
191
+
192
+ # Use environment for deployment protection rules
193
+ environment:
194
+ name: [ENVIRONMENT_NAME]
195
+ url: [ENVIRONMENT_URL]
196
+
197
+ permissions:
198
+ contents: read
199
+ deployments: write
200
+
201
+ steps:
202
+ - name: Checkout code
203
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
204
+
205
+ - name: Download build artifacts
206
+ uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
207
+ with:
208
+ name: build-${{ github.sha }}
209
+ path: [BUILD_OUTPUT_PATH]
210
+
211
+ - name: Deploy to [ENVIRONMENT]
212
+ env:
213
+ [DEPLOY_SECRET]: ${{ secrets.[DEPLOY_SECRET] }}
214
+ run: |
215
+ [DEPLOY_COMMAND]
216
+
217
+ - name: Verify deployment
218
+ run: |
219
+ [VERIFICATION_COMMAND]
220
+
221
+ - name: Notify on failure
222
+ if: failure()
223
+ run: |
224
+ echo "Deployment failed!"
225
+ # Add notification logic here
226
+
227
+ # Job 5: Cleanup (always runs)
228
+ cleanup:
229
+ name: Cleanup
230
+ needs: [deploy]
231
+ if: always()
232
+ runs-on: ubuntu-latest
233
+ timeout-minutes: 5
234
+
235
+ permissions:
236
+ contents: read
237
+
238
+ steps:
239
+ - name: Cleanup temporary resources
240
+ run: |
241
+ echo "Performing cleanup..."
242
+ # Add cleanup logic here
@@ -0,0 +1,106 @@
1
+ # [REUSABLE_WORKFLOW_NAME]
2
+ #
3
+ # [WORKFLOW_DESCRIPTION]
4
+ #
5
+ # Inputs:
6
+ # - [INPUT_NAME]: [INPUT_DESCRIPTION]
7
+ #
8
+ # Secrets:
9
+ # - [SECRET_NAME]: [SECRET_DESCRIPTION]
10
+ #
11
+ # Outputs:
12
+ # - [OUTPUT_NAME]: [OUTPUT_DESCRIPTION]
13
+ #
14
+ # Usage:
15
+ # jobs:
16
+ # call-workflow:
17
+ # uses: [OWNER]/[REPO]/.github/workflows/[FILENAME]@[REF]
18
+ # with:
19
+ # [INPUT_NAME]: [INPUT_VALUE]
20
+ # secrets:
21
+ # [SECRET_NAME]: ${{ secrets.[SECRET_NAME] }}
22
+
23
+ name: [REUSABLE_WORKFLOW_NAME]
24
+
25
+ on:
26
+ workflow_call:
27
+ inputs:
28
+ [INPUT_NAME]:
29
+ description: '[INPUT_DESCRIPTION]'
30
+ required: [true/false]
31
+ type: [string/boolean/number/choice/environment]
32
+ default: '[DEFAULT_VALUE]' # Optional, only for optional inputs
33
+
34
+ # Add more inputs as needed
35
+ # Example types:
36
+ # - string: text values
37
+ # - boolean: true/false
38
+ # - number: numeric values
39
+ # - choice: predefined options (requires 'options' field)
40
+ # - environment: GitHub environment name
41
+
42
+ secrets:
43
+ [SECRET_NAME]:
44
+ description: '[SECRET_DESCRIPTION]'
45
+ required: [true/false]
46
+
47
+ # Add more secrets as needed
48
+ # Alternatively, use 'secrets: inherit' to pass all secrets
49
+ # (use sparingly for security)
50
+
51
+ outputs:
52
+ [OUTPUT_NAME]:
53
+ description: '[OUTPUT_DESCRIPTION]'
54
+ value: ${{ jobs.[JOB_ID].outputs.[OUTPUT_KEY] }}
55
+
56
+ # Add more outputs as needed
57
+ # Outputs must be mapped from job outputs
58
+
59
+ # Set default permissions (security best practice)
60
+ permissions:
61
+ contents: read
62
+
63
+ # Environment variables available to all jobs
64
+ env:
65
+ [ENV_VAR_NAME]: '[ENV_VAR_VALUE]'
66
+
67
+ jobs:
68
+ [JOB_ID]:
69
+ name: [JOB_NAME]
70
+ runs-on: [ubuntu-latest/windows-latest/macos-latest]
71
+ timeout-minutes: [TIMEOUT_MINUTES]
72
+
73
+ # Job-specific permissions
74
+ permissions:
75
+ contents: read
76
+ [PERMISSION_SCOPE]: [read/write]
77
+
78
+ # Define outputs for this job
79
+ outputs:
80
+ [OUTPUT_KEY]: ${{ steps.[STEP_ID].outputs.[OUTPUT_NAME] }}
81
+
82
+ steps:
83
+ - name: Checkout code
84
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
85
+ with:
86
+ fetch-depth: 1
87
+
88
+ - name: [STEP_NAME]
89
+ id: [STEP_ID]
90
+ run: |
91
+ # Use inputs: ${{ inputs.[INPUT_NAME] }}
92
+ # Use secrets: ${{ secrets.[SECRET_NAME] }}
93
+ echo "[OUTPUT_NAME]=[OUTPUT_VALUE]" >> $GITHUB_OUTPUT
94
+
95
+ # Add more steps as needed
96
+
97
+ # Add more jobs as needed
98
+ [ANOTHER_JOB_ID]:
99
+ name: [ANOTHER_JOB_NAME]
100
+ needs: [JOB_ID] # Optional: depend on previous job
101
+ runs-on: ubuntu-latest
102
+
103
+ steps:
104
+ - name: Use previous job output
105
+ run: |
106
+ echo "Output from previous job: ${{ needs.[JOB_ID].outputs.[OUTPUT_KEY] }}"
@@ -0,0 +1,147 @@
1
+ # GitHub Actions Generator Examples
2
+
3
+ This directory contains example workflows and actions generated using the github-actions-generator skill.
4
+
5
+ ## Workflows
6
+
7
+ ### Language-Specific CI Pipelines
8
+
9
+ #### nodejs-ci.yml
10
+ Complete CI pipeline for Node.js applications demonstrating:
11
+ - Matrix testing across multiple Node.js versions and operating systems
12
+ - Dependency caching with `actions/setup-node`
13
+ - Parallel linting and testing
14
+ - Artifact uploading for test results
15
+ - Code coverage reporting with Codecov
16
+ - Concurrency controls
17
+
18
+ **Use case:** Standard CI/CD for Node.js projects
19
+
20
+ #### python-ci.yml
21
+ Python CI pipeline demonstrating:
22
+ - Matrix testing across Python versions
23
+ - Virtual environment management
24
+ - Dependency caching with pip
25
+ - Testing with pytest
26
+ - Code quality checks
27
+
28
+ **Use case:** Python application CI/CD
29
+
30
+ #### go-ci.yml
31
+ Go CI pipeline demonstrating:
32
+ - Go module caching
33
+ - Cross-platform builds
34
+ - Go testing and benchmarking
35
+ - Static code analysis
36
+
37
+ **Use case:** Go application CI/CD
38
+
39
+ ### Container & Deployment Workflows
40
+
41
+ #### docker-build-push.yml
42
+ Docker image build and push workflow demonstrating:
43
+ - Multi-platform builds (amd64, arm64)
44
+ - GitHub Container Registry integration
45
+ - Docker layer caching with GitHub Actions cache
46
+ - Automatic tagging based on git events
47
+ - Secure authentication with `GITHUB_TOKEN`
48
+
49
+ **Use case:** Containerized application deployment
50
+
51
+ #### multi-environment-deploy.yml
52
+ Multi-environment deployment workflow demonstrating:
53
+ - Environment protection rules and approval gates
54
+ - Dynamic environment selection (dev, staging, production)
55
+ - AWS deployment with OIDC authentication
56
+ - Blue-green deployment strategy
57
+ - Automatic rollback on failure
58
+ - Smoke tests and health checks
59
+ - Deployment verification
60
+
61
+ **Use case:** Production-grade multi-stage deployments
62
+
63
+ ### Advanced Workflow Patterns
64
+
65
+ #### monorepo-ci.yml
66
+ Monorepo CI pipeline demonstrating:
67
+ - Path-based change detection
68
+ - Conditional job execution based on affected packages
69
+ - Cross-package dependency management
70
+ - Parallel builds for independent packages
71
+ - Artifact sharing between jobs
72
+ - Package-specific test strategies
73
+
74
+ **Use case:** Monorepo projects with multiple packages
75
+
76
+ #### scheduled-tasks.yml
77
+ Scheduled maintenance workflow demonstrating:
78
+ - Cron schedule configuration
79
+ - Dependency security audits
80
+ - Stale branch cleanup
81
+ - Cache management
82
+ - External service health checks
83
+ - Automated issue creation
84
+ - Weekly metrics reporting
85
+
86
+ **Use case:** Repository maintenance and monitoring
87
+
88
+ ### Security Workflows
89
+
90
+ #### security/dependency-review.yml
91
+ Dependency review workflow demonstrating:
92
+ - Pull request dependency scanning
93
+ - Vulnerability severity thresholds
94
+ - License policy enforcement
95
+ - Automatic build failure on policy violations
96
+
97
+ **Use case:** Supply chain security for PRs
98
+
99
+ #### security/sbom-attestation.yml
100
+ SBOM and attestation workflow demonstrating:
101
+ - Software Bill of Materials generation
102
+ - SBOM attestation with GitHub's signing infrastructure
103
+ - Build provenance attestation
104
+ - Container vulnerability scanning with Trivy
105
+ - Multi-platform container builds
106
+ - Security scan results upload to GitHub Security tab
107
+
108
+ **Use case:** Supply chain security compliance
109
+
110
+ ## Actions
111
+
112
+ ### setup-node-cached/action.yml
113
+ Composite action for Node.js setup demonstrating:
114
+ - Smart dependency caching for npm, yarn, and pnpm
115
+ - Input validation
116
+ - Multiple package manager support
117
+ - Cache hit detection
118
+ - Grouped output for better logging
119
+
120
+ **Use case:** Reusable Node.js setup across multiple workflows
121
+
122
+ ## Usage
123
+
124
+ These examples can be used as:
125
+ 1. **Templates** - Copy and modify for your own projects
126
+ 2. **Learning Resources** - Study best practices and patterns
127
+ 3. **Testing** - Validate with github-actions-validator skill
128
+
129
+ ## Testing Examples
130
+
131
+ To validate any of these examples:
132
+
133
+ ```bash
134
+ cd devops-skills-plugin/skills/github-actions-validator
135
+ bash scripts/validate_workflow.sh ../../github-actions-generator/examples/workflows/nodejs-ci.yml
136
+ ```
137
+
138
+ ## Best Practices Demonstrated
139
+
140
+ All examples follow these best practices:
141
+ - ✅ Actions pinned to SHAs with version comments
142
+ - ✅ Minimal permissions with explicit `permissions:` blocks
143
+ - ✅ Concurrency controls to prevent duplicate runs
144
+ - ✅ Proper timeout settings
145
+ - ✅ Semantic naming conventions
146
+ - ✅ Comprehensive error handling
147
+ - ✅ Security-first approach
@@ -0,0 +1,93 @@
1
+ name: 'Setup Node.js with Smart Caching'
2
+ description: 'Setup Node.js with intelligent dependency caching and installation'
3
+ author: 'Example Author'
4
+
5
+ inputs:
6
+ node-version:
7
+ description: 'Node.js version to use'
8
+ required: true
9
+ package-manager:
10
+ description: 'Package manager to use (npm, yarn, pnpm)'
11
+ required: false
12
+ default: 'npm'
13
+ cache-dependency-path:
14
+ description: 'Path to lock file(s)'
15
+ required: false
16
+ default: '**/package-lock.json'
17
+
18
+ outputs:
19
+ cache-hit:
20
+ description: 'Whether cache was hit'
21
+ value: ${{ steps.cache.outputs.cache-hit }}
22
+ node-version:
23
+ description: 'Actual Node.js version installed'
24
+ value: ${{ steps.setup.outputs.node-version }}
25
+
26
+ branding:
27
+ icon: 'package'
28
+ color: 'green'
29
+
30
+ runs:
31
+ using: 'composite'
32
+ steps:
33
+ - name: Validate inputs
34
+ shell: bash
35
+ run: |
36
+ if [[ ! "${{ inputs.package-manager }}" =~ ^(npm|yarn|pnpm)$ ]]; then
37
+ echo "::error::Invalid package manager: ${{ inputs.package-manager }}"
38
+ exit 1
39
+ fi
40
+ echo "✅ Inputs validated"
41
+
42
+ - name: Setup Node.js ${{ inputs.node-version }}
43
+ id: setup
44
+ uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
45
+ with:
46
+ node-version: ${{ inputs.node-version }}
47
+
48
+ - name: Enable Corepack for pnpm/yarn
49
+ if: inputs.package-manager != 'npm'
50
+ shell: bash
51
+ run: corepack enable
52
+
53
+ - name: Get cache directory
54
+ id: cache-dir
55
+ shell: bash
56
+ run: |
57
+ if [ "${{ inputs.package-manager }}" == "npm" ]; then
58
+ echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
59
+ elif [ "${{ inputs.package-manager }}" == "yarn" ]; then
60
+ echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
61
+ else
62
+ echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT
63
+ fi
64
+
65
+ - name: Cache dependencies
66
+ id: cache
67
+ uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
68
+ with:
69
+ path: ${{ steps.cache-dir.outputs.dir }}
70
+ key: ${{ runner.os }}-${{ inputs.package-manager }}-${{ hashFiles(inputs.cache-dependency-path) }}
71
+ restore-keys: |
72
+ ${{ runner.os }}-${{ inputs.package-manager }}-
73
+
74
+ - name: Install dependencies
75
+ if: steps.cache.outputs.cache-hit != 'true'
76
+ shell: bash
77
+ run: |
78
+ if [ "${{ inputs.package-manager }}" == "npm" ]; then
79
+ npm ci
80
+ elif [ "${{ inputs.package-manager }}" == "yarn" ]; then
81
+ yarn install --frozen-lockfile
82
+ else
83
+ pnpm install --frozen-lockfile
84
+ fi
85
+
86
+ - name: Report status
87
+ shell: bash
88
+ run: |
89
+ echo "::group::Setup Summary"
90
+ echo "Node.js version: $(node --version)"
91
+ echo "Package manager: ${{ inputs.package-manager }}"
92
+ echo "Cache hit: ${{ steps.cache.outputs.cache-hit }}"
93
+ echo "::endgroup::"