slashdev 0.1.0 → 1.1.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 (73) hide show
  1. package/.gitmodules +3 -0
  2. package/CLAUDE.md +88 -0
  3. package/GETTING-STARTED.md +68 -0
  4. package/README.md +158 -21
  5. package/bin/check-setup.js +27 -0
  6. package/claude-skills/agentswarm/SKILL.md +479 -0
  7. package/claude-skills/bug-diagnosis/SKILL.md +34 -0
  8. package/claude-skills/code-review/SKILL.md +26 -0
  9. package/claude-skills/frontend-design/LICENSE.txt +177 -0
  10. package/claude-skills/frontend-design/SKILL.md +42 -0
  11. package/claude-skills/pr-description/SKILL.md +35 -0
  12. package/claude-skills/scope-estimate/SKILL.md +37 -0
  13. package/claude-skills/secure-deploy/SKILL.md +219 -0
  14. package/hooks/post-response.sh +242 -0
  15. package/hooks/pre-install-guard.sh +88 -0
  16. package/package.json +11 -3
  17. package/skills/front-end-design/prompts/system.md +37 -0
  18. package/skills/front-end-testing/prompts/system.md +66 -0
  19. package/skills/github-manager/prompts/system.md +79 -0
  20. package/skills/product-expert/prompts/system.md +52 -0
  21. package/skills/server-admin/prompts/system.md +39 -0
  22. package/src/auth/index.js +115 -0
  23. package/src/cli.js +188 -18
  24. package/src/commands/setup-internals.js +221 -0
  25. package/src/commands/setup.js +110 -0
  26. package/src/commands/update.js +64 -0
  27. package/src/connections/index.js +449 -0
  28. package/src/connections/providers/github.js +71 -0
  29. package/src/connections/providers/servers.js +175 -0
  30. package/src/connections/registry.js +21 -0
  31. package/src/core/claude.js +78 -0
  32. package/src/core/codebase.js +119 -0
  33. package/src/core/config.js +110 -0
  34. package/src/index.js +8 -1
  35. package/src/info.js +54 -21
  36. package/src/skills/index.js +252 -0
  37. package/src/utils/ssh-keys.js +67 -0
  38. package/vendor/gstack/.env.example +5 -0
  39. package/vendor/gstack/autoplan/SKILL.md +1116 -0
  40. package/vendor/gstack/browse/SKILL.md +538 -0
  41. package/vendor/gstack/canary/SKILL.md +587 -0
  42. package/vendor/gstack/careful/SKILL.md +59 -0
  43. package/vendor/gstack/codex/SKILL.md +862 -0
  44. package/vendor/gstack/connect-chrome/SKILL.md +549 -0
  45. package/vendor/gstack/cso/ACKNOWLEDGEMENTS.md +14 -0
  46. package/vendor/gstack/cso/SKILL.md +929 -0
  47. package/vendor/gstack/design-consultation/SKILL.md +962 -0
  48. package/vendor/gstack/design-review/SKILL.md +1314 -0
  49. package/vendor/gstack/design-shotgun/SKILL.md +730 -0
  50. package/vendor/gstack/document-release/SKILL.md +718 -0
  51. package/vendor/gstack/freeze/SKILL.md +82 -0
  52. package/vendor/gstack/gstack-upgrade/SKILL.md +232 -0
  53. package/vendor/gstack/guard/SKILL.md +82 -0
  54. package/vendor/gstack/investigate/SKILL.md +504 -0
  55. package/vendor/gstack/land-and-deploy/SKILL.md +1367 -0
  56. package/vendor/gstack/office-hours/SKILL.md +1317 -0
  57. package/vendor/gstack/plan-ceo-review/SKILL.md +1537 -0
  58. package/vendor/gstack/plan-design-review/SKILL.md +1227 -0
  59. package/vendor/gstack/plan-eng-review/SKILL.md +1120 -0
  60. package/vendor/gstack/qa/SKILL.md +1136 -0
  61. package/vendor/gstack/qa/references/issue-taxonomy.md +85 -0
  62. package/vendor/gstack/qa/templates/qa-report-template.md +126 -0
  63. package/vendor/gstack/qa-only/SKILL.md +726 -0
  64. package/vendor/gstack/retro/SKILL.md +1197 -0
  65. package/vendor/gstack/review/SKILL.md +1138 -0
  66. package/vendor/gstack/review/TODOS-format.md +62 -0
  67. package/vendor/gstack/review/checklist.md +220 -0
  68. package/vendor/gstack/review/design-checklist.md +132 -0
  69. package/vendor/gstack/review/greptile-triage.md +220 -0
  70. package/vendor/gstack/setup-browser-cookies/SKILL.md +348 -0
  71. package/vendor/gstack/setup-deploy/SKILL.md +528 -0
  72. package/vendor/gstack/ship/SKILL.md +1931 -0
  73. package/vendor/gstack/unfreeze/SKILL.md +40 -0
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: frontend-design
3
+ description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
8
+
9
+ The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
10
+
11
+ ## Design Thinking
12
+
13
+ Before coding, understand the context and commit to a BOLD aesthetic direction:
14
+ - **Purpose**: What problem does this interface solve? Who uses it?
15
+ - **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
16
+ - **Constraints**: Technical requirements (framework, performance, accessibility).
17
+ - **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
18
+
19
+ **CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
20
+
21
+ Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
22
+ - Production-grade and functional
23
+ - Visually striking and memorable
24
+ - Cohesive with a clear aesthetic point-of-view
25
+ - Meticulously refined in every detail
26
+
27
+ ## Frontend Aesthetics Guidelines
28
+
29
+ Focus on:
30
+ - **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
31
+ - **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
32
+ - **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
33
+ - **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
34
+ - **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
35
+
36
+ NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
37
+
38
+ Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
39
+
40
+ **IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
41
+
42
+ Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: pr-description
3
+ description: Generate clear, structured pull request descriptions from diffs and context
4
+ version: "1.0"
5
+ owner: michael@slashdev.io
6
+ ---
7
+
8
+ # PR Description Generator
9
+
10
+ Generate a well-structured pull request description based on the current changes.
11
+
12
+ ## Process
13
+
14
+ 1. Analyze the diff (staged and unstaged changes)
15
+ 2. Identify the type of change (feature, fix, refactor, docs, etc.)
16
+ 3. Write a concise title (under 70 characters)
17
+ 4. Write the body with:
18
+
19
+ ## Output Format
20
+
21
+ ```markdown
22
+ ## Summary
23
+ - Bullet points describing what changed and why
24
+
25
+ ## Changes
26
+ - Specific technical changes made
27
+
28
+ ## Testing
29
+ - How to verify the changes work correctly
30
+
31
+ ## Notes
32
+ - Any deployment considerations, migrations, or follow-up work
33
+ ```
34
+
35
+ Keep descriptions factual and concise. Focus on the "why" not just the "what".
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: scope-estimate
3
+ description: Estimate scope and effort for development tasks based on codebase context
4
+ version: "1.0"
5
+ owner: michael@slashdev.io
6
+ ---
7
+
8
+ # Scope Estimation
9
+
10
+ You are a senior engineer at Slashdev estimating the scope of a development task.
11
+
12
+ ## Process
13
+
14
+ 1. Understand the requested feature or change
15
+ 2. Identify affected files, modules, and integration points
16
+ 3. Break the work into discrete subtasks
17
+ 4. Estimate effort for each subtask
18
+ 5. Flag risks and unknowns that could expand scope
19
+
20
+ ## Output Format
21
+
22
+ ### Overview
23
+ One-paragraph summary of the work.
24
+
25
+ ### Subtasks
26
+ | # | Task | Effort | Risk |
27
+ |---|------|--------|------|
28
+ | 1 | Description | S/M/L/XL | Low/Med/High |
29
+
30
+ ### Total Estimate
31
+ - **Effort**: S (< 2hrs) / M (half day) / L (1-2 days) / XL (3+ days)
32
+ - **Confidence**: High / Medium / Low
33
+
34
+ ### Risks & Unknowns
35
+ - List anything that could change the estimate
36
+
37
+ Be honest about uncertainty. A wide range with context is better than false precision.
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: secure-deploy
3
+ description: Retrofit a project's CI/CD pipelines, Dockerfiles, and deploy scripts to use Socket Firewall (sfw) for all dependency installs. Use when the user asks to "secure deploy", "set up sfw in CI", "add socket firewall to production", or whenever you're editing a CI workflow / Dockerfile / deploy script that installs dependencies.
4
+ version: "1.0"
5
+ owner: michael@slashdev.io
6
+ ---
7
+
8
+ # Secure Deploy — Retrofit projects to use Socket Firewall in production
9
+
10
+ Slashdev requires every dependency install — local AND production — to be wrapped
11
+ with Socket Firewall (`sfw`). This protects against supply-chain attacks
12
+ (compromised packages, typosquats, dependency confusion) by scanning every package
13
+ against Socket's vulnerability/malware database before it's allowed to install.
14
+
15
+ When a developer asks you to set up production deployment, edit a CI pipeline, write
16
+ a Dockerfile, or deploy a project, **you must ensure every install command uses `sfw`**.
17
+
18
+ This skill walks you through the retrofit systematically.
19
+
20
+ ## When to use this skill
21
+
22
+ Trigger automatically (without being asked) whenever you're about to:
23
+ - Create or edit a `.github/workflows/*.yml` file with an `npm`/`pnpm`/`yarn`/`bun`/`composer`/`pip` install step
24
+ - Create or edit a `Dockerfile` that runs an install command
25
+ - Create or edit `.gitlab-ci.yml`, `bitbucket-pipelines.yml`, `circleci/config.yml`, or any other CI config
26
+ - Create or edit a `deploy.sh`, `Procfile`, or `Makefile` install target
27
+ - Modify the `scripts` section of `package.json` to add an install-related step
28
+
29
+ Trigger explicitly when the user says: "secure deploy", "add sfw to CI", "set up socket firewall in production", "retrofit production for socket firewall", "audit deploy for sfw".
30
+
31
+ ## Step-by-step retrofit playbook
32
+
33
+ ### Step 1 — Discover deployment surface
34
+
35
+ Use Glob to find every file that could install dependencies in CI or production:
36
+
37
+ ```
38
+ .github/workflows/*.yml
39
+ .github/workflows/*.yaml
40
+ .gitlab-ci.yml
41
+ .gitlab/*.yml
42
+ bitbucket-pipelines.yml
43
+ .circleci/config.yml
44
+ azure-pipelines.yml
45
+ Jenkinsfile
46
+ Dockerfile
47
+ Dockerfile.*
48
+ *.dockerfile
49
+ docker-compose*.yml
50
+ Procfile
51
+ deploy.sh
52
+ deploy/*.sh
53
+ scripts/deploy*.sh
54
+ Makefile
55
+ package.json
56
+ ```
57
+
58
+ For each file found, Read it and look for any of these patterns:
59
+
60
+ - `npm install`, `npm i`, `npm ci`, `npm add`
61
+ - `pnpm install`, `pnpm i`, `pnpm add`
62
+ - `yarn`, `yarn install`, `yarn add`
63
+ - `bun install`, `bun i`, `bun add`
64
+ - `composer install`, `composer require`, `composer update`
65
+ - `pip install`, `pip3 install`, `uv install`, `uv sync`, `uv add`
66
+
67
+ Note any line that already starts with `sfw ` — those are already secured and don't
68
+ need to be touched.
69
+
70
+ ### Step 2 — Plan the changes
71
+
72
+ For each install command found, plan one of these rewrites:
73
+
74
+ **a) GitHub Actions workflow YAML**
75
+
76
+ Before:
77
+ ```yaml
78
+ - name: Install dependencies
79
+ run: npm ci
80
+ ```
81
+
82
+ After:
83
+ ```yaml
84
+ - name: Install Socket Firewall
85
+ run: npm install -g @socketsecurity/cli
86
+ - name: Install dependencies
87
+ run: sfw npm ci
88
+ ```
89
+
90
+ If a job has multiple install steps, only one `Install Socket Firewall` step is needed
91
+ per job (it persists across steps because they share the same runner).
92
+
93
+ **b) Dockerfile**
94
+
95
+ Before:
96
+ ```dockerfile
97
+ RUN npm ci
98
+ ```
99
+
100
+ After:
101
+ ```dockerfile
102
+ RUN npm install -g @socketsecurity/cli && sfw npm ci
103
+ ```
104
+
105
+ For Composer:
106
+ ```dockerfile
107
+ RUN npm install -g @socketsecurity/cli && sfw composer install --no-dev --optimize-autoloader
108
+ ```
109
+
110
+ (npm is the simplest install vector for sfw itself; if the base image doesn't have
111
+ Node, install Node first or use the official Socket installer.)
112
+
113
+ **c) Shell deploy scripts (`deploy.sh`, etc.)**
114
+
115
+ Before:
116
+ ```bash
117
+ npm ci --omit=dev
118
+ ```
119
+
120
+ After:
121
+ ```bash
122
+ # Ensure sfw is available
123
+ if ! command -v sfw >/dev/null 2>&1; then
124
+ npm install -g @socketsecurity/cli
125
+ fi
126
+ sfw npm ci --omit=dev
127
+ ```
128
+
129
+ **d) `package.json` scripts**
130
+
131
+ Before:
132
+ ```json
133
+ {
134
+ "scripts": {
135
+ "postinstall": "npm install --prefix ./client"
136
+ }
137
+ }
138
+ ```
139
+
140
+ After:
141
+ ```json
142
+ {
143
+ "scripts": {
144
+ "postinstall": "sfw npm install --prefix ./client"
145
+ }
146
+ }
147
+ ```
148
+
149
+ (Don't add the `npm install -g @socketsecurity/cli` step inside `package.json` — assume
150
+ sfw is already installed wherever this script runs. If it's running in CI, the workflow
151
+ or Dockerfile should have installed sfw at the top.)
152
+
153
+ ### Step 3 — Show the diff and confirm
154
+
155
+ Before writing any changes, show the user a clear summary:
156
+
157
+ > Found N install commands across M files. Proposed changes:
158
+ >
159
+ > 1. `.github/workflows/ci.yml` — wrap `npm ci` in build job (+ add sfw install step)
160
+ > 2. `Dockerfile` — wrap `RUN npm ci` with sfw install
161
+ > 3. `package.json` — wrap postinstall script
162
+ >
163
+ > Apply these changes?
164
+
165
+ Use AskUserQuestion if there's any ambiguity (e.g. multiple jobs in a workflow, unclear
166
+ whether a step is part of the build or local-only). For Dockerfiles especially, ask
167
+ about the base image — if it doesn't have Node, the sfw install command needs to be
168
+ different.
169
+
170
+ ### Step 4 — Apply the changes
171
+
172
+ Use Edit to apply each change. After applying:
173
+
174
+ 1. **Validate YAML/JSON syntax** — for any modified `.yml` or `.json` file, run a quick
175
+ parse check (e.g. `python3 -c 'import yaml,sys; yaml.safe_load(open("path"))'` for
176
+ YAML, or `python3 -m json.tool path` for JSON). Fix any syntax errors.
177
+ 2. **Run a build smoke test if possible** — for Dockerfiles, suggest the user run
178
+ `docker build .` locally. For GitHub Actions, suggest pushing to a feature branch
179
+ and watching the workflow run.
180
+ 3. **Document what was changed** — print a final summary listing every file modified
181
+ and what was added.
182
+
183
+ ### Step 5 — Verify CI doesn't already use a different security tool
184
+
185
+ If during Step 1 you find references to other security scanners (Snyk, Dependabot,
186
+ Trivy, npm audit, etc.), don't remove them — they complement Socket Firewall, they
187
+ don't replace it. Mention to the user: "I found existing security scanning via X. I
188
+ left it in place — Socket Firewall complements it by blocking malicious packages
189
+ *before* they install, while X scans the installed tree."
190
+
191
+ ## Important conventions
192
+
193
+ - **Never silently change install commands.** Always show the diff and get
194
+ confirmation before writing CI/deploy files. These are production-critical files.
195
+ - **Don't add sfw to dev-only `node_modules` install steps in `package.json`** unless
196
+ the user explicitly asks. The PreToolUse hook handles dev-side enforcement
197
+ automatically; only retrofit `package.json` scripts that run in CI/deploy contexts.
198
+ - **Don't try to install Socket Firewall globally on the user's machine** as part of
199
+ this skill. That's the developer's responsibility, and the slashdev hook will warn
200
+ them if it's missing. This skill only modifies project files.
201
+ - **Don't touch `.lock` files** (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`,
202
+ `composer.lock`, `bun.lockb`). They're generated.
203
+ - **Preserve existing flags** — when wrapping `npm ci --omit=dev` with `sfw`, keep
204
+ the `--omit=dev` flag.
205
+
206
+ ## Output format
207
+
208
+ Always end the skill with:
209
+
210
+ ```
211
+ ✓ Secured N install commands across M files:
212
+ - <file>: <change summary>
213
+ - <file>: <change summary>
214
+
215
+ Next steps:
216
+ - Test locally (if applicable)
217
+ - Push to a feature branch and watch CI
218
+ - Confirm sfw is available in your CI environment (the install step is now in place)
219
+ ```