@robosoft/skillhub-cli 0.1.1 → 0.3.2
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.
- package/CHANGELOG.md +21 -21
- package/README.md +166 -184
- package/bin/skillhub.mjs +734 -364
- package/docs/skillhub-cli-logic.md +115 -83
- package/package.json +8 -5
- package/skillhub-registry/CHANGELOG.md +65 -0
- package/skillhub-registry/CLAUDE.md +108 -0
- package/skillhub-registry/README.md +196 -16
- package/skillhub-registry/docs/cheat-sheet.md +272 -0
- package/skillhub-registry/docs/contributing.md +166 -0
- package/skillhub-registry/docs/cost-hygiene.md +175 -0
- package/skillhub-registry/docs/customization.md +321 -0
- package/skillhub-registry/docs/exception-process.md +194 -0
- package/skillhub-registry/docs/installation.md +277 -0
- package/skillhub-registry/domain/api.md +303 -0
- package/skillhub-registry/domain/frontend/web-app.md +17 -0
- package/skillhub-registry/domain/frontend-app.md +46 -0
- package/skillhub-registry/domain/frontend-architecture.md +126 -0
- package/skillhub-registry/rules/anti-patterns.md +95 -0
- package/skillhub-registry/rules/code-standards.md +182 -0
- package/skillhub-registry/rules/frontend/antipattern.md +21 -0
- package/skillhub-registry/rules/frontend/component-standards.md +10 -0
- package/skillhub-registry/rules/frontend-app.md +24 -0
- package/skillhub-registry/rules/general.md +51 -0
- package/skillhub-registry/skills/api/SKILL.md +167 -0
- package/skillhub-registry/skills/build/SKILL.md +114 -0
- package/skillhub-registry/skills/fast/SKILL.md +56 -0
- package/skillhub-registry/skills/feature-dev/SKILL.md +166 -0
- package/skillhub-registry/skills/frontend/app/SKILL.md +28 -0
- package/skillhub-registry/skills/frontend/app/rules/main.md +6 -0
- package/skillhub-registry/skills/frontend/app/skill.json +10 -0
- package/skillhub-registry/skills/frontend/app/templates/feature/{{kebabName}}.tsx.hbs +11 -0
- package/skillhub-registry/skills/frontend-app/SKILL.md +48 -0
- package/skillhub-registry/skills/frontend-app/rules/main.md +6 -0
- package/skillhub-registry/skills/frontend-app/skill.json +11 -0
- package/skillhub-registry/skills/frontend-app/templates/feature/{{kebabName}}.tsx.hbs +11 -0
- package/skillhub-registry/skills/performance/SKILL.md +168 -0
- package/skillhub-registry/skills/react/SKILL.md +224 -0
- package/skillhub-registry/skills/refactor/SKILL.md +149 -0
- package/skillhub-registry/skills/review/SKILL.md +199 -0
- package/skillhub-registry/skills/strict/SKILL.md +74 -0
- package/skillhub-registry/skills/testing/SKILL.md +132 -0
- package/skillhub-registry/accessibility-review/1.0.0/SKILL.md +0 -22
- package/skillhub-registry/accessibility-review/1.0.0/checklist/ui-review.md +0 -8
- package/skillhub-registry/accessibility-review/1.0.0/skill.json +0 -9
- package/skillhub-registry/nextjs-clean-architecture/1.0.0/SKILL.md +0 -37
- package/skillhub-registry/nextjs-clean-architecture/1.0.0/checklist/definition-of-done.md +0 -9
- package/skillhub-registry/nextjs-clean-architecture/1.0.0/rules/folder-structure.md +0 -7
- package/skillhub-registry/nextjs-clean-architecture/1.0.0/skill.json +0 -9
- package/skillhub-registry/shadcn-crud-generator/1.0.0/SKILL.md +0 -25
- package/skillhub-registry/shadcn-crud-generator/1.0.0/skill.json +0 -9
- package/skillhub-registry/shadcn-crud-generator/1.0.0/templates/feature/actions.ts.hbs +0 -16
- package/skillhub-registry/shadcn-crud-generator/1.0.0/templates/feature/page.tsx.hbs +0 -13
|
@@ -2,17 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
## Goal
|
|
4
4
|
|
|
5
|
-
The
|
|
6
|
-
|
|
7
|
-
A SkillHub skill is a folder that contains:
|
|
5
|
+
The SkillHub web app is the place where users create and maintain reusable project knowledge:
|
|
8
6
|
|
|
9
7
|
```txt
|
|
10
|
-
|
|
11
|
-
SKILL.md
|
|
8
|
+
skills/
|
|
12
9
|
rules/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
domain/
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The CLI runs inside an IDE/project and fetches those knowledge files into Cursor, Claude, or a generic `.ai` folder.
|
|
14
|
+
|
|
15
|
+
## Knowledge Sections
|
|
16
|
+
|
|
17
|
+
### Skills
|
|
18
|
+
|
|
19
|
+
A skill is a reusable workflow/capability package.
|
|
20
|
+
|
|
21
|
+
```txt
|
|
22
|
+
skills/frontend/app/
|
|
23
|
+
skill.json
|
|
24
|
+
SKILL.md
|
|
25
|
+
rules/
|
|
26
|
+
templates/
|
|
27
|
+
examples/
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Rules
|
|
31
|
+
|
|
32
|
+
A rule is a focused markdown file. All files use `.md`.
|
|
33
|
+
|
|
34
|
+
```txt
|
|
35
|
+
rules/frontend/antipattern.md
|
|
36
|
+
rules/frontend/component-standards.md
|
|
37
|
+
rules/backend/security.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Domain
|
|
41
|
+
|
|
42
|
+
Domain knowledge stores product, platform, business, or architecture context.
|
|
43
|
+
|
|
44
|
+
```txt
|
|
45
|
+
domain/frontend/web-app.md
|
|
46
|
+
domain/ott/video-cms.md
|
|
47
|
+
domain/bfsi/compliance.md
|
|
16
48
|
```
|
|
17
49
|
|
|
18
50
|
## Commands
|
|
@@ -24,54 +56,74 @@ Creates project-level SkillHub files:
|
|
|
24
56
|
```txt
|
|
25
57
|
skillhub.json
|
|
26
58
|
skillhub.lock.json
|
|
27
|
-
.
|
|
59
|
+
.cursor/skills/
|
|
60
|
+
.cursor/rules/
|
|
61
|
+
.cursor/domain/
|
|
28
62
|
```
|
|
29
63
|
|
|
30
|
-
|
|
64
|
+
Example:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
skillhub init --target cursor --registry https://skillhub.your-company.com
|
|
68
|
+
```
|
|
31
69
|
|
|
32
|
-
|
|
70
|
+
### Short Fetch Commands
|
|
33
71
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
6. Update `skillhub.json`.
|
|
40
|
-
7. Update `skillhub.lock.json` with version, source, checksum, and install path.
|
|
41
|
-
8. Update adapters such as `AGENTS.md` and `.cursor/rules/skillhub.mdc`.
|
|
72
|
+
```bash
|
|
73
|
+
skillhub skill frontend/app
|
|
74
|
+
skillhub rule frontend/antipattern
|
|
75
|
+
skillhub domain frontend/web-app
|
|
76
|
+
```
|
|
42
77
|
|
|
43
|
-
|
|
78
|
+
These are aliases for:
|
|
44
79
|
|
|
45
|
-
|
|
80
|
+
```bash
|
|
81
|
+
skillhub attach skill frontend/app
|
|
82
|
+
skillhub attach rule frontend/antipattern
|
|
83
|
+
skillhub attach domain frontend/web-app
|
|
84
|
+
```
|
|
46
85
|
|
|
47
|
-
|
|
86
|
+
The first path segment is treated as a registry/category identifier. For example, `frontend/antipattern` is fetched from the frontend rule namespace, but it installs locally as `antipattern.md`.
|
|
48
87
|
|
|
49
|
-
|
|
88
|
+
### `skillhub add`
|
|
50
89
|
|
|
51
|
-
|
|
90
|
+
With no arguments, restores/re-fetches all configured knowledge from `skillhub.json`. This is useful when local IDE files were deleted.
|
|
52
91
|
|
|
53
|
-
|
|
92
|
+
```bash
|
|
93
|
+
skillhub add
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
With arguments, it attaches one item, same as `install` or `attach`.
|
|
97
|
+
|
|
98
|
+
### `skillhub sync`
|
|
99
|
+
|
|
100
|
+
Re-fetches all configured knowledge from the registry/web app. `skillhub add` with no arguments uses the same restore behavior.
|
|
101
|
+
|
|
102
|
+
### `skillhub list`
|
|
54
103
|
|
|
55
|
-
|
|
104
|
+
Reads `skillhub.lock.json` and prints attached skills, rules, and domain files.
|
|
56
105
|
|
|
57
|
-
|
|
106
|
+
### `skillhub remove <section> <path>`
|
|
58
107
|
|
|
59
|
-
|
|
108
|
+
Removes attached knowledge and refreshes adapter files. You can remove by source path or local name.
|
|
60
109
|
|
|
61
|
-
|
|
110
|
+
```bash
|
|
111
|
+
skillhub remove rule frontend/antipattern
|
|
112
|
+
skillhub remove rule antipattern
|
|
113
|
+
```
|
|
62
114
|
|
|
63
115
|
### `skillhub generate <skill> <template> <name>`
|
|
64
116
|
|
|
65
|
-
Generates project files from an
|
|
117
|
+
Generates project files from an attached skill template.
|
|
66
118
|
|
|
67
119
|
Example:
|
|
68
120
|
|
|
69
121
|
```bash
|
|
70
|
-
skillhub
|
|
71
|
-
skillhub generate
|
|
122
|
+
skillhub skill frontend/app
|
|
123
|
+
skillhub generate frontend/app feature products --out src/features/products
|
|
72
124
|
```
|
|
73
125
|
|
|
74
|
-
Template files can use
|
|
126
|
+
Template files can use:
|
|
75
127
|
|
|
76
128
|
```txt
|
|
77
129
|
{{name}}
|
|
@@ -81,25 +133,20 @@ Template files can use variables like:
|
|
|
81
133
|
{{title}}
|
|
82
134
|
```
|
|
83
135
|
|
|
84
|
-
##
|
|
136
|
+
## Remote Web App Contract
|
|
137
|
+
|
|
138
|
+
Recommended endpoint:
|
|
85
139
|
|
|
86
140
|
```txt
|
|
87
|
-
skillhub
|
|
88
|
-
nextjs-clean-architecture/
|
|
89
|
-
1.0.0/
|
|
90
|
-
skill.json
|
|
91
|
-
SKILL.md
|
|
92
|
-
rules/
|
|
93
|
-
checklist/
|
|
141
|
+
GET /api/skillhub/:section/:path/:version
|
|
94
142
|
```
|
|
95
143
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
The CLI supports remote registries with this endpoint pattern:
|
|
144
|
+
Examples:
|
|
99
145
|
|
|
100
146
|
```txt
|
|
101
|
-
GET /
|
|
102
|
-
GET /skills
|
|
147
|
+
GET /api/skillhub/rules/frontend/antipattern/latest
|
|
148
|
+
GET /api/skillhub/skills/frontend/app/latest
|
|
149
|
+
GET /api/skillhub/domain/frontend/web-app/latest
|
|
103
150
|
```
|
|
104
151
|
|
|
105
152
|
Expected response:
|
|
@@ -107,62 +154,47 @@ Expected response:
|
|
|
107
154
|
```json
|
|
108
155
|
{
|
|
109
156
|
"manifest": {
|
|
110
|
-
"name": "
|
|
157
|
+
"name": "frontend/antipattern",
|
|
111
158
|
"version": "1.0.0",
|
|
112
|
-
"
|
|
159
|
+
"type": "rule",
|
|
160
|
+
"section": "rules",
|
|
161
|
+
"entry": "RULE.md"
|
|
113
162
|
},
|
|
114
163
|
"files": [
|
|
115
164
|
{
|
|
116
|
-
"path": "
|
|
117
|
-
"content": "#
|
|
165
|
+
"path": "RULE.md",
|
|
166
|
+
"content": "# Frontend Anti-Patterns\n..."
|
|
118
167
|
}
|
|
119
168
|
]
|
|
120
169
|
}
|
|
121
170
|
```
|
|
122
171
|
|
|
172
|
+
Fallback registry endpoint:
|
|
173
|
+
|
|
174
|
+
```txt
|
|
175
|
+
GET /:section/:path/:version
|
|
176
|
+
```
|
|
177
|
+
|
|
123
178
|
## Adapter Output
|
|
124
179
|
|
|
125
|
-
|
|
180
|
+
All generated adapter files use `.md`.
|
|
126
181
|
|
|
127
182
|
```txt
|
|
128
183
|
AGENTS.md
|
|
129
|
-
.cursor/rules/skillhub.
|
|
184
|
+
.cursor/rules/skillhub.md
|
|
130
185
|
CLAUDE.md
|
|
186
|
+
.claude/skillhub.md
|
|
131
187
|
.github/copilot-instructions.md
|
|
132
188
|
```
|
|
133
189
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
```json
|
|
137
|
-
{
|
|
138
|
-
"adapters": {
|
|
139
|
-
"agentsMd": true,
|
|
140
|
-
"cursorRules": true,
|
|
141
|
-
"claude": false,
|
|
142
|
-
"githubCopilot": false
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
## Target folders
|
|
149
|
-
|
|
150
|
-
SkillHub can install skill packages into different AI-tool folders instead of only `.ai/skills`.
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
skillhub init --target cursor
|
|
154
|
-
skillhub init --target claude
|
|
155
|
-
skillhub install nextjs-clean-architecture --target cursor
|
|
156
|
-
skillhub target claude
|
|
157
|
-
skillhub sync
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Supported targets:
|
|
190
|
+
## Target Folders
|
|
161
191
|
|
|
162
192
|
```txt
|
|
163
|
-
ai -> .ai/skills + AGENTS.md
|
|
164
|
-
cursor -> .cursor/skills + .cursor/rules/skillhub.
|
|
165
|
-
|
|
193
|
+
ai -> .ai/skills, .ai/rules, .ai/domain + AGENTS.md
|
|
194
|
+
cursor -> .cursor/skills, .cursor/rules, .cursor/domain + .cursor/rules/skillhub.md
|
|
195
|
+
source frontend/app installs as .cursor/skills/app
|
|
196
|
+
source frontend/antipattern installs as .cursor/rules/antipattern.md
|
|
197
|
+
claude -> .claude/skills, .claude/rules, .claude/domain + CLAUDE.md + .claude/skillhub.md
|
|
166
198
|
```
|
|
167
199
|
|
|
168
|
-
The CLI also accepts `cloude` as an alias for `claude
|
|
200
|
+
The CLI also accepts `cloude` as an alias for `claude`, because apparently typo tolerance is now innovation.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robosoft/skillhub-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "SkillHub CLI for fetching SkillHub web-app knowledge packages into IDE projects: skills, rules, and domain knowledge.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"skillhub": "./bin/skillhub.mjs"
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"start": "node ./bin/skillhub.mjs",
|
|
12
12
|
"test:help": "node ./bin/skillhub.mjs --help",
|
|
13
13
|
"demo:init": "node ./bin/skillhub.mjs init",
|
|
14
|
-
"demo:install": "node ./bin/skillhub.mjs
|
|
14
|
+
"demo:install": "node ./bin/skillhub.mjs skill frontend-app --registry ./skillhub-registry",
|
|
15
15
|
"demo:list": "node ./bin/skillhub.mjs list",
|
|
16
|
-
"demo:validate": "node ./bin/skillhub.mjs validate
|
|
16
|
+
"demo:validate": "node ./bin/skillhub.mjs validate skill frontend-app --registry ./skillhub-registry",
|
|
17
17
|
"prepublishOnly": "node ./bin/skillhub.mjs --help",
|
|
18
18
|
"pack:dry-run": "npm pack --dry-run",
|
|
19
19
|
"publish:public": "npm publish --access public"
|
|
@@ -37,7 +37,10 @@
|
|
|
37
37
|
"cursor",
|
|
38
38
|
"claude",
|
|
39
39
|
"developer-tools",
|
|
40
|
-
"templates"
|
|
40
|
+
"templates",
|
|
41
|
+
"rules",
|
|
42
|
+
"domain-knowledge",
|
|
43
|
+
"agent-skills"
|
|
41
44
|
],
|
|
42
45
|
"author": "Vikram Rajput",
|
|
43
46
|
"license": "MIT",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this template are documented here.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `install.sh` — automated symlink installation script with smart detection of existing files (already-correct symlinks are left alone; foreign symlinks prompt before replace; real files are backed up to `<name>.backup-YYYYMMDD-HHMMSS` before being replaced).
|
|
14
|
+
- `uninstall.sh` — companion script that removes only the symlinks created by `install.sh`. Real files and symlinks pointing to other templates are left untouched. Reports any `*.backup-*` files found in `~/.claude/` without auto-restoring them.
|
|
15
|
+
- skills/react/SKILL.md: Service Layer Separation, expanded Forms, Accessibility, and Responsive Design sections (absorbed from team's Cursor rule)
|
|
16
|
+
- rules/code-standards.md: Environment Variables and Secrets section
|
|
17
|
+
- rules/code-standards.md: Logging section
|
|
18
|
+
- domain/frontend-architecture.md: feature-based folder structure standard for tech-enabled projects
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- `README.md` Quick Install section now uses `./install.sh` instead of manual `ln -s` commands.
|
|
23
|
+
- `docs/installation.md` reorganized to three methods: Method 1 (install script, recommended), Method 2 (manual symlink, advanced), Method 3 (direct copy). The Updating, Uninstalling, and Troubleshooting sections were updated to reference the new scripts.
|
|
24
|
+
|
|
25
|
+
### Deprecated
|
|
26
|
+
|
|
27
|
+
### Removed
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
### Security
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## [0.1.0] - 2026-05-06
|
|
36
|
+
|
|
37
|
+
Initial pilot release.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- `CLAUDE.md` entry point with `@import` auto-loading of the three always-on rule files.
|
|
42
|
+
- `rules/general.md` — universal coding foundations (match codebase style, no hallucinated APIs, ask one clarifying question, prefer simplest solution, scope discipline).
|
|
43
|
+
- `rules/code-standards.md` — concrete cross-language standards (function size, nesting depth, naming, magic values, error handling, side effects, duplication, comments, imports, file organization).
|
|
44
|
+
- `rules/anti-patterns.md` — eleven cross-language anti-patterns with rationale and remediation.
|
|
45
|
+
- `skills/api/SKILL.md` — universal API design and implementation standards.
|
|
46
|
+
- `skills/build/SKILL.md` — structured implementation workflow for new code.
|
|
47
|
+
- `skills/fast/SKILL.md` — fast-mode behavior for prototyping and rapid iteration.
|
|
48
|
+
- `skills/feature-dev/SKILL.md` — end-to-end feature development workflow.
|
|
49
|
+
- `skills/performance/SKILL.md` — performance optimization standards (measure first, then optimize).
|
|
50
|
+
- `skills/react/SKILL.md` — React-specific component, hook, and rendering standards.
|
|
51
|
+
- `skills/refactor/SKILL.md` — behavior-preserving restructuring workflow.
|
|
52
|
+
- `skills/review/SKILL.md` — prioritized code critique workflow.
|
|
53
|
+
- `skills/strict/SKILL.md` — strict-mode behavior for production-rigor work.
|
|
54
|
+
- `skills/testing/SKILL.md` — test writing, mocking, and coverage standards.
|
|
55
|
+
- `domain/api.md` — placeholder template for org-specific API conventions (envelope shape, auth, pagination, etc.).
|
|
56
|
+
- `README.md` — overview, installation summary, structure reference, slash-command listing.
|
|
57
|
+
- `docs/cost-hygiene.md` — pricing model explanation and the six habits for predictable token cost.
|
|
58
|
+
- `docs/installation.md` — detailed install steps (symlink and direct-copy methods), per-project setup, verification, troubleshooting, updating, uninstalling, and Claude.ai fallback.
|
|
59
|
+
|
|
60
|
+
### Notes
|
|
61
|
+
|
|
62
|
+
- Initial pilot release, owned and maintained solo by Raj Shah.
|
|
63
|
+
- Frontend/React-focused; other tech stacks (Python, Go, mobile, etc.) to follow in future releases.
|
|
64
|
+
- Additional onboarding docs (`contributing.md`, `customization.md`, `exception-process.md`) referenced in `README.md` are not yet published and will arrive in a later release.
|
|
65
|
+
- During pilot, rules and skills may change frequently; minor- and patch-version bumps are expected to be common.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Claude Coding Template
|
|
2
|
+
|
|
3
|
+
**Version:** 0.1.0 (pilot)
|
|
4
|
+
**Last updated:** 2026-05-06
|
|
5
|
+
**Owner:** [Your name / team]
|
|
6
|
+
|
|
7
|
+
This is the entry point for the org's Claude coding rules. It is loaded automatically by Claude Code at the start of every session and tells Claude how to behave on coding tasks.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## How To Use This Template
|
|
12
|
+
|
|
13
|
+
### For developers using this template
|
|
14
|
+
1. Install per `docs/installation.md` (one-time setup).
|
|
15
|
+
2. Work normally. The rules apply automatically.
|
|
16
|
+
3. Use slash commands for specific workflows: `/build`, `/refactor`, `/review`, `/fast`, `/strict`.
|
|
17
|
+
4. To request a rule change or exception, see `docs/exception-process.md`.
|
|
18
|
+
|
|
19
|
+
### For Claude (instructions below this line)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Operating Principles
|
|
24
|
+
|
|
25
|
+
You are a senior software engineer assisting a developer at this organization. You follow the org's coding standards strictly but pragmatically.
|
|
26
|
+
|
|
27
|
+
### Always-On Rules (auto-loaded every session)
|
|
28
|
+
|
|
29
|
+
The following rule files are loaded automatically into every session via `@import`. They are non-negotiable defaults. Exceptions require explicit reasoning and should follow `docs/exception-process.md`.
|
|
30
|
+
|
|
31
|
+
@rules/general.md
|
|
32
|
+
@rules/code-standards.md
|
|
33
|
+
@rules/anti-patterns.md
|
|
34
|
+
|
|
35
|
+
**For developers:** Do not edit these files mid-session — it invalidates the cache. See `docs/cost-hygiene.md`.
|
|
36
|
+
|
|
37
|
+
### Conditional Skills (load when relevant)
|
|
38
|
+
|
|
39
|
+
These skills auto-load by topic match — Claude Code triggers them based on each skill's frontmatter description. You don't need to invoke them manually for them to work.
|
|
40
|
+
|
|
41
|
+
- **`skills/api/SKILL.md`** — universal API design (REST, GraphQL, RPC, error shapes, pagination, etc.)
|
|
42
|
+
- **`skills/performance/SKILL.md`** — performance optimization, profiling, bottleneck diagnosis
|
|
43
|
+
- **`skills/react/SKILL.md`** — React, JSX/TSX, hooks, components, React-related libraries
|
|
44
|
+
- **`skills/testing/SKILL.md`** — writing, modifying, or evaluating tests
|
|
45
|
+
- **`domain/api.md`** — our org's specific API conventions (loaded alongside the API skill in our codebases)
|
|
46
|
+
|
|
47
|
+
### Behavior Modes (user-invoked)
|
|
48
|
+
|
|
49
|
+
The user may invoke a mode that adjusts your behavior:
|
|
50
|
+
|
|
51
|
+
- **`/fast`** — prioritize speed over polish; minimal explanation; skip non-critical refactoring
|
|
52
|
+
- **`/strict`** — apply rules with full rigor; flag every violation; prefer robust over quick
|
|
53
|
+
|
|
54
|
+
If no mode is invoked, default to balanced behavior — neither rushed nor exhaustive.
|
|
55
|
+
|
|
56
|
+
### Action Skills (invoke explicitly via slash commands)
|
|
57
|
+
|
|
58
|
+
These skills produce structured workflows when invoked:
|
|
59
|
+
|
|
60
|
+
- **`/build`** — `skills/build/SKILL.md` — structured implementation flow for new code
|
|
61
|
+
- **`/refactor`** — `skills/refactor/SKILL.md` — restructure existing code without changing behavior
|
|
62
|
+
- **`/review`** — `skills/review/SKILL.md` — critique code with prioritized findings
|
|
63
|
+
- **`/feature-dev`** — `skills/feature-dev/SKILL.md` — end-to-end feature development across multiple phases
|
|
64
|
+
|
|
65
|
+
### Behavior Modes (toggle Claude's rigor level)
|
|
66
|
+
|
|
67
|
+
These skills adjust how strictly the rules apply:
|
|
68
|
+
|
|
69
|
+
- **`/fast`** — `skills/fast/SKILL.md` — speed over polish, for prototyping only
|
|
70
|
+
- **`/strict`** — `skills/strict/SKILL.md` — maximum rigor, for production code
|
|
71
|
+
|
|
72
|
+
If no mode is invoked, default to balanced behavior — neither rushed nor exhaustive.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Default Behavior
|
|
77
|
+
|
|
78
|
+
When the user gives a coding task without specifying a mode or skill:
|
|
79
|
+
|
|
80
|
+
1. **Read the relevant rule files** listed above.
|
|
81
|
+
2. **Identify the task type** (build, refactor, review, explain).
|
|
82
|
+
3. **Detect the domain** (React, API, general). Load the matching skill if any.
|
|
83
|
+
4. **If anything is ambiguous**, ask one clarifying question before coding.
|
|
84
|
+
5. **Apply the rules** while producing the output.
|
|
85
|
+
6. **State any rule deviations explicitly** with a brief reason.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Output Conventions
|
|
90
|
+
|
|
91
|
+
- Default to code only — no preamble, no closing summary.
|
|
92
|
+
- Add explanation only when (a) the user asks, (b) you made a non-obvious decision, or (c) you're uncertain.
|
|
93
|
+
- For reviews and analyses, use structured sections (Critical / Improvements / Minor).
|
|
94
|
+
- When you skip a rule, state which rule and why in one short line.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## When You're Uncertain
|
|
99
|
+
|
|
100
|
+
State uncertainty explicitly. A confident wrong answer wastes more time than an honest "I don't know — can you confirm X?"
|
|
101
|
+
|
|
102
|
+
Never invent APIs, libraries, function signatures, or syntax. If you're unsure something exists, ask.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Versioning
|
|
107
|
+
|
|
108
|
+
Changes to this template follow `CHANGELOG.md`. Breaking changes (rule removals, behavior shifts) bump the minor version. Additions and clarifications bump the patch version.
|