@robosoft/skillhub-cli 0.1.2 → 0.3.3

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 (51) hide show
  1. package/CHANGELOG.md +26 -25
  2. package/README.md +162 -182
  3. package/bin/skillhub.mjs +722 -365
  4. package/docs/skillhub-cli-logic.md +114 -83
  5. package/package.json +8 -5
  6. package/skillhub-registry/CHANGELOG.md +65 -0
  7. package/skillhub-registry/CLAUDE.md +108 -0
  8. package/skillhub-registry/README.md +196 -16
  9. package/skillhub-registry/docs/cheat-sheet.md +272 -0
  10. package/skillhub-registry/docs/contributing.md +166 -0
  11. package/skillhub-registry/docs/cost-hygiene.md +175 -0
  12. package/skillhub-registry/docs/customization.md +321 -0
  13. package/skillhub-registry/docs/exception-process.md +194 -0
  14. package/skillhub-registry/docs/installation.md +277 -0
  15. package/skillhub-registry/domain/api.md +303 -0
  16. package/skillhub-registry/domain/frontend/web-app.md +17 -0
  17. package/skillhub-registry/domain/frontend-app.md +46 -0
  18. package/skillhub-registry/domain/frontend-architecture.md +126 -0
  19. package/skillhub-registry/rules/anti-patterns.md +95 -0
  20. package/skillhub-registry/rules/code-standards.md +182 -0
  21. package/skillhub-registry/rules/frontend/antipattern.md +21 -0
  22. package/skillhub-registry/rules/frontend/component-standards.md +10 -0
  23. package/skillhub-registry/rules/frontend-app.md +24 -0
  24. package/skillhub-registry/rules/general.md +51 -0
  25. package/skillhub-registry/skills/api/SKILL.md +167 -0
  26. package/skillhub-registry/skills/build/SKILL.md +114 -0
  27. package/skillhub-registry/skills/fast/SKILL.md +56 -0
  28. package/skillhub-registry/skills/feature-dev/SKILL.md +166 -0
  29. package/skillhub-registry/skills/frontend/app/SKILL.md +28 -0
  30. package/skillhub-registry/skills/frontend/app/skill.json +10 -0
  31. package/skillhub-registry/skills/frontend/app/templates/feature/{{kebabName}}.tsx.hbs +11 -0
  32. package/skillhub-registry/skills/frontend-app/SKILL.md +48 -0
  33. package/skillhub-registry/skills/frontend-app/skill.json +11 -0
  34. package/skillhub-registry/skills/frontend-app/templates/feature/{{kebabName}}.tsx.hbs +11 -0
  35. package/skillhub-registry/skills/performance/SKILL.md +168 -0
  36. package/skillhub-registry/skills/react/SKILL.md +224 -0
  37. package/skillhub-registry/skills/refactor/SKILL.md +149 -0
  38. package/skillhub-registry/skills/review/SKILL.md +199 -0
  39. package/skillhub-registry/skills/strict/SKILL.md +74 -0
  40. package/skillhub-registry/skills/testing/SKILL.md +132 -0
  41. package/skillhub-registry/accessibility-review/1.0.0/SKILL.md +0 -22
  42. package/skillhub-registry/accessibility-review/1.0.0/checklist/ui-review.md +0 -8
  43. package/skillhub-registry/accessibility-review/1.0.0/skill.json +0 -9
  44. package/skillhub-registry/nextjs-clean-architecture/1.0.0/SKILL.md +0 -37
  45. package/skillhub-registry/nextjs-clean-architecture/1.0.0/checklist/definition-of-done.md +0 -9
  46. package/skillhub-registry/nextjs-clean-architecture/1.0.0/rules/folder-structure.md +0 -7
  47. package/skillhub-registry/nextjs-clean-architecture/1.0.0/skill.json +0 -9
  48. package/skillhub-registry/shadcn-crud-generator/1.0.0/SKILL.md +0 -25
  49. package/skillhub-registry/shadcn-crud-generator/1.0.0/skill.json +0 -9
  50. package/skillhub-registry/shadcn-crud-generator/1.0.0/templates/feature/actions.ts.hbs +0 -16
  51. package/skillhub-registry/shadcn-crud-generator/1.0.0/templates/feature/page.tsx.hbs +0 -13
