@cloudstreamsoftware/claude-tools 1.0.0 → 1.2.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.
- package/README.md +152 -37
- package/agents/INDEX.md +183 -0
- package/agents/architect.md +247 -0
- package/agents/build-error-resolver.md +555 -0
- package/agents/catalyst-deployer.md +132 -0
- package/agents/code-reviewer.md +121 -0
- package/agents/compliance-auditor.md +148 -0
- package/agents/creator-architect.md +395 -0
- package/agents/deluge-reviewer.md +98 -0
- package/agents/doc-updater.md +471 -0
- package/agents/e2e-runner.md +711 -0
- package/agents/planner.md +122 -0
- package/agents/refactor-cleaner.md +309 -0
- package/agents/security-reviewer.md +582 -0
- package/agents/tdd-guide.md +302 -0
- package/bin/cloudstream-setup.js +16 -6
- package/config/versions.json +63 -0
- package/dist/hooks/hooks.json +209 -0
- package/dist/index.js +47 -0
- package/dist/lib/asset-value.js +609 -0
- package/dist/lib/client-manager.js +300 -0
- package/dist/lib/command-matcher.js +242 -0
- package/dist/lib/cross-session-patterns.js +754 -0
- package/dist/lib/intent-classifier.js +1075 -0
- package/dist/lib/package-manager.js +374 -0
- package/dist/lib/recommendation-engine.js +597 -0
- package/dist/lib/session-memory.js +489 -0
- package/dist/lib/skill-effectiveness.js +486 -0
- package/dist/lib/skill-matcher.js +595 -0
- package/dist/lib/tutorial-metrics.js +242 -0
- package/dist/lib/tutorial-progress.js +209 -0
- package/dist/lib/tutorial-renderer.js +431 -0
- package/dist/lib/utils.js +380 -0
- package/dist/lib/verify-formatter.js +143 -0
- package/dist/lib/workflow-state.js +249 -0
- package/hooks/hooks.json +209 -0
- package/package.json +5 -1
- package/scripts/aggregate-sessions.js +290 -0
- package/scripts/branch-name-validator.js +291 -0
- package/scripts/build.js +101 -0
- package/scripts/commands/client-switch.js +231 -0
- package/scripts/deprecate-skill.js +610 -0
- package/scripts/diagnose.js +324 -0
- package/scripts/doc-freshness.js +168 -0
- package/scripts/generate-weekly-digest.js +393 -0
- package/scripts/health-check.js +270 -0
- package/scripts/hooks/credential-check.js +101 -0
- package/scripts/hooks/evaluate-session.js +81 -0
- package/scripts/hooks/pre-compact.js +66 -0
- package/scripts/hooks/prompt-analyzer.js +276 -0
- package/scripts/hooks/prompt-router.js +422 -0
- package/scripts/hooks/quality-gate-enforcer.js +371 -0
- package/scripts/hooks/session-end.js +156 -0
- package/scripts/hooks/session-start.js +195 -0
- package/scripts/hooks/skill-injector.js +333 -0
- package/scripts/hooks/suggest-compact.js +58 -0
- package/scripts/lib/asset-value.js +609 -0
- package/scripts/lib/client-manager.js +300 -0
- package/scripts/lib/command-matcher.js +242 -0
- package/scripts/lib/cross-session-patterns.js +754 -0
- package/scripts/lib/intent-classifier.js +1075 -0
- package/scripts/lib/package-manager.js +374 -0
- package/scripts/lib/recommendation-engine.js +597 -0
- package/scripts/lib/session-memory.js +489 -0
- package/scripts/lib/skill-effectiveness.js +486 -0
- package/scripts/lib/skill-matcher.js +595 -0
- package/scripts/lib/tutorial-metrics.js +242 -0
- package/scripts/lib/tutorial-progress.js +209 -0
- package/scripts/lib/tutorial-renderer.js +431 -0
- package/scripts/lib/utils.js +380 -0
- package/scripts/lib/verify-formatter.js +143 -0
- package/scripts/lib/workflow-state.js +249 -0
- package/scripts/onboard.js +363 -0
- package/scripts/quarterly-report.js +692 -0
- package/scripts/setup-package-manager.js +204 -0
- package/scripts/sync-upstream.js +391 -0
- package/scripts/test.js +108 -0
- package/scripts/tutorial-runner.js +351 -0
- package/scripts/validate-all.js +201 -0
- package/scripts/verifiers/agents.js +245 -0
- package/scripts/verifiers/config.js +186 -0
- package/scripts/verifiers/environment.js +123 -0
- package/scripts/verifiers/hooks.js +188 -0
- package/scripts/verifiers/index.js +38 -0
- package/scripts/verifiers/persistence.js +140 -0
- package/scripts/verifiers/plugin.js +215 -0
- package/scripts/verifiers/skills.js +209 -0
- package/scripts/verify-setup.js +164 -0
- package/skills/INDEX.md +157 -0
- package/skills/backend-patterns/SKILL.md +586 -0
- package/skills/backend-patterns/catalyst-patterns.md +128 -0
- package/skills/bigquery-patterns/SKILL.md +27 -0
- package/skills/bigquery-patterns/performance-optimization.md +518 -0
- package/skills/bigquery-patterns/query-patterns.md +372 -0
- package/skills/bigquery-patterns/schema-design.md +78 -0
- package/skills/cloudstream-project-template/SKILL.md +20 -0
- package/skills/cloudstream-project-template/structure.md +65 -0
- package/skills/coding-standards/SKILL.md +524 -0
- package/skills/coding-standards/deluge-standards.md +83 -0
- package/skills/compliance-patterns/SKILL.md +28 -0
- package/skills/compliance-patterns/hipaa/audit-requirements.md +251 -0
- package/skills/compliance-patterns/hipaa/baa-process.md +298 -0
- package/skills/compliance-patterns/hipaa/data-archival-strategy.md +387 -0
- package/skills/compliance-patterns/hipaa/phi-handling.md +52 -0
- package/skills/compliance-patterns/pci-dss/saq-a-requirements.md +307 -0
- package/skills/compliance-patterns/pci-dss/tokenization-patterns.md +382 -0
- package/skills/compliance-patterns/pci-dss/zoho-checkout-patterns.md +56 -0
- package/skills/compliance-patterns/soc2/access-controls.md +344 -0
- package/skills/compliance-patterns/soc2/audit-logging.md +458 -0
- package/skills/compliance-patterns/soc2/change-management.md +403 -0
- package/skills/compliance-patterns/soc2/deluge-execution-logging.md +407 -0
- package/skills/consultancy-workflows/SKILL.md +19 -0
- package/skills/consultancy-workflows/client-isolation.md +21 -0
- package/skills/consultancy-workflows/documentation-automation.md +454 -0
- package/skills/consultancy-workflows/handoff-procedures.md +257 -0
- package/skills/consultancy-workflows/knowledge-capture.md +513 -0
- package/skills/consultancy-workflows/time-tracking.md +26 -0
- package/skills/continuous-learning/SKILL.md +84 -0
- package/skills/continuous-learning/config.json +18 -0
- package/skills/continuous-learning/evaluate-session.sh +60 -0
- package/skills/continuous-learning-v2/SKILL.md +126 -0
- package/skills/continuous-learning-v2/config.json +61 -0
- package/skills/frontend-patterns/SKILL.md +635 -0
- package/skills/frontend-patterns/zoho-widget-patterns.md +103 -0
- package/skills/gcp-data-engineering/SKILL.md +36 -0
- package/skills/gcp-data-engineering/bigquery/performance-optimization.md +337 -0
- package/skills/gcp-data-engineering/dataflow/error-handling.md +496 -0
- package/skills/gcp-data-engineering/dataflow/pipeline-patterns.md +444 -0
- package/skills/gcp-data-engineering/dbt/model-organization.md +63 -0
- package/skills/gcp-data-engineering/dbt/testing-patterns.md +503 -0
- package/skills/gcp-data-engineering/medallion-architecture/bronze-layer.md +60 -0
- package/skills/gcp-data-engineering/medallion-architecture/gold-layer.md +311 -0
- package/skills/gcp-data-engineering/medallion-architecture/layer-transitions.md +517 -0
- package/skills/gcp-data-engineering/medallion-architecture/silver-layer.md +305 -0
- package/skills/gcp-data-engineering/zoho-to-gcp/data-extraction.md +543 -0
- package/skills/gcp-data-engineering/zoho-to-gcp/real-time-vs-batch.md +337 -0
- package/skills/security-review/SKILL.md +498 -0
- package/skills/security-review/compliance-checklist.md +53 -0
- package/skills/strategic-compact/SKILL.md +67 -0
- package/skills/tdd-workflow/SKILL.md +413 -0
- package/skills/tdd-workflow/zoho-testing.md +124 -0
- package/skills/tutorial/SKILL.md +249 -0
- package/skills/tutorial/docs/ACCESSIBILITY.md +169 -0
- package/skills/tutorial/lessons/00-philosophy-and-workflow.md +198 -0
- package/skills/tutorial/lessons/01-basics.md +81 -0
- package/skills/tutorial/lessons/02-training.md +86 -0
- package/skills/tutorial/lessons/03-commands.md +109 -0
- package/skills/tutorial/lessons/04-workflows.md +115 -0
- package/skills/tutorial/lessons/05-compliance.md +116 -0
- package/skills/tutorial/lessons/06-zoho.md +121 -0
- package/skills/tutorial/lessons/07-hooks-system.md +277 -0
- package/skills/tutorial/lessons/08-mcp-servers.md +316 -0
- package/skills/tutorial/lessons/09-client-management.md +215 -0
- package/skills/tutorial/lessons/10-testing-e2e.md +260 -0
- package/skills/tutorial/lessons/11-skills-deep-dive.md +272 -0
- package/skills/tutorial/lessons/12-rules-system.md +326 -0
- package/skills/tutorial/lessons/13-golden-standard-graduation.md +213 -0
- package/skills/tutorial/lessons/14-fork-setup-and-sync.md +312 -0
- package/skills/tutorial/lessons/15-living-examples-system.md +221 -0
- package/skills/tutorial/tracks/accelerated/README.md +134 -0
- package/skills/tutorial/tracks/accelerated/assessment/checkpoint-1.md +161 -0
- package/skills/tutorial/tracks/accelerated/assessment/checkpoint-2.md +175 -0
- package/skills/tutorial/tracks/accelerated/day-1-core-concepts.md +234 -0
- package/skills/tutorial/tracks/accelerated/day-2-essential-commands.md +270 -0
- package/skills/tutorial/tracks/accelerated/day-3-workflow-mastery.md +305 -0
- package/skills/tutorial/tracks/accelerated/day-4-compliance-zoho.md +304 -0
- package/skills/tutorial/tracks/accelerated/day-5-hooks-skills.md +344 -0
- package/skills/tutorial/tracks/accelerated/day-6-client-testing.md +386 -0
- package/skills/tutorial/tracks/accelerated/day-7-graduation.md +369 -0
- package/skills/zoho-patterns/CHANGELOG.md +108 -0
- package/skills/zoho-patterns/SKILL.md +446 -0
- package/skills/zoho-patterns/analytics/dashboard-patterns.md +352 -0
- package/skills/zoho-patterns/analytics/zoho-to-bigquery-pipeline.md +427 -0
- package/skills/zoho-patterns/catalyst/appsail-deployment.md +349 -0
- package/skills/zoho-patterns/catalyst/context-close-patterns.md +354 -0
- package/skills/zoho-patterns/catalyst/cron-batch-processing.md +374 -0
- package/skills/zoho-patterns/catalyst/function-patterns.md +439 -0
- package/skills/zoho-patterns/creator/form-design.md +304 -0
- package/skills/zoho-patterns/creator/publish-api-patterns.md +313 -0
- package/skills/zoho-patterns/creator/widget-integration.md +306 -0
- package/skills/zoho-patterns/creator/workflow-automation.md +253 -0
- package/skills/zoho-patterns/deluge/api-patterns.md +468 -0
- package/skills/zoho-patterns/deluge/batch-processing.md +403 -0
- package/skills/zoho-patterns/deluge/cross-app-integration.md +356 -0
- package/skills/zoho-patterns/deluge/error-handling.md +423 -0
- package/skills/zoho-patterns/deluge/syntax-reference.md +65 -0
- package/skills/zoho-patterns/integration/cors-proxy-architecture.md +426 -0
- package/skills/zoho-patterns/integration/crm-books-native-sync.md +277 -0
- package/skills/zoho-patterns/integration/oauth-token-management.md +461 -0
- package/skills/zoho-patterns/integration/zoho-flow-patterns.md +334 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# Lesson 11: Skills Deep Dive
|
|
2
|
+
|
|
3
|
+
Skills are reusable knowledge packages that inform how Claude approaches specific domains.
|
|
4
|
+
|
|
5
|
+
## Concept
|
|
6
|
+
|
|
7
|
+
The system includes 16 skills across 5 categories:
|
|
8
|
+
|
|
9
|
+
| Category | Skills | Purpose |
|
|
10
|
+
|----------|--------|---------|
|
|
11
|
+
| **Development** | 4 skills | Coding patterns, testing, frontend, backend |
|
|
12
|
+
| **Quality** | 1 skill | Security review and vulnerability detection |
|
|
13
|
+
| **Platform** | 3 skills | Zoho, BigQuery, GCP data engineering |
|
|
14
|
+
| **Compliance** | 1 skill | HIPAA, SOC2, PCI-DSS patterns |
|
|
15
|
+
| **Process** | 7 skills | Workflows, templates, learning (v1 + v2), compaction |
|
|
16
|
+
|
|
17
|
+
## Why This Matters
|
|
18
|
+
|
|
19
|
+
Skills provide:
|
|
20
|
+
1. **Consistent patterns** - Same approach regardless of who's working
|
|
21
|
+
2. **Domain expertise** - Deep knowledge embedded in the system
|
|
22
|
+
3. **Teachable patterns** - New team members learn through skills
|
|
23
|
+
4. **Extensibility** - Add new skills without modifying core system
|
|
24
|
+
|
|
25
|
+
When an agent works on a task, it consults relevant skills for guidance.
|
|
26
|
+
|
|
27
|
+
## The 15 Skills
|
|
28
|
+
|
|
29
|
+
### Development Skills (4)
|
|
30
|
+
|
|
31
|
+
| Skill | Location | Purpose |
|
|
32
|
+
|-------|----------|---------|
|
|
33
|
+
| **coding-standards** | `skills/coding-standards/` | JS/TS/Deluge style guides, naming conventions |
|
|
34
|
+
| **tdd-workflow** | `skills/tdd-workflow/` | Test-driven development patterns (RED/GREEN/REFACTOR) |
|
|
35
|
+
| **backend-patterns** | `skills/backend-patterns/` | Node.js, Express, Catalyst function patterns |
|
|
36
|
+
| **frontend-patterns** | `skills/frontend-patterns/` | React, Next.js, Widget development patterns |
|
|
37
|
+
|
|
38
|
+
### Quality Skills (1)
|
|
39
|
+
|
|
40
|
+
| Skill | Location | Purpose |
|
|
41
|
+
|-------|----------|---------|
|
|
42
|
+
| **security-review** | `skills/security-review/` | OWASP Top 10, vulnerability detection patterns |
|
|
43
|
+
|
|
44
|
+
### Platform Skills (3)
|
|
45
|
+
|
|
46
|
+
| Skill | Location | Purpose |
|
|
47
|
+
|-------|----------|---------|
|
|
48
|
+
| **zoho-patterns** | `skills/zoho-patterns/` | Creator, Catalyst, Deluge, Analytics patterns |
|
|
49
|
+
| **bigquery-patterns** | `skills/bigquery-patterns/` | Data warehouse queries, optimization, partitioning |
|
|
50
|
+
| **gcp-data-engineering** | `skills/gcp-data-engineering/` | Medallion architecture, Dataflow, dbt patterns |
|
|
51
|
+
|
|
52
|
+
### Compliance Skill (1)
|
|
53
|
+
|
|
54
|
+
| Skill | Location | Purpose |
|
|
55
|
+
|-------|----------|---------|
|
|
56
|
+
| **compliance-patterns** | `skills/compliance-patterns/` | HIPAA audit logging, SOC2 change management, PCI tokenization |
|
|
57
|
+
|
|
58
|
+
### Process Skills (6)
|
|
59
|
+
|
|
60
|
+
| Skill | Location | Purpose |
|
|
61
|
+
|-------|----------|---------|
|
|
62
|
+
| **consultancy-workflows** | `skills/consultancy-workflows/` | Client isolation, handoff, time tracking |
|
|
63
|
+
| **cloudstream-project-template** | `skills/cloudstream-project-template/` | Project structure standards |
|
|
64
|
+
| **tutorial** | `skills/tutorial/` | This tutorial system |
|
|
65
|
+
| **strategic-compact** | `skills/strategic-compact/` | Context management, compaction triggers |
|
|
66
|
+
| **continuous-learning** | `skills/continuous-learning/` | Pattern extraction from sessions |
|
|
67
|
+
| **continuous-learning-v2** | `skills/continuous-learning-v2/` | Instinct-based learning with confidence scoring |
|
|
68
|
+
|
|
69
|
+
## Skill Anatomy
|
|
70
|
+
|
|
71
|
+
Every skill has a `SKILL.md` file with this structure:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
---
|
|
75
|
+
name: skill-name
|
|
76
|
+
description: One-line description
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
# Skill Title
|
|
80
|
+
|
|
81
|
+
## When to Activate
|
|
82
|
+
- Trigger conditions for this skill
|
|
83
|
+
|
|
84
|
+
## Core Patterns
|
|
85
|
+
- Key patterns and approaches
|
|
86
|
+
|
|
87
|
+
## Anti-Patterns
|
|
88
|
+
- What NOT to do
|
|
89
|
+
|
|
90
|
+
## Examples
|
|
91
|
+
- Practical demonstrations
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Skills can also have subdirectories for complex domains:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
skills/zoho-patterns/
|
|
98
|
+
├── SKILL.md # Main skill definition
|
|
99
|
+
├── creator/ # Creator-specific patterns
|
|
100
|
+
│ ├── forms.md
|
|
101
|
+
│ └── workflows.md
|
|
102
|
+
├── catalyst/ # Catalyst-specific patterns
|
|
103
|
+
│ └── functions.md
|
|
104
|
+
├── deluge/ # Deluge-specific patterns
|
|
105
|
+
│ ├── syntax.md
|
|
106
|
+
│ └── gotchas.md
|
|
107
|
+
└── integrations/ # Cross-platform patterns
|
|
108
|
+
└── crm-books.md
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Skill-Agent Relationships
|
|
112
|
+
|
|
113
|
+
Skills inform agents. Here's which skills support which agents:
|
|
114
|
+
|
|
115
|
+
| Agent | Primary Skills |
|
|
116
|
+
|-------|---------------|
|
|
117
|
+
| **planner** | All skills (for comprehensive planning) |
|
|
118
|
+
| **architect** | cloudstream-project-template, backend-patterns, frontend-patterns |
|
|
119
|
+
| **tdd-guide** | tdd-workflow, coding-standards |
|
|
120
|
+
| **code-reviewer** | coding-standards, security-review |
|
|
121
|
+
| **security-reviewer** | security-review, compliance-patterns |
|
|
122
|
+
| **compliance-auditor** | compliance-patterns |
|
|
123
|
+
| **deluge-reviewer** | zoho-patterns/deluge |
|
|
124
|
+
| **creator-architect** | zoho-patterns/creator |
|
|
125
|
+
| **catalyst-deployer** | zoho-patterns/catalyst, backend-patterns |
|
|
126
|
+
| **doc-updater** | consultancy-workflows |
|
|
127
|
+
| **e2e-runner** | tdd-workflow, coding-standards |
|
|
128
|
+
| **refactor-cleaner** | coding-standards |
|
|
129
|
+
| **build-error-resolver** | backend-patterns, coding-standards |
|
|
130
|
+
|
|
131
|
+
## Exercise
|
|
132
|
+
|
|
133
|
+
### Exercise 11.1: Explore Skill Structure
|
|
134
|
+
|
|
135
|
+
**Step 1**: List all skills:
|
|
136
|
+
```bash
|
|
137
|
+
ls skills/
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
You should see 16+ directories (15 active skills + tutorial + archived).
|
|
141
|
+
|
|
142
|
+
**Step 2**: Read a skill file:
|
|
143
|
+
```bash
|
|
144
|
+
cat skills/zoho-patterns/SKILL.md
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Notice the structure:
|
|
148
|
+
- Frontmatter with name and description
|
|
149
|
+
- When to Activate section
|
|
150
|
+
- Core Patterns
|
|
151
|
+
- Anti-Patterns
|
|
152
|
+
|
|
153
|
+
**Step 3**: Explore skill subdirectories:
|
|
154
|
+
```bash
|
|
155
|
+
ls skills/zoho-patterns/
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Complex skills have subfolders for different aspects.
|
|
159
|
+
|
|
160
|
+
### Exercise 11.2: Count Skill Files
|
|
161
|
+
|
|
162
|
+
**Step 1**: Count all pattern files:
|
|
163
|
+
```bash
|
|
164
|
+
find skills -name "*.md" | wc -l
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Step 2**: This tells you how much knowledge is embedded in the system.
|
|
168
|
+
|
|
169
|
+
### Exercise 11.3: Find Skill Coverage
|
|
170
|
+
|
|
171
|
+
**Step 1**: Pick a domain you work in (e.g., compliance):
|
|
172
|
+
```bash
|
|
173
|
+
cat skills/compliance-patterns/SKILL.md
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Step 2**: Look at subdirectories:
|
|
177
|
+
```bash
|
|
178
|
+
ls skills/compliance-patterns/
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Step 3**: Read specific patterns:
|
|
182
|
+
```bash
|
|
183
|
+
cat skills/compliance-patterns/hipaa/phi-handling.md
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
(Path may vary based on actual structure)
|
|
187
|
+
|
|
188
|
+
## Verification
|
|
189
|
+
|
|
190
|
+
You've completed this exercise successfully if:
|
|
191
|
+
- [ ] You can list all 15 active skills
|
|
192
|
+
- [ ] You understand the SKILL.md format
|
|
193
|
+
- [ ] You know which skills inform which agents
|
|
194
|
+
- [ ] You explored at least one skill's subdirectory structure
|
|
195
|
+
|
|
196
|
+
## Skills Quick Reference
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
DEVELOPMENT:
|
|
200
|
+
coding-standards - Style guides, naming
|
|
201
|
+
tdd-workflow - RED/GREEN/REFACTOR
|
|
202
|
+
backend-patterns - Node.js, Catalyst
|
|
203
|
+
frontend-patterns - React, Widgets
|
|
204
|
+
|
|
205
|
+
QUALITY:
|
|
206
|
+
security-review - OWASP, vulnerabilities
|
|
207
|
+
|
|
208
|
+
PLATFORM:
|
|
209
|
+
zoho-patterns - Creator/Catalyst/Deluge
|
|
210
|
+
bigquery-patterns - Data warehouse
|
|
211
|
+
gcp-data-engineering - Medallion architecture
|
|
212
|
+
|
|
213
|
+
COMPLIANCE:
|
|
214
|
+
compliance-patterns - HIPAA/SOC2/PCI-DSS
|
|
215
|
+
|
|
216
|
+
PROCESS:
|
|
217
|
+
consultancy-workflows - Client isolation
|
|
218
|
+
cloudstream-project-template - Project structure
|
|
219
|
+
tutorial - This system
|
|
220
|
+
strategic-compact - Context management
|
|
221
|
+
continuous-learning - Pattern extraction
|
|
222
|
+
continuous-learning-v2 - Enhanced pattern extraction
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Creating Custom Skills
|
|
226
|
+
|
|
227
|
+
To add a new skill:
|
|
228
|
+
|
|
229
|
+
**Step 1**: Create folder:
|
|
230
|
+
```bash
|
|
231
|
+
mkdir skills/your-skill
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Step 2**: Create SKILL.md with frontmatter:
|
|
235
|
+
```markdown
|
|
236
|
+
---
|
|
237
|
+
name: your-skill
|
|
238
|
+
description: One-line description of the skill
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
# Your Skill Title
|
|
242
|
+
|
|
243
|
+
## When to Activate
|
|
244
|
+
- Condition 1
|
|
245
|
+
- Condition 2
|
|
246
|
+
|
|
247
|
+
## Core Patterns
|
|
248
|
+
- Pattern 1
|
|
249
|
+
- Pattern 2
|
|
250
|
+
|
|
251
|
+
## Anti-Patterns
|
|
252
|
+
- What to avoid
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Step 3**: Add pattern files in subfolders as needed.
|
|
256
|
+
|
|
257
|
+
**Step 4**: Reference from agents that should use it.
|
|
258
|
+
|
|
259
|
+
## Key Takeaway
|
|
260
|
+
|
|
261
|
+
Skills are the knowledge base. They encode patterns, standards, and domain expertise that agents use to produce consistent, high-quality work. The 16 active skills cover development, quality, platforms, compliance, and process.
|
|
262
|
+
|
|
263
|
+
## Next Steps
|
|
264
|
+
|
|
265
|
+
In Lesson 12, you'll learn about the Rules System - how behavioral constraints are loaded and applied.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
**Skills indexed**: 16 active skills across 5 categories
|
|
270
|
+
**Key pattern**: `skills/{skill-name}/SKILL.md`
|
|
271
|
+
**Agent relationship**: Skills inform how agents work
|
|
272
|
+
**Progress**: 12 of 15 lessons complete
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# Lesson 12: Rules System
|
|
2
|
+
|
|
3
|
+
Rules define behavioral constraints and patterns that Claude follows during execution.
|
|
4
|
+
|
|
5
|
+
## Concept
|
|
6
|
+
|
|
7
|
+
Rules are markdown files in `rules/` that set behavioral guardrails. There are **15 rule files** in total:
|
|
8
|
+
|
|
9
|
+
| Rule File | Purpose | Always Active? |
|
|
10
|
+
|-----------|---------|----------------|
|
|
11
|
+
| **golden-standard.md** | Quality bar definition (top 1%) | Yes |
|
|
12
|
+
| **tdd-enforcement.md** | Test-driven development workflow | Yes |
|
|
13
|
+
| **prompt-routing.md** | Prompt analysis and routing | Yes |
|
|
14
|
+
| **hook-awareness.md** | Hook system behavior | Yes |
|
|
15
|
+
| **agents.md** | Agent orchestration triggers | Yes |
|
|
16
|
+
| **coding-style.md** | Code formatting rules | Yes |
|
|
17
|
+
| **compliance.md** | Compliance mode behavior | When mode set |
|
|
18
|
+
| **git-workflow.md** | Branch naming, commit standards | Yes |
|
|
19
|
+
| **hooks.md** | Hook definitions | Yes |
|
|
20
|
+
| **patterns.md** | Design pattern guidance | Yes |
|
|
21
|
+
| **performance.md** | Model selection, optimization | Yes |
|
|
22
|
+
| **security.md** | Security requirements | Yes |
|
|
23
|
+
| **testing.md** | 80% coverage requirement | Yes |
|
|
24
|
+
| **training.md** | Training mode behavior | When enabled |
|
|
25
|
+
| **INDEX.md** | Rules reference index | — |
|
|
26
|
+
|
|
27
|
+
## Why This Matters
|
|
28
|
+
|
|
29
|
+
Without rules:
|
|
30
|
+
- Inconsistent behavior between sessions
|
|
31
|
+
- No enforced quality standards
|
|
32
|
+
- Each session reinvents conventions
|
|
33
|
+
|
|
34
|
+
With rules:
|
|
35
|
+
- Consistent behavior across all sessions
|
|
36
|
+
- Quality bar is explicitly defined
|
|
37
|
+
- Conventions are automatically applied
|
|
38
|
+
|
|
39
|
+
## Rule Loading Priority
|
|
40
|
+
|
|
41
|
+
Rules are loaded in this order (later overrides earlier):
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
1. System rules (built into Claude)
|
|
45
|
+
↓
|
|
46
|
+
2. Plugin rules (rules/*.md in this directory)
|
|
47
|
+
↓
|
|
48
|
+
3. Project rules (CLAUDE.md in project root)
|
|
49
|
+
↓
|
|
50
|
+
4. Session context (current conversation)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
This means:
|
|
54
|
+
- Plugin rules override system defaults
|
|
55
|
+
- Project CLAUDE.md can override plugin rules
|
|
56
|
+
- Session context can temporarily override all
|
|
57
|
+
|
|
58
|
+
## Rule File Structure
|
|
59
|
+
|
|
60
|
+
Rules follow a standard format:
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
---
|
|
64
|
+
name: rule-name
|
|
65
|
+
description: One-line description
|
|
66
|
+
always: true|false
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
# Rule Title
|
|
70
|
+
|
|
71
|
+
## Definition
|
|
72
|
+
What this rule means
|
|
73
|
+
|
|
74
|
+
## When It Applies
|
|
75
|
+
Conditions for activation
|
|
76
|
+
|
|
77
|
+
## Behavior
|
|
78
|
+
What Claude should do
|
|
79
|
+
|
|
80
|
+
## Anti-Patterns
|
|
81
|
+
What to avoid
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Frontmatter Fields
|
|
85
|
+
|
|
86
|
+
| Field | Required | Purpose |
|
|
87
|
+
|-------|----------|---------|
|
|
88
|
+
| `name` | Yes | Unique identifier |
|
|
89
|
+
| `description` | Yes | Brief explanation |
|
|
90
|
+
| `always` | No | If true, always loaded; if false, conditional |
|
|
91
|
+
|
|
92
|
+
## The 11 Rules Explained
|
|
93
|
+
|
|
94
|
+
### 1. Golden Standard (always: true)
|
|
95
|
+
|
|
96
|
+
**The most important rule.** Defines the quality bar:
|
|
97
|
+
- "Top 1% enterprise professional quality"
|
|
98
|
+
- Production-ready, bulletproof, auditable code
|
|
99
|
+
- 80%+ test coverage
|
|
100
|
+
- OWASP Top 10 security awareness
|
|
101
|
+
- Handoff-ready documentation
|
|
102
|
+
|
|
103
|
+
### 2. Training Mode
|
|
104
|
+
|
|
105
|
+
Defines how training mode works:
|
|
106
|
+
- Intent detection keywords and triggers
|
|
107
|
+
- Workflow suggestions for different task types
|
|
108
|
+
- Verbosity levels (minimal, standard, detailed)
|
|
109
|
+
- Skip conditions for simple tasks
|
|
110
|
+
|
|
111
|
+
### 3. Agents
|
|
112
|
+
|
|
113
|
+
Defines agent activation:
|
|
114
|
+
- Which agents exist
|
|
115
|
+
- Trigger conditions for each
|
|
116
|
+
- Model selection (Opus for reasoning, Sonnet for execution)
|
|
117
|
+
- Agent capabilities and limitations
|
|
118
|
+
|
|
119
|
+
### 4. Compliance
|
|
120
|
+
|
|
121
|
+
Defines compliance mode behavior:
|
|
122
|
+
- HIPAA requirements when `## Compliance Mode: hipaa`
|
|
123
|
+
- SOC2 requirements when `## Compliance Mode: soc2`
|
|
124
|
+
- PCI-DSS requirements when `## Compliance Mode: pci-dss`
|
|
125
|
+
- Multi-mode combinations
|
|
126
|
+
|
|
127
|
+
### 5. Security
|
|
128
|
+
|
|
129
|
+
Security patterns to enforce:
|
|
130
|
+
- Input validation requirements
|
|
131
|
+
- Credential handling
|
|
132
|
+
- OWASP Top 10 checks
|
|
133
|
+
- Security review triggers
|
|
134
|
+
|
|
135
|
+
### 6. Testing
|
|
136
|
+
|
|
137
|
+
Testing requirements:
|
|
138
|
+
- TDD workflow (RED → GREEN → REFACTOR)
|
|
139
|
+
- Coverage targets (80%+ minimum)
|
|
140
|
+
- Test types (unit, integration, E2E)
|
|
141
|
+
- When testing is mandatory
|
|
142
|
+
|
|
143
|
+
### 7. Hooks
|
|
144
|
+
|
|
145
|
+
Hook system documentation:
|
|
146
|
+
- Available hook types
|
|
147
|
+
- How hooks are configured
|
|
148
|
+
- Hook execution flow
|
|
149
|
+
- Creating custom hooks
|
|
150
|
+
|
|
151
|
+
### 8. Patterns
|
|
152
|
+
|
|
153
|
+
Design pattern guidance:
|
|
154
|
+
- When to use which patterns
|
|
155
|
+
- Anti-patterns to avoid
|
|
156
|
+
- Architecture decisions
|
|
157
|
+
- Code organization
|
|
158
|
+
|
|
159
|
+
### 9. Coding Style
|
|
160
|
+
|
|
161
|
+
Code formatting rules:
|
|
162
|
+
- Naming conventions
|
|
163
|
+
- File organization
|
|
164
|
+
- Comment standards
|
|
165
|
+
- Import ordering
|
|
166
|
+
|
|
167
|
+
### 10. Git Workflow
|
|
168
|
+
|
|
169
|
+
Git conventions:
|
|
170
|
+
- Branch naming
|
|
171
|
+
- Commit message format: `[CLIENT-ID] type(scope): description | Time: Xh Xm`
|
|
172
|
+
- PR standards
|
|
173
|
+
- Review requirements
|
|
174
|
+
|
|
175
|
+
### 11. Performance
|
|
176
|
+
|
|
177
|
+
Performance guidelines:
|
|
178
|
+
- Zoho platform constraints (statement limits, timeouts)
|
|
179
|
+
- Query optimization
|
|
180
|
+
- Bundle size targets
|
|
181
|
+
- Profiling requirements
|
|
182
|
+
|
|
183
|
+
## Exercise
|
|
184
|
+
|
|
185
|
+
### Exercise 12.1: Explore Rules Directory
|
|
186
|
+
|
|
187
|
+
**Step 1**: List all rules:
|
|
188
|
+
```bash
|
|
189
|
+
ls rules/
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
You should see 11 .md files.
|
|
193
|
+
|
|
194
|
+
**Step 2**: Read the golden-standard rule:
|
|
195
|
+
```bash
|
|
196
|
+
cat rules/golden-standard.md
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Notice:
|
|
200
|
+
- Frontmatter with `always: true`
|
|
201
|
+
- Clear quality bar definition
|
|
202
|
+
- Verification checklist
|
|
203
|
+
- Anti-patterns section
|
|
204
|
+
|
|
205
|
+
### Exercise 12.2: Understand Rule Format
|
|
206
|
+
|
|
207
|
+
**Step 1**: Pick any rule file and examine its structure:
|
|
208
|
+
```bash
|
|
209
|
+
cat rules/training.md
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Step 2**: Identify:
|
|
213
|
+
- Frontmatter (name, description, always)
|
|
214
|
+
- Definition section
|
|
215
|
+
- When It Applies section
|
|
216
|
+
- Behavior section
|
|
217
|
+
|
|
218
|
+
### Exercise 12.3: Check Active Rules
|
|
219
|
+
|
|
220
|
+
When Claude starts, it loads rules with `always: true` automatically.
|
|
221
|
+
|
|
222
|
+
**Step 1**: Count always-active rules:
|
|
223
|
+
```bash
|
|
224
|
+
grep -l "always: true" rules/*.md
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Step 2**: These rules are ALWAYS loaded, regardless of project.
|
|
228
|
+
|
|
229
|
+
### Exercise 12.4: Project-Level Overrides
|
|
230
|
+
|
|
231
|
+
**Step 1**: Read the project CLAUDE.md:
|
|
232
|
+
```bash
|
|
233
|
+
cat CLAUDE.md
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Step 2**: Notice how it can set:
|
|
237
|
+
- `## Compliance Mode: hipaa`
|
|
238
|
+
- `## Training Mode: enabled`
|
|
239
|
+
- Project-specific guidelines
|
|
240
|
+
|
|
241
|
+
These override the default rule behavior.
|
|
242
|
+
|
|
243
|
+
## Verification
|
|
244
|
+
|
|
245
|
+
You've completed this exercise successfully if:
|
|
246
|
+
- [ ] You found and read all 11 rule files
|
|
247
|
+
- [ ] You understand the rule loading priority
|
|
248
|
+
- [ ] You know which rules are always active vs. conditional
|
|
249
|
+
- [ ] You understand the frontmatter format
|
|
250
|
+
|
|
251
|
+
## Creating Custom Rules
|
|
252
|
+
|
|
253
|
+
To add a project-specific rule:
|
|
254
|
+
|
|
255
|
+
**Option 1: In Project CLAUDE.md**
|
|
256
|
+
|
|
257
|
+
Add guidance directly in your project's CLAUDE.md:
|
|
258
|
+
```markdown
|
|
259
|
+
## Project Rules
|
|
260
|
+
|
|
261
|
+
### No External Libraries
|
|
262
|
+
For this project, avoid adding npm dependencies.
|
|
263
|
+
Use built-in Node.js modules when possible.
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Option 2: Custom Rule File**
|
|
267
|
+
|
|
268
|
+
Create a new rule in `rules/`:
|
|
269
|
+
```markdown
|
|
270
|
+
---
|
|
271
|
+
name: no-friday-deploys
|
|
272
|
+
description: Prevent deployments on Fridays
|
|
273
|
+
always: true
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
# No Friday Deploys
|
|
277
|
+
|
|
278
|
+
## Behavior
|
|
279
|
+
When detecting deployment intent on Fridays:
|
|
280
|
+
1. Alert user to deployment risk
|
|
281
|
+
2. Suggest Monday deployment instead
|
|
282
|
+
3. Require explicit override to proceed
|
|
283
|
+
|
|
284
|
+
## Rationale
|
|
285
|
+
Friday deployments leave less time to respond to issues.
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Key Takeaway
|
|
289
|
+
|
|
290
|
+
Rules encode organizational standards. The Golden Standard rule is the baseline - everything produced must meet "top 1% enterprise professional quality."
|
|
291
|
+
|
|
292
|
+
Rules are loaded hierarchically:
|
|
293
|
+
1. System defaults
|
|
294
|
+
2. Plugin rules (this directory)
|
|
295
|
+
3. Project CLAUDE.md
|
|
296
|
+
4. Session context
|
|
297
|
+
|
|
298
|
+
## Rules Quick Reference
|
|
299
|
+
|
|
300
|
+
```
|
|
301
|
+
ALWAYS ACTIVE:
|
|
302
|
+
golden-standard - Quality bar definition
|
|
303
|
+
agents - Agent triggers
|
|
304
|
+
security - Security patterns
|
|
305
|
+
testing - Test requirements
|
|
306
|
+
coding-style - Code conventions
|
|
307
|
+
git-workflow - Git conventions
|
|
308
|
+
performance - Performance guidelines
|
|
309
|
+
hooks - Hook system
|
|
310
|
+
patterns - Design patterns
|
|
311
|
+
|
|
312
|
+
CONDITIONAL:
|
|
313
|
+
training - When Training Mode enabled
|
|
314
|
+
compliance - When Compliance Mode set
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Next Steps
|
|
318
|
+
|
|
319
|
+
In Lesson 13, you'll formally learn the Golden Standard and receive your graduation checklist.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
**Rules learned**: 11 rule files, loading priority, frontmatter format
|
|
324
|
+
**Critical rule**: `rules/golden-standard.md`
|
|
325
|
+
**Key concept**: Rules encode standards that Claude follows automatically
|
|
326
|
+
**Progress**: 13 of 15 lessons complete
|