natureco-cli 5.18.2 → 5.19.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 (155) hide show
  1. package/package.json +1 -1
  2. package/skills/airunway-aks-setup/SKILL.md +73 -0
  3. package/skills/algorithmic-art/SKILL.md +405 -0
  4. package/skills/appinsights-instrumentation/SKILL.md +76 -0
  5. package/skills/azure-ai/SKILL.md +71 -0
  6. package/skills/azure-aigateway/SKILL.md +129 -0
  7. package/skills/azure-cloud-migrate/SKILL.md +52 -0
  8. package/skills/azure-compliance/SKILL.md +108 -0
  9. package/skills/azure-compute/SKILL.md +46 -0
  10. package/skills/azure-cost/SKILL.md +45 -0
  11. package/skills/azure-deploy/SKILL.md +97 -0
  12. package/skills/azure-diagnostics/SKILL.md +151 -0
  13. package/skills/azure-enterprise-infra-planner/SKILL.md +54 -0
  14. package/skills/azure-hosted-copilot-sdk/SKILL.md +89 -0
  15. package/skills/azure-kubernetes/SKILL.md +153 -0
  16. package/skills/azure-kusto/SKILL.md +231 -0
  17. package/skills/azure-messaging/SKILL.md +57 -0
  18. package/skills/azure-prepare/SKILL.md +165 -0
  19. package/skills/azure-quotas/SKILL.md +276 -0
  20. package/skills/azure-rbac/SKILL.md +17 -0
  21. package/skills/azure-reliability/SKILL.md +387 -0
  22. package/skills/azure-resource-lookup/SKILL.md +108 -0
  23. package/skills/azure-resource-visualizer/SKILL.md +183 -0
  24. package/skills/azure-storage/SKILL.md +100 -0
  25. package/skills/azure-upgrade/SKILL.md +91 -0
  26. package/skills/azure-validate/SKILL.md +72 -0
  27. package/skills/brainstorming/SKILL.md +159 -0
  28. package/skills/brand-guidelines/SKILL.md +73 -0
  29. package/skills/brandkit/SKILL.md +798 -0
  30. package/skills/brutalist-skill/SKILL.md +92 -0
  31. package/skills/canvas-design/SKILL.md +130 -0
  32. package/skills/cavecrew/SKILL.md +82 -0
  33. package/skills/caveman-commit/SKILL.md +65 -0
  34. package/skills/caveman-help/SKILL.md +63 -0
  35. package/skills/caveman-review/SKILL.md +55 -0
  36. package/skills/caveman-stats/SKILL.md +10 -0
  37. package/skills/claude-api/SKILL.md +356 -0
  38. package/skills/composition-patterns/SKILL.md +89 -0
  39. package/skills/decision-mapping/SKILL.md +84 -0
  40. package/skills/deploy-to-vercel/SKILL.md +296 -0
  41. package/skills/design-an-interface/SKILL.md +94 -0
  42. package/skills/design-doc-mermaid/SKILL.md +498 -0
  43. package/skills/develop-userscripts/SKILL.md +84 -0
  44. package/skills/doc-coauthoring/SKILL.md +375 -0
  45. package/skills/documentation/SKILL.md +109 -0
  46. package/skills/docx/SKILL.md +590 -0
  47. package/skills/edit-article/SKILL.md +15 -0
  48. package/skills/entra-agent-id/SKILL.md +356 -0
  49. package/skills/entra-app-registration/SKILL.md +191 -0
  50. package/skills/faceless-explainer/SKILL.md +202 -0
  51. package/skills/fastify/SKILL.md +75 -0
  52. package/skills/general-video/SKILL.md +143 -0
  53. package/skills/git-guardrails-claude-code/SKILL.md +95 -0
  54. package/skills/github-actions-docs/SKILL.md +98 -0
  55. package/skills/gpt-tasteskill/SKILL.md +74 -0
  56. package/skills/grill-me/SKILL.md +7 -0
  57. package/skills/grilling/SKILL.md +10 -0
  58. package/skills/handoff/SKILL.md +16 -0
  59. package/skills/hyperframes/SKILL.md +152 -0
  60. package/skills/hyperframes-animation/SKILL.md +82 -0
  61. package/skills/hyperframes-cli/SKILL.md +109 -0
  62. package/skills/hyperframes-core/SKILL.md +78 -0
  63. package/skills/hyperframes-creative/SKILL.md +68 -0
  64. package/skills/hyperframes-media/SKILL.md +97 -0
  65. package/skills/image-to-code-skill/SKILL.md +1228 -0
  66. package/skills/imagegen-frontend-mobile/SKILL.md +1465 -0
  67. package/skills/imagegen-frontend-web/SKILL.md +987 -0
  68. package/skills/implement/SKILL.md +15 -0
  69. package/skills/init/SKILL.md +91 -0
  70. package/skills/internal-comms/SKILL.md +32 -0
  71. package/skills/lark-approval/SKILL.md +56 -0
  72. package/skills/lark-base/SKILL.md +157 -0
  73. package/skills/lark-doc/SKILL.md +81 -0
  74. package/skills/lark-shared/SKILL.md +168 -0
  75. package/skills/lark-workflow-meeting-summary/SKILL.md +122 -0
  76. package/skills/linting-neostandard-eslint9/SKILL.md +64 -0
  77. package/skills/loop-me/SKILL.md +32 -0
  78. package/skills/microsoft-foundry/SKILL.md +262 -0
  79. package/skills/migrate-to-shoehorn/SKILL.md +118 -0
  80. package/skills/minimalist-skill/SKILL.md +85 -0
  81. package/skills/motion-graphics/SKILL.md +170 -0
  82. package/skills/music-to-video/SKILL.md +197 -0
  83. package/skills/node/SKILL.md +94 -0
  84. package/skills/nodejs-core/SKILL.md +156 -0
  85. package/skills/oauth/SKILL.md +186 -0
  86. package/skills/obsidian-vault/SKILL.md +59 -0
  87. package/skills/octocat/SKILL.md +93 -0
  88. package/skills/openclaw-secure-linux-cloud/SKILL.md +157 -0
  89. package/skills/opensource-guide-coach/SKILL.md +218 -0
  90. package/skills/output-skill/SKILL.md +49 -0
  91. package/skills/pdf/SKILL.md +314 -0
  92. package/skills/pptx/SKILL.md +232 -0
  93. package/skills/pr-to-video/SKILL.md +235 -0
  94. package/skills/product-launch-video/SKILL.md +205 -0
  95. package/skills/python-appservice-deploy/SKILL.md +36 -0
  96. package/skills/qa/SKILL.md +130 -0
  97. package/skills/react-best-practices/SKILL.md +149 -0
  98. package/skills/react-native-skills/SKILL.md +121 -0
  99. package/skills/react-view-transitions/SKILL.md +320 -0
  100. package/skills/readme-i18n/SKILL.md +176 -0
  101. package/skills/redesign-skill/SKILL.md +178 -0
  102. package/skills/remotion/SKILL.md +364 -0
  103. package/skills/request-refactor-plan/SKILL.md +68 -0
  104. package/skills/resolving-merge-conflicts/SKILL.md +14 -0
  105. package/skills/running-claude-code-via-litellm-copilot/SKILL.md +263 -0
  106. package/skills/scaffold-exercises/SKILL.md +106 -0
  107. package/skills/secure-linux-web-hosting/SKILL.md +162 -0
  108. package/skills/setup-pre-commit/SKILL.md +91 -0
  109. package/skills/shadcn/SKILL.md +267 -0
  110. package/skills/simple/SKILL.md +52 -0
  111. package/skills/skill-creator/SKILL.md +485 -0
  112. package/skills/skill-optimizer/SKILL.md +47 -0
  113. package/skills/skills-cli/SKILL.md +281 -0
  114. package/skills/slack-gif-creator/SKILL.md +254 -0
  115. package/skills/snipgrapher/SKILL.md +58 -0
  116. package/skills/soft-skill/SKILL.md +98 -0
  117. package/skills/stitch-skill/SKILL.md +184 -0
  118. package/skills/supabase/SKILL.md +135 -0
  119. package/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  120. package/skills/systematic-debugging/SKILL.md +296 -0
  121. package/skills/talking-head-recut/SKILL.md +1191 -0
  122. package/skills/taste-skill/SKILL.md +1206 -0
  123. package/skills/taste-skill-v1/SKILL.md +226 -0
  124. package/skills/tdd/SKILL.md +108 -0
  125. package/skills/teach/SKILL.md +140 -0
  126. package/skills/test-driven-development/SKILL.md +371 -0
  127. package/skills/theme-factory/SKILL.md +59 -0
  128. package/skills/to-prd/SKILL.md +75 -0
  129. package/skills/typescript-magician/SKILL.md +117 -0
  130. package/skills/tzst/SKILL.md +68 -0
  131. package/skills/ubiquitous-language/SKILL.md +93 -0
  132. package/skills/use-my-browser/SKILL.md +110 -0
  133. package/skills/using-superpowers/SKILL.md +121 -0
  134. package/skills/vercel-cli-with-tokens/SKILL.md +353 -0
  135. package/skills/vercel-optimize/SKILL.md +322 -0
  136. package/skills/viral-instagram-reels/SKILL.md +180 -0
  137. package/skills/viral-short-form/SKILL.md +147 -0
  138. package/skills/viral-short-form-ideas/SKILL.md +184 -0
  139. package/skills/viral-tiktok-content/SKILL.md +180 -0
  140. package/skills/web-artifacts-builder/SKILL.md +74 -0
  141. package/skills/web-design-guidelines/SKILL.md +39 -0
  142. package/skills/webapp-testing/SKILL.md +96 -0
  143. package/skills/website-to-video/SKILL.md +145 -0
  144. package/skills/writing-beats/SKILL.md +67 -0
  145. package/skills/writing-fragments/SKILL.md +79 -0
  146. package/skills/writing-great-skills/SKILL.md +82 -0
  147. package/skills/writing-guidelines/SKILL.md +39 -0
  148. package/skills/writing-plans/SKILL.md +174 -0
  149. package/skills/writing-shape/SKILL.md +79 -0
  150. package/skills/xdrop/SKILL.md +78 -0
  151. package/skills/xget/SKILL.md +87 -0
  152. package/skills/xlsx/SKILL.md +292 -0
  153. package/src/tools/browser_use.js +2 -1
  154. package/src/tools/skills_download.js +217 -0
  155. package/src/utils/tools.js +2 -2