@@ -0,0 +1,194 @@
1
+ # Rule Exception Process
2
+
3
+ **Status:** Pilot — solo decision-making; process formalizes when team grows
4
+ **Last updated:** 2026-05-06
5
+ **Owner:** Raj Shah
6
+
7
+ This guide explains what counts as a legitimate deviation from a template rule, how to document it in code, and when a recurring exception should become a rule change instead. Read [`contributing.md`](contributing.md) first if your case is "the rule itself is wrong" rather than "this specific situation justifies a deviation."
8
+
9
+ > **TL;DR:** Most rules can be deviated from when the deviation is documented and justified. This doc explains when an exception is legitimate, how to document it, and when to escalate to changing the rule itself.
10
+
11
+ ---
12
+
13
+ ## What Is an Exception
14
+
15
+ The rules in this template are **strong defaults, not absolute laws**. They encode patterns that are right *most* of the time — but most-of-the-time is not all-of-the-time. A 50-line function might genuinely be more readable than the four 12-line helpers you'd extract from it. A magic number in a one-line throwaway script might genuinely be clearer than a named constant.
16
+
17
+ An **exception** is a deliberate, documented deviation from a rule for a specific case. The crucial word is **documented**. Silent deviations are what the template exists to prevent — they make code feel arbitrary and unauditable. A deviation that is intentional and explained, on the other hand, is healthy: it means the developer engaged with the rule, decided it didn't fit, and recorded why.
18
+
19
+ The rest of this guide is about how to tell those two cases apart.
20
+
21
+ ---
22
+
23
+ ## When an Exception Is Legitimate
24
+
25
+ Four common situations where deviating is the right call:
26
+
27
+ ### The rule's rationale doesn't apply to this case
28
+
29
+ Each rule has a `> **Why:**` blockquote — that's the test. If the *why* isn't relevant here, the rule isn't either.
30
+
31
+ > **Example:** `rules/code-standards.md` caps functions at ~40 lines because functions over that size almost always mix multiple responsibilities. A 60-line declarative configuration object doesn't have multiple responsibilities — it's one block of data. The rule's rationale doesn't apply.
32
+
33
+ ### Following the rule would harm the code more than help
34
+
35
+ Rules optimize for the common case. Some specific cases invert the trade-off.
36
+
37
+ > **Example:** "No magic values" exists to document intent. In a one-line throwaway script that retries three times, extracting `const RETRIES = 3` adds noise without adding clarity — there's no "intent" to document beyond what the literal already conveys.
38
+
39
+ ### The rule conflicts with an external constraint
40
+
41
+ You don't always control the surface you're writing against.
42
+
43
+ > **Example:** A library's API forces a callback signature like `(err, data) => {}`. Our naming convention says boolean predicates start with `is/has/should`, but `err` here is a positional contract from the library. Renaming it would break the contract.
44
+
45
+ ### The codebase's existing pattern conflicts
46
+
47
+ This one is already built into `rules/general.md` as foundation #1: **match the existing codebase before applying these rules.**
48
+
49
+ > **Example:** A legacy module uses React class components throughout. The React skill says functional only — but introducing one functional component into a class-component file creates a stylistic split that's harder to read than just matching the existing style.
50
+
51
+ If your case fits one of these four shapes, the exception is probably legitimate. Document it (see below) and move on.
52
+
53
+ ---
54
+
55
+ ## When an Exception Is NOT Legitimate
56
+
57
+ The harder cases. These all *feel* like exceptions to the developer making them; they are not:
58
+
59
+ - **"It's faster this way"** — without a measurement, this is premature optimization. The performance skill exists for exactly this situation: profile first, then optimize. A guess is not a rationale.
60
+ - **"I'll fix it later"** — that's a `TODO`, not an exception. Exceptions are deliberate; deferred work is just deferred work.
61
+ - **"The rule is too strict"** — without articulating *why* it's too strict for this specific case, this is just preference. If you can't name what makes this case different from the cases the rule was designed for, follow the rule.
62
+ - **"Other people do it this way"** — appeal to popularity is not a rationale. Plenty of widely-used patterns are widely wrong.
63
+ - **Wanting to use a clever pattern when the boring one would work.** Cleverness is not a justification. The template biases hard toward boring solutions; an exception that exists because boring would have worked is not an exception, it's a preference.
64
+
65
+ A useful test: **could you write the EXCEPTION comment in two sentences without using the words "I think," "I prefer," or "it feels"?** If not, follow the rule.
66
+
67
+ ---
68
+
69
+ ## How to Document an Exception (In Code)
70
+
71
+ The mechanic is a comment at the deviation point. Four parts:
72
+
73
+ 1. The marker `EXCEPTION:` so it's grep-able.
74
+ 2. The rule being deviated from (path or skill name).
75
+ 3. The rationale — *why* this case escapes the rule's purpose.
76
+ 4. (Optional) A follow-up plan if the deviation is temporary.
77
+
78
+ ### Example 1 — function-size deviation
79
+
80
+ ```javascript
81
+ // EXCEPTION: rules/code-standards.md function-size limit
82
+ // This config object is 60 lines but extracting it would split a single
83
+ // declarative structure across multiple files, hurting readability.
84
+ // The 40-line limit exists to prevent functions doing too many things;
85
+ // a config object isn't doing anything procedurally.
86
+ const ROUTE_CONFIG = {
87
+ // ... 60 lines of declarative config
88
+ };
89
+ ```
90
+
91
+ ### Example 2 — React skill deviation
92
+
93
+ ```javascript
94
+ // EXCEPTION: skills/react/SKILL.md — class component instead of functional
95
+ // The legacy AdminPanel module uses class components throughout. Adding
96
+ // a functional component here would create a stylistic split. Will be
97
+ // migrated when the entire AdminPanel is rewritten in Q3.
98
+ class AdminCard extends React.Component { /* ... */ }
99
+ ```
100
+
101
+ The second example also shows the optional follow-up plan ("Will be migrated when the entire AdminPanel is rewritten in Q3"). Include that when the deviation is temporary; omit it when it's permanent.
102
+
103
+ Match the comment style to the language. The `EXCEPTION:` marker is the constant — everything else adapts. In Python:
104
+
105
+ ```python
106
+ # EXCEPTION: rules/code-standards.md nesting depth
107
+ # This four-level loop reflects the four-dimensional structure of the
108
+ # tax form schema. Flattening it would obscure the nesting that's
109
+ # inherent to the data, not accidental in the code.
110
+ ```
111
+
112
+ ---
113
+
114
+ ## How to Decide on Exceptions (Today, Pilot Phase)
115
+
116
+ Right now, the only person granting exceptions is Raj. There is no approval workflow, no signoff, no committee. The "process" is therefore a thinking framework for a single developer making a single judgment call:
117
+
118
+ 1. **Imagine another developer reading this code in six months.** Will they understand why the rule was broken here?
119
+ 2. **Try to write the EXCEPTION comment.** If you can write a clear, two-sentence rationale that answers that question, the exception is probably legitimate. If you can't — if the comment comes out as "this seemed cleaner" or "the rule felt too strict" — follow the rule.
120
+ 3. **If still unsure, follow the rule.** A consistent codebase that occasionally has a less-than-ideal function is easier to maintain than an inconsistent codebase full of justified-feeling deviations. The default is "follow the rule."
121
+
122
+ There is no escalation path during pilot beyond "talk it over with Raj." For non-trivial deviations (anything affecting security, correctness, or a rule that exists for a serious reason), do that.
123
+
124
+ ---
125
+
126
+ ## How to Decide on Exceptions (Future, Team Phase)
127
+
128
+ When the template has more than one maintainer and exceptions stop being a one-person decision, the process formalizes. The expected shape:
129
+
130
+ - **Routine exceptions** (function size, naming, magic values, formatting) — in-code documentation is sufficient. No review needed.
131
+ - **Exceptions to correctness or security rules** (error handling, input validation, auth checks) — peer review required before merge.
132
+ - **Repeated exceptions to the same rule** — escalated as a rule-change proposal via [`contributing.md`](contributing.md) rather than granted again.
133
+
134
+ This section is forward-looking. None of the above is in force today.
135
+
136
+ ---
137
+
138
+ ## When to Change the Rule Instead
139
+
140
+ The single most useful signal in this whole guide:
141
+
142
+ > **If you find yourself granting the same exception three or more times, the rule is probably wrong.**
143
+
144
+ Three exceptions to the same rule means one of two things: the rule is too strict, or the rule has unstated conditions that should be explicit. Either way, the right move is to fix the rule, not keep stacking exceptions.
145
+
146
+ Concrete examples of "the rule should change":
147
+
148
+ - The 40-line function-size limit gets exception-ed repeatedly inside a game-logic module where state machines naturally produce longer functions → either the rule needs a stated exception for state machines, or the limit needs to be relaxed for that domain.
149
+ - A naming convention that fights the language's idioms (e.g., a `camelCase` rule applied to a Python file where `snake_case` is the language standard) → the rule is wrong, not the code.
150
+ - An anti-pattern that turns out to be the canonical pattern in one stack (e.g., "no global state" applied to a Redux codebase where the store *is* the architecture) → the rule needs scoping.
151
+
152
+ Use [`contributing.md`](contributing.md) to propose the rule change. Don't keep granting exceptions to a broken rule.
153
+
154
+ ---
155
+
156
+ ## Tracking Exceptions
157
+
158
+ ### Today (pilot phase)
159
+
160
+ Exceptions are not formally tracked. They live in code as `EXCEPTION:` comments, and they are reviewed when (and only when) someone happens across them. This is fine at solo scale; it does not scale to a team.
161
+
162
+ ### Future
163
+
164
+ When team grows, exceptions become auditable. The simplest mechanism is grep:
165
+
166
+ ```bash
167
+ grep -rn "EXCEPTION:" --include="*.{js,ts,tsx,jsx,py,go,rs}" .
168
+ ```
169
+
170
+ A periodic review of that output catches two things: (a) exceptions whose follow-up plans are now overdue, and (b) rules that are being exception-ed often enough to warrant changing.
171
+
172
+ Codifying that into a CI step or a quarterly review ritual is a v1.0+ concern.
173
+
174
+ ---
175
+
176
+ ## What NOT to Document as an Exception
177
+
178
+ Some things look like exceptions but aren't:
179
+
180
+ - **Things outside the rule's scope.** If the rule doesn't actually cover your case, you're not deviating — you're just operating outside the rule. No comment needed.
181
+ - **Personal style preferences.** "I like spaces around operators in this one file." → Not an exception. Use `CLAUDE.local.md` (see [`customization.md`](customization.md#personal-vs-shared-customizations)).
182
+ - **Bugs.** A function that's 200 lines because nobody factored it isn't an exception, it's a bug. Fix it or file it; don't dignify it with an `EXCEPTION:` comment.
183
+ - **Exploratory hacks.** Code marked "I'm just trying something" belongs behind a `TODO` or `FIXME`, not an `EXCEPTION:`. Reserve `EXCEPTION:` for *intentional, justified* deviations.
184
+
185
+ The bar for `EXCEPTION:` is: I have considered the rule, I have a specific reason this case is different, and I'd defend that reason in a code review.
186
+
187
+ ---
188
+
189
+ ## Where to Get Help
190
+
191
+ - **A recurring exception suggests the rule itself is wrong** → [`contributing.md`](contributing.md) for proposing a rule change.
192
+ - **You want to add a rule that fits your specific context** → [`customization.md`](customization.md).
193
+ - **Overall context on what the template is** → [`../README.md`](../README.md).
194
+ - **When in doubt** → message Raj Shah. During pilot phase, that is the entire escalation path.
@@ -0,0 +1,277 @@
1
+ # Installation Guide
2
+
3
+ **Status:** Pilot — install instructions for the v0.1.0 template
4
+ **Last updated:** 2026-05-06
5
+ **Owner:** Raj Shah
6
+
7
+ This guide walks you through installing the org's Claude coding template so that Claude Code automatically loads the shared rules, skills, and slash commands on every session. Most developers should follow Method 1 (the install script). Allow about 5 minutes end-to-end.
8
+
9
+ > **TL;DR:** Clone the template, run `./install.sh`, then start `claude` and type `/help` to confirm the slash commands appear. If they don't, jump to the Troubleshooting section.
10
+
11
+ ---
12
+
13
+ ## Prerequisites
14
+
15
+ Before running any of the steps below, confirm you have:
16
+
17
+ | Requirement | How to check | Where to get it |
18
+ |---|---|---|
19
+ | **Claude Code** installed and signed in | `claude --version` returns a version string | See Anthropic's Claude Code docs |
20
+ | **Git** | `git --version` returns a version string | https://git-scm.com/ (or `xcode-select --install` on macOS) |
21
+ | **A terminal** | Terminal.app on macOS, your distro's terminal on Linux, Windows Terminal on Windows | Built into the OS |
22
+ | **An Anthropic API key configured** | `claude` launches without prompting for credentials | Anthropic Console → API Keys |
23
+
24
+ If any of these are missing, install them first. The rest of this guide assumes all four are working.
25
+
26
+ ---
27
+
28
+ ## Installation Method 1: Install script (recommended)
29
+
30
+ The fastest path. The script symlinks `CLAUDE.md`, `rules/`, `skills/`, and `domain/` into `~/.claude/`, with smart handling of any files that are already there.
31
+
32
+ ### Step 1 — Clone the template
33
+
34
+ ```bash
35
+ git clone [REPO_URL] ~/.claude-template
36
+ ```
37
+
38
+ **What it does:** Puts the template in `~/.claude-template`. Pick any path you like; this guide assumes `~/.claude-template`.
39
+ **Success looks like:** `ls ~/.claude-template` shows `CLAUDE.md`, `rules/`, `skills/`, `domain/`, `docs/`, `install.sh`, `uninstall.sh`.
40
+
41
+ > Replace `[REPO_URL]` with your org's actual repo URL. If you don't have one yet, copy the folder manually — Method 3 below covers that.
42
+
43
+ ### Step 2 — Make the script executable
44
+
45
+ ```bash
46
+ cd ~/.claude-template
47
+ chmod +x install.sh
48
+ ```
49
+
50
+ **Why this step:** Git preserves the executable bit when present in the repo, but a fresh clone or a copy through some channels (zip, scp without preserved permissions) may strip it. The script can't make itself executable — that's a one-time chmod.
51
+
52
+ ### Step 3 — Run the installer
53
+
54
+ ```bash
55
+ ./install.sh
56
+ ```
57
+
58
+ **What it does:** Verifies the template directory looks right, ensures `~/.claude/` exists, and creates four symlinks. If anything is already at one of those paths, the script tells you what's there and asks before replacing it. Real files and directories are backed up to `<name>.backup-YYYYMMDD-HHMMSS` before the symlink replaces them.
59
+
60
+ **Success looks like:**
61
+ ```
62
+ Summary
63
+ created: 4
64
+ replaced: 0
65
+ backed up: 0
66
+ unchanged: 0
67
+ skipped: 0
68
+ ```
69
+
70
+ If the script reports `unchanged: 4`, you'd already installed it — re-running is safe and idempotent.
71
+
72
+ ### Step 4 — Verify the slash commands
73
+
74
+ Launch Claude Code in interactive mode, then type `/help` inside the session:
75
+
76
+ ```bash
77
+ claude
78
+ ```
79
+
80
+ Once the session is open, type:
81
+
82
+ ```
83
+ /help
84
+ ```
85
+
86
+ **Success looks like:** The `/help` output lists the custom commands defined by this template — `/build`, `/refactor`, `/review`, `/feature-dev`, `/fast`, `/strict`. If you only see Claude Code's built-in commands, the symlinks didn't take — see Troubleshooting.
87
+
88
+ > Slash commands like `/help` only work inside an interactive Claude Code session — they are not available via non-interactive flags.
89
+
90
+ ---
91
+
92
+ ## Installation Method 2: Manual install (advanced)
93
+
94
+ The script does nothing magical — these are the same `ln -s` commands it issues. Use this method when you want to understand what's happening, can't execute scripts on a managed machine, or are debugging the script itself.
95
+
96
+ ### Step 1 — Clone the template to a permanent location
97
+
98
+ ```bash
99
+ git clone [REPO_URL] ~/.claude-template
100
+ ```
101
+
102
+ **Success looks like:** `ls ~/.claude-template` shows `CLAUDE.md`, `rules/`, `skills/`, `domain/`, `docs/`.
103
+
104
+ ### Step 2 — Make sure `~/.claude/` exists
105
+
106
+ ```bash
107
+ mkdir -p ~/.claude
108
+ ```
109
+
110
+ ### Step 3 — Symlink the four entry points
111
+
112
+ ```bash
113
+ ln -s ~/.claude-template/CLAUDE.md ~/.claude/CLAUDE.md
114
+ ln -s ~/.claude-template/rules ~/.claude/rules
115
+ ln -s ~/.claude-template/skills ~/.claude/skills
116
+ ln -s ~/.claude-template/domain ~/.claude/domain
117
+ ```
118
+
119
+ **Success looks like:** `ls -la ~/.claude` shows four entries with `->` pointing back at `~/.claude-template/...`.
120
+
121
+ > If `~/.claude/CLAUDE.md` already exists (from a prior setup), back it up first: `mv ~/.claude/CLAUDE.md ~/.claude/CLAUDE.md.bak`. Then re-run the `ln -s` line. The install script handles this for you automatically.
122
+
123
+ ### Step 4 — Verify the slash commands
124
+
125
+ Same as Method 1, Step 4 — launch `claude` and type `/help`.
126
+
127
+ ---
128
+
129
+ ## Installation Method 3: Direct copy (alternative)
130
+
131
+ For users who can't use symlinks (some corporate-managed machines disable them) or who prefer a frozen snapshot:
132
+
133
+ ```bash
134
+ cp ~/.claude-template/CLAUDE.md ~/.claude/CLAUDE.md
135
+ cp -r ~/.claude-template/rules ~/.claude/rules
136
+ cp -r ~/.claude-template/skills ~/.claude/skills
137
+ cp -r ~/.claude-template/domain ~/.claude/domain
138
+ ```
139
+
140
+ **Trade-off:** When the template updates, you have to re-run these copies manually. With symlinks (Methods 1 and 2), `cd ~/.claude-template && git pull` is enough.
141
+
142
+ Verify the same way as Method 1 — launch `claude` and type `/help` inside the session.
143
+
144
+ ---
145
+
146
+ ## Per-Project Installation (advanced)
147
+
148
+ Claude Code also reads a `CLAUDE.md` from the **project root** (the directory you launched `claude` from). Project-level config layers on top of the global config in `~/.claude/`.
149
+
150
+ This is useful when:
151
+ - A specific project has its own conventions that override or extend the global rules
152
+ - You want skills that only apply to one codebase
153
+ - You're piloting changes to the template before promoting them globally
154
+
155
+ To set up a project-specific `CLAUDE.md`:
156
+
157
+ 1. Create `CLAUDE.md` in the project root.
158
+ 2. Reference the global rules by `@import` if you want them to still apply (Claude Code resolves `@import` paths relative to the file doing the import).
159
+ 3. Add project-specific rules below the imports.
160
+
161
+ For details on how Claude Code merges global and project config, see https://code.claude.com/docs/en/memory.
162
+
163
+ ---
164
+
165
+ ## Verification
166
+
167
+ After installing, do a quick smoke test:
168
+
169
+ 1. **Open Claude Code in any project:**
170
+ ```bash
171
+ cd ~/some-project && claude
172
+ ```
173
+ 2. **Type `/help`** — confirm `/build`, `/refactor`, `/review`, `/feature-dev`, `/fast`, `/strict` all appear in the list.
174
+ 3. **Ask Claude something simple,** e.g.:
175
+ > "Write a function that sums an array."
176
+
177
+ Verify Claude follows the rules in `rules/general.md` — concretely: it asks for clarification if the language isn't obvious, doesn't invent APIs, and doesn't refactor unrelated code.
178
+ 4. **Trigger the React skill:**
179
+ > "Review this React component: `function Foo() { return <div>hi</div>; }`"
180
+
181
+ Claude should pick up React-specific guidance (from `skills/react/SKILL.md`) without you having to invoke it explicitly. A quick way to confirm: ask Claude "which skills did you load for that response?" and it should mention `react`.
182
+
183
+ If all four pass, installation is complete.
184
+
185
+ ---
186
+
187
+ ## Troubleshooting
188
+
189
+ | Symptom | Likely cause | Fix |
190
+ |---|---|---|
191
+ | **Slash commands don't appear in `/help`** | `~/.claude/skills/` is missing or empty | Confirm `ls ~/.claude/skills/` shows folders (`api`, `build`, `fast`, etc.) each containing a `SKILL.md`. Re-run `./install.sh` if missing. |
192
+ | **Rules don't seem to apply** (Claude ignores conventions) | `~/.claude/CLAUDE.md` missing, or its `@import` lines point to files that don't exist | Confirm `~/.claude/CLAUDE.md` exists (`ls -la ~/.claude/CLAUDE.md`) and contains the three `@rules/...` imports. Confirm `~/.claude/rules/general.md` resolves. |
193
+ | **Claude Code logs `cannot find file referenced by @import`** | `@import` paths are resolved **relative to the file doing the import** | If `CLAUDE.md` lives at `~/.claude/CLAUDE.md`, then `@rules/general.md` resolves to `~/.claude/rules/general.md`. Make sure that file exists (or that the symlink points somewhere real). |
194
+ | **Symlinks broke after I moved the template folder** | `ln -s` stores absolute paths — moving the target leaves dangling links, and `uninstall.sh` will see them as "foreign" because they no longer point at the new location | Manually clear the broken links: `unlink ~/.claude/CLAUDE.md ~/.claude/rules ~/.claude/skills ~/.claude/domain`, then run `./install.sh` from the new template location. |
195
+
196
+ If none of the above match, message Raj Shah with the output of `ls -la ~/.claude/` and the first line of `~/.claude/CLAUDE.md`.
197
+
198
+ ---
199
+
200
+ ## Updating the Template
201
+
202
+ ### Symlink installs (Methods 1 and 2)
203
+
204
+ ```bash
205
+ cd ~/.claude-template
206
+ git pull
207
+ ```
208
+
209
+ Updates apply automatically — Claude Code reads the new files on the next session. No need to re-run `install.sh` unless the update introduces new top-level entries (the script is safe to re-run; it will report `unchanged` for anything already linked correctly).
210
+
211
+ ### Direct-copy installs (Method 3)
212
+
213
+ Re-run the `cp` commands from Method 3. Existing `~/.claude/CLAUDE.md` will be overwritten — back it up first if you've made local edits.
214
+
215
+ ### Before updating
216
+
217
+ Skim [`CHANGELOG.md`](../CHANGELOG.md) at the root of the template. Major version bumps may require re-running install steps; minor and patch versions just apply.
218
+
219
+ ---
220
+
221
+ ## Uninstalling
222
+
223
+ ### From a script-based or manual symlink install (Methods 1 and 2)
224
+
225
+ ```bash
226
+ cd ~/.claude-template
227
+ ./uninstall.sh
228
+ ```
229
+
230
+ The uninstaller only removes symlinks that point back into *this* template directory. Real files at `~/.claude/`, symlinks pointing to other templates, and any `*.backup-*` files left by `install.sh` are kept. The script prints a summary so you can see exactly what was removed and what was left.
231
+
232
+ ### From a direct-copy install (Method 3)
233
+
234
+ The uninstall script won't remove copied directories — it only handles symlinks. Remove them manually:
235
+
236
+ ```bash
237
+ rm ~/.claude/CLAUDE.md
238
+ rm -r ~/.claude/rules ~/.claude/skills ~/.claude/domain
239
+ ```
240
+
241
+ > Confirm each path before running `rm -r`. If you're not sure, list contents first with `ls -la ~/.claude/`.
242
+
243
+ ### Deleting the template folder
244
+
245
+ If you also want to remove the cloned template itself:
246
+
247
+ ```bash
248
+ rm -rf ~/.claude-template
249
+ ```
250
+
251
+ > Be careful with `rm -rf`. Confirm the path before pressing Enter.
252
+
253
+ ---
254
+
255
+ ## Setup for Claude.ai (web/app) instead of Claude Code
256
+
257
+ If you use Claude.ai instead of (or alongside) Claude Code, you can get most of the same benefit by setting up a Project:
258
+
259
+ 1. **Create a Project** in Claude.ai (left sidebar → New Project).
260
+ 2. **Paste the contents of `CLAUDE.md`** into the Project's "Custom instructions" / "Project instructions" field.
261
+ 3. **Upload the rule and skill files as Project Knowledge:**
262
+ - `rules/general.md`, `rules/code-standards.md`, `rules/anti-patterns.md`
263
+ - The `SKILL.md` files for any skills you want available
264
+ - `domain/api.md` if you're working on API code
265
+ 4. **Reference them in conversation** — on Claude.ai, skills don't auto-trigger the way they do in Claude Code. You'll need to explicitly say "apply the React skill" or "follow the testing standards" when relevant.
266
+
267
+ This is a workable fallback but it's a noticeably worse experience than Claude Code: no auto-loading, no slash commands, no on-demand skill detection. If the org standardizes on Claude Code, this section becomes optional.
268
+
269
+ ---
270
+
271
+ ## Where to Get Help
272
+
273
+ - **Installation problems** → Raj Shah
274
+ - **Cost / token-usage best practices** → [`docs/cost-hygiene.md`](cost-hygiene.md)
275
+ - **Overall context on what this template is and why it exists** → [`README.md`](../README.md)
276
+ - **Proposing changes to rules or skills** → `docs/contributing.md` (when published)
277
+ - **Requesting an exception to a rule** → `docs/exception-process.md` (when published)