@@ -0,0 +1,263 @@
1
+ ---
2
+ name: running-claude-code-via-litellm-copilot
3
+ description: Use when routing Claude Code through a local LiteLLM proxy to GitHub Copilot, reducing direct Anthropic spend, configuring ANTHROPIC_BASE_URL or ANTHROPIC_MODEL overrides, or troubleshooting Copilot proxy setup failures such as model-not-found, no localhost traffic, or GitHub 401/403 auth errors.
4
+ ---
5
+
6
+ ## Overview
7
+
8
+ Use this skill for the specific workaround where Claude Code keeps its Anthropic-shaped client behavior, but the actual backend traffic is sent to a local LiteLLM proxy and then forwarded to GitHub Copilot.
9
+
10
+ Treat this as an advanced workaround, not an officially guaranteed GitHub workflow. Help the user succeed technically, but do not promise GitHub support, policy approval, or long-term compatibility.
11
+
12
+ This skill is guidance-first but execution-aware:
13
+
14
+ - If the user wants explanation only, provide the smallest correct set of files, commands, and checks.
15
+ - If the user wants real setup work on the current machine, inspect first and adapt commands to the active shell and OS.
16
+ - Pause before persistent edits such as `~/.claude/settings.json` or shell profile files.
17
+
18
+ Read [`references/doc-verified-notes.md`](./references/doc-verified-notes.md) before answering if you need to justify which parts come from the article and which parts were tightened against current LiteLLM docs.
19
+
20
+ ## When To Use
21
+
22
+ Use this skill when the user wants any of the following:
23
+
24
+ - Claude Code to run against GitHub Copilot through LiteLLM
25
+ - lower direct Anthropic API spending while keeping the Claude Code workflow
26
+ - a local `config.yaml` for LiteLLM's GitHub Copilot provider
27
+ - `ANTHROPIC_BASE_URL`, `ANTHROPIC_MODEL`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` setup
28
+ - help understanding GitHub device authorization during LiteLLM startup
29
+ - help with model mismatch, 404-like errors, no requests reaching LiteLLM, or GitHub 401/403 failures
30
+
31
+ Do not use this skill for:
32
+
33
+ - deciding whether the workaround is allowed by GitHub terms
34
+ - general LiteLLM architecture unrelated to Claude Code plus Copilot
35
+ - direct Anthropic API setup with no Copilot or LiteLLM component
36
+
37
+ ## Core Rules
38
+
39
+ 1. Lead with a short compliance caveat.
40
+ Explain that this is a workaround based on a local proxy path, not a GitHub-promoted workflow, and the user must evaluate the latest Copilot terms and limits for themselves.
41
+ 2. Prefer the minimum viable path first.
42
+ Start with temporary environment variables and a local `config.yaml` unless the user explicitly wants a persistent setup.
43
+ 3. Keep `ANTHROPIC_MODEL` and LiteLLM `model_name` identical.
44
+ Exact string match matters more than clever explanation.
45
+ 4. Treat `ANTHROPIC_AUTH_TOKEN` as a local placeholder.
46
+ Claude Code expects a non-empty value locally, but it is not the GitHub Copilot credential and should not be presented as a reusable secret.
47
+ 5. Never overwrite `~/.claude/settings.json` wholesale.
48
+ Merge only the needed `env` keys and preserve unrelated settings.
49
+
50
+ ## Workflow
51
+
52
+ ### 1. Preflight
53
+
54
+ Check these first when the user wants real setup work:
55
+
56
+ - `claude --help` succeeds
57
+ - `uv --version` or `pip --version` succeeds
58
+ - the user has GitHub Copilot access
59
+ - the intended LiteLLM port is available, usually `4000`
60
+
61
+ If the user only wants instructions, state the prerequisites instead of running them.
62
+
63
+ ### 2. Choose Temporary vs Persistent Setup
64
+
65
+ Use this rule:
66
+
67
+ - Temporary setup: preferred default for first-time setup, debugging, and low-risk trials
68
+ - Persistent setup: only when the user explicitly wants the proxy path to apply every time Claude Code starts
69
+
70
+ For persistent setup, confirm the target file and then merge keys into `~/.claude/settings.json`. Do not replace the file contents.
71
+
72
+ ### 3. Create LiteLLM `config.yaml`
73
+
74
+ Start from the article's flow, but keep the provider naming aligned with LiteLLM docs:
75
+
76
+ ```yaml
77
+ model_list:
78
+ - model_name: claude-opus-4.5
79
+ litellm_params:
80
+ model: github_copilot/claude-opus-4.5
81
+ drop_params: true
82
+ ```
83
+
84
+ Explain the fields:
85
+
86
+ - `model_name`: the logical name Claude Code will request
87
+ - `model`: the LiteLLM provider route, using `github_copilot/<model>`
88
+ - `drop_params: true`: strips unsupported Anthropic-specific fields before forwarding to Copilot
89
+
90
+ If the user wants a different Copilot-backed model, keep the same pattern:
91
+
92
+ ```yaml
93
+ model_list:
94
+ - model_name: <logical-name>
95
+ litellm_params:
96
+ model: github_copilot/<copilot-model>
97
+ drop_params: true
98
+ ```
99
+
100
+ Do not hardcode extra headers into the default path unless the user already hit a rejection that suggests header overrides are needed.
101
+
102
+ ### 4. Install and Start LiteLLM
103
+
104
+ Preferred install:
105
+
106
+ ```bash
107
+ uv tool install "litellm[proxy]"
108
+ ```
109
+
110
+ Fallback:
111
+
112
+ ```bash
113
+ pip install "litellm[proxy]"
114
+ ```
115
+
116
+ Start the proxy from the directory containing `config.yaml`:
117
+
118
+ ```bash
119
+ litellm --config config.yaml --port 4000
120
+ ```
121
+
122
+ Tell the user to keep that terminal open because the logs are the fastest truth source during verification.
123
+
124
+ ### 5. Explain GitHub Device Authorization
125
+
126
+ On the first successful request to the GitHub Copilot provider, LiteLLM may open a device authorization flow:
127
+
128
+ 1. LiteLLM prints a verification URL and device code
129
+ 2. the user opens the URL and approves the request
130
+ 3. LiteLLM stores the resulting credential locally for future use
131
+
132
+ Optional token-location overrides exist:
133
+
134
+ - `GITHUB_COPILOT_TOKEN_DIR`
135
+ - `GITHUB_COPILOT_ACCESS_TOKEN_FILE`
136
+
137
+ Only mention these when the user needs custom token storage, shared environments, or troubleshooting around expired or misplaced credentials.
138
+
139
+ ### 6. Configure Claude Code
140
+
141
+ For a temporary PowerShell session:
142
+
143
+ ```powershell
144
+ $env:ANTHROPIC_AUTH_TOKEN = "sk-any-string"
145
+ $env:ANTHROPIC_BASE_URL = "http://localhost:4000"
146
+ $env:ANTHROPIC_MODEL = "claude-opus-4.5"
147
+ $env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
148
+ claude
149
+ ```
150
+
151
+ For a temporary Bash or Zsh session:
152
+
153
+ ```bash
154
+ export ANTHROPIC_AUTH_TOKEN="sk-any-string"
155
+ export ANTHROPIC_BASE_URL="http://localhost:4000"
156
+ export ANTHROPIC_MODEL="claude-opus-4.5"
157
+ export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
158
+ claude
159
+ ```
160
+
161
+ For persistent configuration, merge these keys into `~/.claude/settings.json`:
162
+
163
+ ```json
164
+ {
165
+ "env": {
166
+ "ANTHROPIC_AUTH_TOKEN": "sk-any-string",
167
+ "ANTHROPIC_BASE_URL": "http://localhost:4000",
168
+ "ANTHROPIC_MODEL": "claude-opus-4.5",
169
+ "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
170
+ }
171
+ }
172
+ ```
173
+
174
+ Merge-safe behavior:
175
+
176
+ - if the file does not exist, create it
177
+ - if it exists, preserve all unrelated top-level keys
178
+ - preserve existing `env` entries that are unrelated to this workflow
179
+ - update only the four keys above
180
+ - if the JSON is malformed, stop and report the parse problem instead of overwriting the file
181
+
182
+ ### 7. Verify The Request Chain
183
+
184
+ Use two terminals when possible:
185
+
186
+ - Terminal A runs LiteLLM
187
+ - Terminal B runs `claude`
188
+
189
+ Ask for one small prompt such as a short script or code review request, then verify:
190
+
191
+ - Claude Code starts normally
192
+ - LiteLLM logs show an inbound request
193
+ - LiteLLM logs indicate the GitHub Copilot model route, typically `github_copilot/<model>`
194
+
195
+ The healthy path is:
196
+
197
+ ```text
198
+ Claude Code -> LiteLLM -> GitHub Copilot -> LiteLLM -> Claude Code
199
+ ```
200
+
201
+ ### 8. Troubleshooting
202
+
203
+ If Claude Code reports model-not-found, 404-like failures, or LiteLLM says the model does not exist:
204
+
205
+ - compare `ANTHROPIC_MODEL` to `model_name` exactly
206
+ - check case, punctuation, and hyphens
207
+
208
+ If LiteLLM never receives a request:
209
+
210
+ - confirm `ANTHROPIC_BASE_URL` points to <http://localhost:4000>
211
+ - confirm LiteLLM is still running on that port
212
+ - confirm the environment variables were set in the same shell session that launched `claude`
213
+ - check local firewall or port conflicts if the URL is correct but still silent
214
+
215
+ If LiteLLM reaches GitHub Copilot but gets 401 or 403 responses:
216
+
217
+ - repeat the device authorization flow by restarting LiteLLM and retrying
218
+ - confirm the GitHub account still has Copilot access
219
+ - if custom token-directory variables are set, verify they point to the intended files
220
+
221
+ ## Advanced Fallback: Header Overrides
222
+
223
+ The article uses explicit Copilot-style headers. Current LiteLLM docs expose GitHub Copilot as a provider and also document header override support.
224
+
225
+ Only reach for explicit `extra_headers` when:
226
+
227
+ - the basic provider flow reaches Copilot but still needs client-shape overrides
228
+ - the user already has evidence that a specific environment behaves better with editor-style headers
229
+
230
+ Example fallback:
231
+
232
+ ```yaml
233
+ model_list:
234
+ - model_name: claude-opus-4.5
235
+ litellm_params:
236
+ model: github_copilot/claude-opus-4.5
237
+ drop_params: true
238
+ extra_headers:
239
+ editor-version: "vscode/1.85.1"
240
+ editor-plugin-version: "copilot/1.155.0"
241
+ Copilot-Integration-Id: "vscode-chat"
242
+ user-agent: "GithubCopilot/1.155.0"
243
+ ```
244
+
245
+ Present this as an advanced fallback, not the universal default.
246
+
247
+ ## Output Checklist
248
+
249
+ When answering a real user request with this skill, include:
250
+
251
+ - the brief compliance caveat
252
+ - the exact `config.yaml` or the delta to apply
253
+ - shell-appropriate commands
254
+ - whether the setup is temporary or persistent
255
+ - the verification path
256
+ - the smallest relevant troubleshooting section if something failed
257
+
258
+ ## Safety Reminders
259
+
260
+ - Do not state that GitHub officially supports this workaround.
261
+ - Do not imply that a dummy `ANTHROPIC_AUTH_TOKEN` is a real Copilot credential.
262
+ - Do not recommend replacing `~/.claude/settings.json` wholesale.
263
+ - Do not present stale model names as guaranteed current availability; if the user asks for a specific model, keep the `github_copilot/<model>` pattern and note that Copilot-exposed model availability may change.
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: scaffold-exercises
3
+ description: Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
4
+ ---
5
+
6
+ # Scaffold Exercises
7
+
8
+ Create exercise directory structures that pass `pnpm ai-hero-cli internal lint`, then commit with `git commit`.
9
+
10
+ ## Directory naming
11
+
12
+ - **Sections**: `XX-section-name/` inside `exercises/` (e.g., `01-retrieval-skill-building`)
13
+ - **Exercises**: `XX.YY-exercise-name/` inside a section (e.g., `01.03-retrieval-with-bm25`)
14
+ - Section number = `XX`, exercise number = `XX.YY`
15
+ - Names are dash-case (lowercase, hyphens)
16
+
17
+ ## Exercise variants
18
+
19
+ Each exercise needs at least one of these subfolders:
20
+
21
+ - `problem/` - student workspace with TODOs
22
+ - `solution/` - reference implementation
23
+ - `explainer/` - conceptual material, no TODOs
24
+
25
+ When stubbing, default to `explainer/` unless the plan specifies otherwise.
26
+
27
+ ## Required files
28
+
29
+ Each subfolder (`problem/`, `solution/`, `explainer/`) needs a `readme.md` that:
30
+
31
+ - Is **not empty** (must have real content, even a single title line works)
32
+ - Has no broken links
33
+
34
+ When stubbing, create a minimal readme with a title and a description:
35
+
36
+ ```md
37
+ # Exercise Title
38
+
39
+ Description here
40
+ ```
41
+
42
+ If the subfolder has code, it also needs a `main.ts` (>1 line). But for stubs, a readme-only exercise is fine.
43
+
44
+ ## Workflow
45
+
46
+ 1. **Parse the plan** - extract section names, exercise names, and variant types
47
+ 2. **Create directories** - `mkdir -p` for each path
48
+ 3. **Create stub readmes** - one `readme.md` per variant folder with a title
49
+ 4. **Run lint** - `pnpm ai-hero-cli internal lint` to validate
50
+ 5. **Fix any errors** - iterate until lint passes
51
+
52
+ ## Lint rules summary
53
+
54
+ The linter (`pnpm ai-hero-cli internal lint`) checks:
55
+
56
+ - Each exercise has subfolders (`problem/`, `solution/`, `explainer/`)
57
+ - At least one of `problem/`, `explainer/`, or `explainer.1/` exists
58
+ - `readme.md` exists and is non-empty in the primary subfolder
59
+ - No `.gitkeep` files
60
+ - No `speaker-notes.md` files
61
+ - No broken links in readmes
62
+ - No `pnpm run exercise` commands in readmes
63
+ - `main.ts` required per subfolder unless it's readme-only
64
+
65
+ ## Moving/renaming exercises
66
+
67
+ When renumbering or moving exercises:
68
+
69
+ 1. Use `git mv` (not `mv`) to rename directories - preserves git history
70
+ 2. Update the numeric prefix to maintain order
71
+ 3. Re-run lint after moves
72
+
73
+ Example:
74
+
75
+ ```bash
76
+ git mv exercises/01-retrieval/01.03-embeddings exercises/01-retrieval/01.04-embeddings
77
+ ```
78
+
79
+ ## Example: stubbing from a plan
80
+
81
+ Given a plan like:
82
+
83
+ ```
84
+ Section 05: Memory Skill Building
85
+ - 05.01 Introduction to Memory
86
+ - 05.02 Short-term Memory (explainer + problem + solution)
87
+ - 05.03 Long-term Memory
88
+ ```
89
+
90
+ Create:
91
+
92
+ ```bash
93
+ mkdir -p exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer
94
+ mkdir -p exercises/05-memory-skill-building/05.02-short-term-memory/{explainer,problem,solution}
95
+ mkdir -p exercises/05-memory-skill-building/05.03-long-term-memory/explainer
96
+ ```
97
+
98
+ Then create readme stubs:
99
+
100
+ ```
101
+ exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer/readme.md -> "# Introduction to Memory"
102
+ exercises/05-memory-skill-building/05.02-short-term-memory/explainer/readme.md -> "# Short-term Memory"
103
+ exercises/05-memory-skill-building/05.02-short-term-memory/problem/readme.md -> "# Short-term Memory"
104
+ exercises/05-memory-skill-building/05.02-short-term-memory/solution/readme.md -> "# Short-term Memory"
105
+ exercises/05-memory-skill-building/05.03-long-term-memory/explainer/readme.md -> "# Long-term Memory"
106
+ ```
@@ -0,0 +1,162 @@
1
+ ---
2
+ name: secure-linux-web-hosting
3
+ description: Use when setting up, hardening, or reviewing a cloud server for self-hosting, including DNS, SSH, firewalls, Nginx, static-site hosting, reverse-proxying an app, HTTPS with Let's Encrypt or ACME clients, safe HTTP-to-HTTPS redirects, or optional post-launch network tuning such as BBR.
4
+ ---
5
+
6
+ ## Overview
7
+
8
+ Use this skill to turn a cloud server into a safely reachable web host
9
+ without leaning on stale distro-specific memory or outdated Debian-10-era
10
+ tutorials.
11
+
12
+ This skill keeps the familiar teaching arc of a beginner-friendly server guide,
13
+ but turns it into a reusable operator workflow:
14
+
15
+ 1. Intake and routing
16
+ 2. Prerequisites
17
+ 3. Secure access
18
+ 4. Firewall and exposure
19
+ 5. Web server setup
20
+ 6. Static site or app proxy
21
+ 7. HTTPS
22
+ 8. Validation
23
+ 9. Optional advanced tuning
24
+
25
+ Before giving actionable commands, identify the distro family and verify the
26
+ current package names, service units, config paths, and ACME-client guidance
27
+ against official documentation for the user's distro and chosen tools.
28
+
29
+ Open [`references/workflow-map.md`](./references/workflow-map.md) first for the
30
+ phase sequence, then open the narrower reference file you need.
31
+
32
+ ## When to Use
33
+
34
+ Use this skill when the user mentions any of the following:
35
+
36
+ - a cloud server, VM, droplet, or other Linux host they want to use for hosting
37
+ - connecting a domain or DNS A/AAAA record to a server
38
+ - SSH login, SSH hardening, root login, keys, ports, or firewall setup
39
+ - installing or configuring Nginx for a website
40
+ - serving a simple static site from Linux
41
+ - putting a small app behind Nginx as a reverse proxy
42
+ - HTTPS, Let's Encrypt, Certbot, `acme.sh`, certificate renewal, or redirecting
43
+ HTTP to HTTPS
44
+ - optional post-setup performance or network tuning such as BBR
45
+
46
+ Do not use this skill for:
47
+
48
+ - Kubernetes, PaaS, or full container-orchestrator deployment design
49
+ - application-specific build or CI/CD questions where Linux hosting is not the
50
+ actual problem
51
+ - Windows or macOS host administration
52
+ - public multi-tenant production architecture reviews that need a broader SRE
53
+ or platform-design treatment
54
+
55
+ ## Workflow
56
+
57
+ ### 1. Intake and classify the current state
58
+
59
+ Start by identifying:
60
+
61
+ - distro family or image name
62
+ - whether the user has root access, an admin user, or only one live SSH session
63
+ - whether DNS already points at the host
64
+ - whether the goal is a static site or an app reverse proxy
65
+ - whether ports are already exposed
66
+ - whether HTTPS is already partially configured
67
+
68
+ If the distro is unknown, ask for it or have the user inspect `/etc/os-release`
69
+ before giving concrete package or service commands.
70
+
71
+ ### 2. Verify current docs before actionable commands
72
+
73
+ Use bundled references for routing, then verify details against live official
74
+ docs before giving commands that depend on current distro behavior.
75
+
76
+ Always verify:
77
+
78
+ - package manager commands and package names
79
+ - firewall tooling and service names
80
+ - SSH service unit names and config include paths
81
+ - Nginx package and config layout
82
+ - the chosen ACME client's current instructions
83
+
84
+ If you cannot verify a detail, say so and give high-level guidance instead of
85
+ pretending the old Debian tutorial path is universal.
86
+
87
+ ### 3. Keep the phases in order
88
+
89
+ Walk through the phases in this order unless the user is explicitly asking for
90
+ review or remediation of an existing setup:
91
+
92
+ 1. prerequisites
93
+ 2. secure access
94
+ 3. firewall and exposure
95
+ 4. web server
96
+ 5. choose one hosting branch: static site or app proxy
97
+ 6. HTTPS
98
+ 7. validation
99
+ 8. optional advanced tuning
100
+
101
+ Do not collapse the static-site branch and reverse-proxy branch into one
102
+ default answer. Pick the branch that matches the user's goal.
103
+
104
+ ### 4. Enforce the safety gates
105
+
106
+ Treat these as hard stop checks:
107
+
108
+ - Do not recommend changing SSH port, disabling password auth, or disabling
109
+ root SSH login until key-based login works in a second SSH session.
110
+ - Do not recommend certificate issuance until DNS resolves to the intended host
111
+ and the HTTP site or proxy path works as expected.
112
+ - Do not force an HTTP-to-HTTPS redirect until HTTPS loads cleanly.
113
+ - Do not suggest BBR or similar tuning until secure hosting is already working.
114
+
115
+ Always distinguish:
116
+
117
+ - local-machine actions: SSH, DNS checks, browser tests
118
+ - server actions: package install, config edits, service reloads, firewall rules
119
+
120
+ ## Output Expectations
121
+
122
+ For a fresh setup, provide:
123
+
124
+ - a brief diagnosis of the current state
125
+ - the current phase and why it comes next
126
+ - local-machine steps separate from server steps
127
+ - concrete commands or config snippets only after doc verification
128
+ - a verification step after each risky change
129
+ - a short "if this fails, check X" branch for the likely mistake at that phase
130
+
131
+ For a hardening or troubleshooting review, provide:
132
+
133
+ - the most likely risk or breakage first
134
+ - a prioritized remediation sequence
135
+ - the first safe verification step before the next config change
136
+
137
+ ## Common Mistakes
138
+
139
+ - treating Debian-specific commands from an old article as Linux-universal
140
+ - hardening SSH in the only active session and locking the user out
141
+ - opening application ports directly instead of keeping the app on loopback
142
+ - mixing static-file hosting guidance and reverse-proxy guidance in one config
143
+ - attempting ACME issuance before DNS or HTTP is actually correct
144
+ - forcing redirects before HTTPS is proven
145
+ - treating BBR as part of the core setup instead of an optional later step
146
+ - ignoring SELinux or AppArmor differences when Nginx can read files on one
147
+ distro but not another
148
+
149
+ ## Reference Usage
150
+
151
+ Use [`references/workflow-map.md`](./references/workflow-map.md) for the phase map,
152
+ branching logic, and validation order.
153
+
154
+ Use [`references/distro-routing.md`](./references/distro-routing.md) when distro
155
+ family, package manager, firewall tooling, or config layout matters.
156
+
157
+ Use [`references/nginx-patterns.md`](./references/nginx-patterns.md) when the user
158
+ needs the static-site branch or the reverse-proxy branch.
159
+
160
+ Use [`references/security-and-tls.md`](./references/security-and-tls.md) for SSH
161
+ hardening sequence, firewall posture, certificate issuance, renewal, and
162
+ redirect timing.
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: setup-pre-commit
3
+ description: Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
4
+ ---
5
+
6
+ # Setup Pre-Commit Hooks
7
+
8
+ ## What This Sets Up
9
+
10
+ - **Husky** pre-commit hook
11
+ - **lint-staged** running Prettier on all staged files
12
+ - **Prettier** config (if missing)
13
+ - **typecheck** and **test** scripts in the pre-commit hook
14
+
15
+ ## Steps
16
+
17
+ ### 1. Detect package manager
18
+
19
+ Check for `package-lock.json` (npm), `pnpm-lock.yaml` (pnpm), `yarn.lock` (yarn), `bun.lockb` (bun). Use whichever is present. Default to npm if unclear.
20
+
21
+ ### 2. Install dependencies
22
+
23
+ Install as devDependencies:
24
+
25
+ ```
26
+ husky lint-staged prettier
27
+ ```
28
+
29
+ ### 3. Initialize Husky
30
+
31
+ ```bash
32
+ npx husky init
33
+ ```
34
+
35
+ This creates `.husky/` dir and adds `prepare: "husky"` to package.json.
36
+
37
+ ### 4. Create `.husky/pre-commit`
38
+
39
+ Write this file (no shebang needed for Husky v9+):
40
+
41
+ ```
42
+ npx lint-staged
43
+ npm run typecheck
44
+ npm run test
45
+ ```
46
+
47
+ **Adapt**: Replace `npm` with detected package manager. If repo has no `typecheck` or `test` script in package.json, omit those lines and tell the user.
48
+
49
+ ### 5. Create `.lintstagedrc`
50
+
51
+ ```json
52
+ {
53
+ "*": "prettier --ignore-unknown --write"
54
+ }
55
+ ```
56
+
57
+ ### 6. Create `.prettierrc` (if missing)
58
+
59
+ Only create if no Prettier config exists. Use these defaults:
60
+
61
+ ```json
62
+ {
63
+ "useTabs": false,
64
+ "tabWidth": 2,
65
+ "printWidth": 80,
66
+ "singleQuote": false,
67
+ "trailingComma": "es5",
68
+ "semi": true,
69
+ "arrowParens": "always"
70
+ }
71
+ ```
72
+
73
+ ### 7. Verify
74
+
75
+ - [ ] `.husky/pre-commit` exists and is executable
76
+ - [ ] `.lintstagedrc` exists
77
+ - [ ] `prepare` script in package.json is `"husky"`
78
+ - [ ] `prettier` config exists
79
+ - [ ] Run `npx lint-staged` to verify it works
80
+
81
+ ### 8. Commit
82
+
83
+ Stage all changed/created files and commit with message: `Add pre-commit hooks (husky + lint-staged + prettier)`
84
+
85
+ This will run through the new pre-commit hooks — a good smoke test that everything works.
86
+
87
+ ## Notes
88
+
89
+ - Husky v9+ doesn't need shebangs in hook files
90
+ - `prettier --ignore-unknown` skips files Prettier can't parse (images, etc.)
91
+ - The pre-commit runs lint-staged first (fast, staged-only), then full typecheck and tests