@mclawnet/agent 0.5.9 → 0.6.1
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/cli.js +168 -61
- package/dist/__tests__/cli.test.d.ts +2 -0
- package/dist/__tests__/cli.test.d.ts.map +1 -0
- package/dist/__tests__/service-config.test.d.ts +2 -0
- package/dist/__tests__/service-config.test.d.ts.map +1 -0
- package/dist/__tests__/service-linux.test.d.ts +2 -0
- package/dist/__tests__/service-linux.test.d.ts.map +1 -0
- package/dist/__tests__/service-macos.test.d.ts +2 -0
- package/dist/__tests__/service-macos.test.d.ts.map +1 -0
- package/dist/__tests__/service-windows.test.d.ts +2 -0
- package/dist/__tests__/service-windows.test.d.ts.map +1 -0
- package/dist/backend-adapter.d.ts +2 -0
- package/dist/backend-adapter.d.ts.map +1 -1
- package/dist/{chunk-KHPEQTWF.js → chunk-KITKMSBE.js} +166 -90
- package/dist/chunk-KITKMSBE.js.map +1 -0
- package/dist/chunk-W3LSW4XY.js +95 -0
- package/dist/chunk-W3LSW4XY.js.map +1 -0
- package/dist/hub-connection.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/linux-5KQ4SCAA.js +175 -0
- package/dist/linux-5KQ4SCAA.js.map +1 -0
- package/dist/macos-FGY546NC.js +173 -0
- package/dist/macos-FGY546NC.js.map +1 -0
- package/dist/service/config.d.ts +19 -0
- package/dist/service/config.d.ts.map +1 -0
- package/dist/service/index.d.ts +6 -0
- package/dist/service/index.d.ts.map +1 -0
- package/dist/service/index.js +46 -0
- package/dist/service/index.js.map +1 -0
- package/dist/service/linux.d.ts +18 -0
- package/dist/service/linux.d.ts.map +1 -0
- package/dist/service/macos.d.ts +18 -0
- package/dist/service/macos.d.ts.map +1 -0
- package/dist/service/types.d.ts +19 -0
- package/dist/service/types.d.ts.map +1 -0
- package/dist/service/windows.d.ts +18 -0
- package/dist/service/windows.d.ts.map +1 -0
- package/dist/session-manager.d.ts +4 -7
- package/dist/session-manager.d.ts.map +1 -1
- package/dist/skill-loader.d.ts +8 -0
- package/dist/skill-loader.d.ts.map +1 -0
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +1 -1
- package/dist/windows-PIJ4CMWX.js +164 -0
- package/dist/windows-PIJ4CMWX.js.map +1 -0
- package/package.json +8 -6
- package/skills/academic-search/SKILL.md +147 -0
- package/skills/architecture/SKILL.md +294 -0
- package/skills/changelog-generator/SKILL.md +112 -0
- package/skills/chart-visualization/SKILL.md +183 -0
- package/skills/code-review/SKILL.md +304 -0
- package/skills/codebase-health/SKILL.md +281 -0
- package/skills/consulting-analysis/SKILL.md +584 -0
- package/skills/content-research-writer/SKILL.md +546 -0
- package/skills/data-analysis/SKILL.md +194 -0
- package/skills/deep-research/SKILL.md +198 -0
- package/skills/docx/SKILL.md +211 -0
- package/skills/github-deep-research/SKILL.md +207 -0
- package/skills/image-generation/SKILL.md +209 -0
- package/skills/lead-research-assistant/SKILL.md +207 -0
- package/skills/mcp-builder/SKILL.md +304 -0
- package/skills/meeting-insights-analyzer/SKILL.md +335 -0
- package/skills/pair-programming/SKILL.md +196 -0
- package/skills/pdf/SKILL.md +309 -0
- package/skills/performance-analysis/SKILL.md +261 -0
- package/skills/podcast-generation/SKILL.md +224 -0
- package/skills/pptx/SKILL.md +497 -0
- package/skills/project-learnings/SKILL.md +280 -0
- package/skills/security-audit/SKILL.md +211 -0
- package/skills/skill-creator/SKILL.md +200 -0
- package/skills/technical-writing/SKILL.md +286 -0
- package/skills/testing/SKILL.md +363 -0
- package/skills/video-generation/SKILL.md +247 -0
- package/skills/web-design-guidelines/SKILL.md +203 -0
- package/skills/webapp-testing/SKILL.md +162 -0
- package/skills/workflow-automation/SKILL.md +299 -0
- package/skills/xlsx/SKILL.md +305 -0
- package/dist/chunk-KHPEQTWF.js.map +0 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-learnings
|
|
3
|
+
description: Capture, organize, and apply project-specific learnings and institutional knowledge. Use when documenting debugging insights, architectural decisions, workflow quirks, environment-specific gotchas, or any reusable knowledge gained during development.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Project Learnings
|
|
8
|
+
|
|
9
|
+
Systematically capture, organize, and retrieve project-specific knowledge so that insights gained during development are never lost and always available when needed.
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Every project accumulates implicit knowledge — environment quirks, debugging tricks, why certain decisions were made, what approaches were tried and failed. This knowledge typically lives in individual developers' heads and is lost when they leave or context-switch. This skill provides a structured way to capture, categorize, and retrieve project learnings.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- After debugging a non-obvious issue (capture the root cause and fix)
|
|
18
|
+
- After making an architectural decision (capture the why, not just the what)
|
|
19
|
+
- When discovering an environment-specific quirk (CI behavior, platform differences)
|
|
20
|
+
- After a failed approach (capture what was tried and why it didn't work)
|
|
21
|
+
- During onboarding (contribute new-comer observations about confusing areas)
|
|
22
|
+
- During retrospectives (extract actionable learnings)
|
|
23
|
+
|
|
24
|
+
## When NOT to Use
|
|
25
|
+
|
|
26
|
+
- **API documentation** — use the `technical-writing` skill
|
|
27
|
+
- **Code comments** — inline comments belong in the code
|
|
28
|
+
- **Meeting notes** — use the `meeting-insights-analyzer` skill
|
|
29
|
+
- **Architecture planning** — use the `architecture` skill
|
|
30
|
+
|
|
31
|
+
## Learning Categories
|
|
32
|
+
|
|
33
|
+
### 1. Debugging Insights
|
|
34
|
+
|
|
35
|
+
Knowledge gained from investigating bugs.
|
|
36
|
+
|
|
37
|
+
**Template:**
|
|
38
|
+
```markdown
|
|
39
|
+
### [Short title describing the issue]
|
|
40
|
+
|
|
41
|
+
**Category**: debugging
|
|
42
|
+
**Date**: YYYY-MM-DD
|
|
43
|
+
**Confidence**: high | medium | low
|
|
44
|
+
|
|
45
|
+
**Symptom**: What was observed (error message, unexpected behavior)
|
|
46
|
+
**Root Cause**: Why it happened
|
|
47
|
+
**Fix**: What resolved it
|
|
48
|
+
**Prevention**: How to prevent recurrence
|
|
49
|
+
**Time to Diagnose**: How long did it take? (helps calibrate future estimates)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Example:**
|
|
53
|
+
```markdown
|
|
54
|
+
### WebSocket reconnection fails after laptop sleep
|
|
55
|
+
|
|
56
|
+
**Category**: debugging
|
|
57
|
+
**Date**: 2024-03-15
|
|
58
|
+
**Confidence**: high
|
|
59
|
+
|
|
60
|
+
**Symptom**: After resuming from sleep, WebSocket shows "connected" but
|
|
61
|
+
messages are silently dropped. No error in console.
|
|
62
|
+
**Root Cause**: The server closes idle connections after 30s, but the
|
|
63
|
+
client's heartbeat check uses the old connection object without verifying
|
|
64
|
+
it's actually connected at the TCP level.
|
|
65
|
+
**Fix**: Added TCP-level health check in `ws-client.ts:reconnect()` that
|
|
66
|
+
sends a ping and waits for pong before marking as connected.
|
|
67
|
+
**Prevention**: Added integration test that simulates connection drop.
|
|
68
|
+
**Time to Diagnose**: 3 hours (misleading "connected" status was the blocker)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 2. Architectural Decisions
|
|
72
|
+
|
|
73
|
+
Why we chose approach A over approach B.
|
|
74
|
+
|
|
75
|
+
**Template:**
|
|
76
|
+
```markdown
|
|
77
|
+
### [Decision title]
|
|
78
|
+
|
|
79
|
+
**Category**: architecture
|
|
80
|
+
**Date**: YYYY-MM-DD
|
|
81
|
+
**Status**: active | superseded by [link]
|
|
82
|
+
|
|
83
|
+
**Context**: What situation prompted this decision
|
|
84
|
+
**Decision**: What we chose
|
|
85
|
+
**Alternatives Considered**: What we didn't choose and why
|
|
86
|
+
**Consequences**: What this decision makes easier/harder
|
|
87
|
+
**Review Trigger**: When to reconsider (e.g., "if user count exceeds 10K")
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 3. Environment & Tooling Quirks
|
|
91
|
+
|
|
92
|
+
Platform-specific behavior, CI gotchas, toolchain issues.
|
|
93
|
+
|
|
94
|
+
**Template:**
|
|
95
|
+
```markdown
|
|
96
|
+
### [Quirk title]
|
|
97
|
+
|
|
98
|
+
**Category**: environment
|
|
99
|
+
**Date**: YYYY-MM-DD
|
|
100
|
+
**Affects**: [CI | local dev | staging | production | specific OS]
|
|
101
|
+
|
|
102
|
+
**Behavior**: What happens
|
|
103
|
+
**Workaround**: How to deal with it
|
|
104
|
+
**Permanent Fix**: (if known)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Example:**
|
|
108
|
+
```markdown
|
|
109
|
+
### npm ci fails on CI with ENOMEM on 2GB runners
|
|
110
|
+
|
|
111
|
+
**Category**: environment
|
|
112
|
+
**Date**: 2024-02-20
|
|
113
|
+
**Affects**: CI (GitHub Actions ubuntu-latest)
|
|
114
|
+
|
|
115
|
+
**Behavior**: `npm ci` OOMs during the install step on the default
|
|
116
|
+
2GB runner when node_modules exceeds 1.5GB.
|
|
117
|
+
**Workaround**: Use `--max-old-space-size=1536` or switch to a 4GB runner.
|
|
118
|
+
**Permanent Fix**: Audit and remove unused dependencies to reduce install size.
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 4. Failed Approaches
|
|
122
|
+
|
|
123
|
+
Approaches that were tried and abandoned (and why).
|
|
124
|
+
|
|
125
|
+
**Template:**
|
|
126
|
+
```markdown
|
|
127
|
+
### [What was attempted]
|
|
128
|
+
|
|
129
|
+
**Category**: failed-approach
|
|
130
|
+
**Date**: YYYY-MM-DD
|
|
131
|
+
|
|
132
|
+
**Goal**: What we were trying to achieve
|
|
133
|
+
**Approach**: What we tried
|
|
134
|
+
**Why It Failed**: Specific reason (not just "didn't work")
|
|
135
|
+
**What Worked Instead**: The approach we used
|
|
136
|
+
**Lesson**: What to remember for next time
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 5. Performance Observations
|
|
140
|
+
|
|
141
|
+
Benchmarks, scaling behavior, resource usage patterns.
|
|
142
|
+
|
|
143
|
+
**Template:**
|
|
144
|
+
```markdown
|
|
145
|
+
### [Observation title]
|
|
146
|
+
|
|
147
|
+
**Category**: performance
|
|
148
|
+
**Date**: YYYY-MM-DD
|
|
149
|
+
**Measured On**: [hardware/environment details]
|
|
150
|
+
|
|
151
|
+
**Observation**: What was measured
|
|
152
|
+
**Numbers**: Specific metrics
|
|
153
|
+
**Implication**: What this means for the project
|
|
154
|
+
**Action**: What to do about it (if anything)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### 6. Process & Workflow
|
|
158
|
+
|
|
159
|
+
Team conventions, release processes, review practices.
|
|
160
|
+
|
|
161
|
+
**Template:**
|
|
162
|
+
```markdown
|
|
163
|
+
### [Process title]
|
|
164
|
+
|
|
165
|
+
**Category**: process
|
|
166
|
+
**Date**: YYYY-MM-DD
|
|
167
|
+
|
|
168
|
+
**What**: Description of the process or convention
|
|
169
|
+
**Why**: Reason it exists
|
|
170
|
+
**When to Use**: Trigger conditions
|
|
171
|
+
**Exceptions**: When to deviate from this process
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Capture Process
|
|
175
|
+
|
|
176
|
+
### When to Capture
|
|
177
|
+
|
|
178
|
+
Capture a learning **immediately** when:
|
|
179
|
+
- You spend >30 minutes debugging something
|
|
180
|
+
- You discover the solution to a non-obvious problem
|
|
181
|
+
- You make a decision that future-you will need context for
|
|
182
|
+
- You hit a platform/tool quirk that wasted time
|
|
183
|
+
- You try an approach and it fails for non-obvious reasons
|
|
184
|
+
|
|
185
|
+
### How to Capture
|
|
186
|
+
|
|
187
|
+
**Quick capture** (during work — don't interrupt flow):
|
|
188
|
+
```markdown
|
|
189
|
+
## Quick Learning: [title]
|
|
190
|
+
[2-3 sentences: what happened, what we learned, what to do differently]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Full capture** (when you have time — use the templates above):
|
|
194
|
+
Fill in the full template for the appropriate category.
|
|
195
|
+
|
|
196
|
+
### Where to Store
|
|
197
|
+
|
|
198
|
+
Store learnings in a discoverable location:
|
|
199
|
+
|
|
200
|
+
**Option A: Project docs folder**
|
|
201
|
+
```
|
|
202
|
+
docs/
|
|
203
|
+
learnings/
|
|
204
|
+
debugging.md # All debugging insights
|
|
205
|
+
architecture.md # All architectural decisions
|
|
206
|
+
environment.md # All environment quirks
|
|
207
|
+
README.md # Index and categories
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Option B: Single file** (for smaller projects)
|
|
211
|
+
```
|
|
212
|
+
docs/LEARNINGS.md # All learnings in one file, organized by category
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Option C: ADR-style numbered files** (for architectural decisions)
|
|
216
|
+
```
|
|
217
|
+
docs/decisions/
|
|
218
|
+
001-use-postgres.md
|
|
219
|
+
002-event-sourcing.md
|
|
220
|
+
003-api-versioning.md
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Retrieval Patterns
|
|
224
|
+
|
|
225
|
+
### Finding Relevant Learnings
|
|
226
|
+
|
|
227
|
+
When facing a problem, check learnings first:
|
|
228
|
+
|
|
229
|
+
1. **Search by symptom**: "Have we seen this error before?"
|
|
230
|
+
2. **Search by component**: "What do we know about the auth module?"
|
|
231
|
+
3. **Search by category**: "What environment quirks should I know about?"
|
|
232
|
+
4. **Search by date**: "What did we learn during the last refactoring?"
|
|
233
|
+
|
|
234
|
+
### Applying Learnings
|
|
235
|
+
|
|
236
|
+
Before starting work on a component:
|
|
237
|
+
1. Read relevant learnings for that area
|
|
238
|
+
2. Check for failed approaches (avoid repeating them)
|
|
239
|
+
3. Review architectural decisions (understand constraints)
|
|
240
|
+
4. Note any environment quirks that might affect the work
|
|
241
|
+
|
|
242
|
+
## Maintenance
|
|
243
|
+
|
|
244
|
+
### Regular Review
|
|
245
|
+
|
|
246
|
+
**Monthly**: Scan learnings for entries that are:
|
|
247
|
+
- **Outdated**: The issue was permanently fixed → mark as resolved
|
|
248
|
+
- **Superseded**: A newer decision replaced an older one → link them
|
|
249
|
+
- **Low confidence**: Marked as "medium" or "low" → verify or remove
|
|
250
|
+
|
|
251
|
+
### Quality Standards
|
|
252
|
+
|
|
253
|
+
Good learnings are:
|
|
254
|
+
- **Specific**: Exact error messages, file paths, line numbers
|
|
255
|
+
- **Actionable**: Clear what to do with the knowledge
|
|
256
|
+
- **Dated**: So readers know if it's still relevant
|
|
257
|
+
- **Categorized**: Easy to find when needed
|
|
258
|
+
|
|
259
|
+
Bad learnings are:
|
|
260
|
+
- "React can be tricky sometimes" (too vague)
|
|
261
|
+
- "Fixed the bug" (no root cause or prevention)
|
|
262
|
+
- "We should probably use TypeScript" (opinion without context)
|
|
263
|
+
|
|
264
|
+
## Anti-Patterns
|
|
265
|
+
|
|
266
|
+
### Knowledge Hoarding
|
|
267
|
+
**Problem**: Learnings live in one person's head, not in docs.
|
|
268
|
+
**Fix**: Make "capture a learning" part of the PR checklist for non-trivial changes.
|
|
269
|
+
|
|
270
|
+
### Write-Only Documentation
|
|
271
|
+
**Problem**: Learnings are captured but never consulted.
|
|
272
|
+
**Fix**: Add "check learnings" as a step when starting work on a module. Reference them in PRs.
|
|
273
|
+
|
|
274
|
+
### Stale Knowledge
|
|
275
|
+
**Problem**: Learnings from 2 years ago that no longer apply.
|
|
276
|
+
**Fix**: Monthly review cycle. Date and confidence-tag every entry.
|
|
277
|
+
|
|
278
|
+
### Over-Documentation
|
|
279
|
+
**Problem**: Every trivial fix gets a full learning entry.
|
|
280
|
+
**Fix**: Only capture non-obvious insights. The 30-minute rule: if it took >30 min to figure out, it's worth documenting.
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-audit
|
|
3
|
+
description: Perform systematic security audits on codebases using OWASP Top 10 methodology, dependency analysis, and secret detection. Use when reviewing code for vulnerabilities, assessing application security posture, checking for leaked credentials, or evaluating authentication and authorization implementations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security Audit
|
|
7
|
+
|
|
8
|
+
A systematic security audit skill that evaluates codebases against the OWASP Top 10, checks for leaked secrets and vulnerable dependencies, and reviews authentication, authorization, and input validation. Every finding includes severity, confidence, and remediation guidance.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
This skill guides a thorough, methodical security audit. The auditor acts as a security engineer whose job is to identify vulnerabilities before they reach production.
|
|
13
|
+
|
|
14
|
+
Core principles:
|
|
15
|
+
- **Be systematic.** Follow the audit process in order. Do not skip categories even when the codebase looks simple.
|
|
16
|
+
- **Be evidence-based.** Every finding must reference specific code locations. Do not report theoretical vulnerabilities without evidence.
|
|
17
|
+
- **Be proportional.** Authentication endpoints deserve more scrutiny than internal utility functions.
|
|
18
|
+
- **Be actionable.** Every vulnerability identified must include a concrete remediation path.
|
|
19
|
+
- **Be honest about severity.** Do not inflate findings. A low-risk issue is not a critical vulnerability.
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- Auditing a codebase for security vulnerabilities before release
|
|
24
|
+
- Reviewing code changes that touch authentication, authorization, or data handling
|
|
25
|
+
- Checking for hardcoded secrets, API keys, or credentials in source code
|
|
26
|
+
- Evaluating dependency security and known vulnerability exposure
|
|
27
|
+
- Assessing OWASP Top 10 compliance for a web application
|
|
28
|
+
- Performing a security review after a reported incident or breach
|
|
29
|
+
|
|
30
|
+
## When NOT to Use
|
|
31
|
+
|
|
32
|
+
- **General code review** -- use the `code-review` skill instead; it includes a security dimension
|
|
33
|
+
- **Writing tests** -- use the `testing` skill for test implementation
|
|
34
|
+
- **Infrastructure/network security** -- this skill covers application code, not server hardening
|
|
35
|
+
- **Compliance auditing** (SOC2, HIPAA, PCI-DSS) -- those require domain-specific frameworks
|
|
36
|
+
|
|
37
|
+
## Security Audit Process
|
|
38
|
+
|
|
39
|
+
Follow these five phases in order. Complete each phase before moving to the next.
|
|
40
|
+
|
|
41
|
+
### Phase 1: Attack Surface Mapping
|
|
42
|
+
|
|
43
|
+
Before examining code for vulnerabilities, understand what is exposed.
|
|
44
|
+
|
|
45
|
+
- Identify all entry points: HTTP endpoints, WebSocket handlers, CLI inputs, message queue consumers
|
|
46
|
+
- Map data flows: trace user-controlled input from entry to storage, display, or external system
|
|
47
|
+
- Identify trust boundaries: where does unauthenticated become authenticated? User-level become admin?
|
|
48
|
+
- Catalog sensitive data: PII, credentials, tokens, financial data
|
|
49
|
+
- Note third-party integrations: OAuth providers, payment gateways, external APIs
|
|
50
|
+
|
|
51
|
+
### Phase 2: OWASP Top 10 Review
|
|
52
|
+
|
|
53
|
+
Evaluate the codebase against each category. Check the specific items listed.
|
|
54
|
+
|
|
55
|
+
**A01: Broken Access Control** -- Authorization enforced on every endpoint (not just UI)? User A cannot access user B's resources? Admin functions protected at API layer? CORS restrictive? No privilege escalation via role/permission manipulation?
|
|
56
|
+
|
|
57
|
+
**A02: Cryptographic Failures** -- Sensitive data encrypted at rest and in transit? Passwords hashed with bcrypt/scrypt/argon2? No hardcoded encryption keys? No deprecated algorithms (DES, RC4, MD5)? CSPRNG used for tokens and nonces?
|
|
58
|
+
|
|
59
|
+
**A03: Injection** -- SQL queries parameterized? NoSQL queries safe? OS commands avoided or escaped? Template expressions safe from injection? User input sanitized before HTML insertion? GraphQL depth-limited?
|
|
60
|
+
|
|
61
|
+
**A04: Insecure Design** -- Rate limits on auth and API endpoints? Business logic validated server-side? No account enumeration or unlimited resource creation?
|
|
62
|
+
|
|
63
|
+
**A05: Security Misconfiguration** -- Default credentials disabled? Stack traces hidden in production? HTTP security headers set (CSP, HSTS, X-Frame-Options)? Debug endpoints excluded from production?
|
|
64
|
+
|
|
65
|
+
**A06: Vulnerable Components** -- Dependencies pinned to specific versions? Known CVEs in direct or transitive dependencies? Unused dependencies removed?
|
|
66
|
+
|
|
67
|
+
**A07: Authentication Failures** -- Session tokens regenerated after login? Session timeouts configured? Passwords validated for complexity? Failed logins rate-limited? JWTs validated correctly (algorithm, expiration, issuer)?
|
|
68
|
+
|
|
69
|
+
**A08: Data Integrity Failures** -- No deserialization of untrusted data? No `eval()` or `Function()` with user input? Dependencies verified with integrity checks?
|
|
70
|
+
|
|
71
|
+
**A09: Logging Failures** -- Auth events logged? Authorization failures logged? Logs protected from injection? Sensitive data excluded from logs?
|
|
72
|
+
|
|
73
|
+
**A10: SSRF** -- User-supplied URLs fetched? Allowlists enforced? Internal network addresses blocked (127.0.0.1, 10.x, 169.254.169.254)?
|
|
74
|
+
|
|
75
|
+
### Phase 3: Secret and Credential Detection
|
|
76
|
+
|
|
77
|
+
Scan the codebase for exposed secrets:
|
|
78
|
+
|
|
79
|
+
- API keys, tokens, or passwords in source files or configuration
|
|
80
|
+
- Private keys (RSA, EC, PGP) committed to the repository
|
|
81
|
+
- Database connection strings with embedded credentials
|
|
82
|
+
- Cloud provider credentials (AWS access keys, Azure connection strings, GCP service account keys)
|
|
83
|
+
- Variables named `password`, `secret`, `token`, `api_key`, `credential` near string literals
|
|
84
|
+
- High-entropy strings (40+ alphanumeric characters) in source code
|
|
85
|
+
- `.env` files with real values instead of placeholders
|
|
86
|
+
- PEM-format private keys (`-----BEGIN.*PRIVATE KEY-----`)
|
|
87
|
+
- Secrets removed from code but still present in git history
|
|
88
|
+
|
|
89
|
+
### Phase 4: Input Validation Review
|
|
90
|
+
|
|
91
|
+
Examine every point where external data enters the application.
|
|
92
|
+
|
|
93
|
+
- Is every input validated for type, length, range, and format server-side?
|
|
94
|
+
- Are file uploads validated for type, size, and content (not just extension)?
|
|
95
|
+
- Are URL parameters, headers, and cookies validated alongside request body?
|
|
96
|
+
- Is output encoding context-aware (HTML, JavaScript, URL, CSS, SQL)?
|
|
97
|
+
- Are rich text inputs sanitized with allowlist (not denylist)?
|
|
98
|
+
- Is path traversal prevented (`../` sequences stripped or rejected)?
|
|
99
|
+
- Do validation errors reveal minimal information (no stack traces or SQL)?
|
|
100
|
+
- Is error handling consistent across all endpoints?
|
|
101
|
+
|
|
102
|
+
### Phase 5: Authentication and Authorization Deep Review
|
|
103
|
+
|
|
104
|
+
**Authentication:**
|
|
105
|
+
- Constant-time password comparison (preventing timing attacks)?
|
|
106
|
+
- Password reset tokens single-use, time-limited, and high-entropy?
|
|
107
|
+
- Session storage server-side or in signed/encrypted cookies?
|
|
108
|
+
- OAuth/OIDC flows correct (state parameter, PKCE for public clients)?
|
|
109
|
+
- Refresh token rotation and revocation on compromise?
|
|
110
|
+
|
|
111
|
+
**Authorization:**
|
|
112
|
+
- Enforced at data access layer, not just middleware?
|
|
113
|
+
- Object-level permissions checked (can user X access resource Y)?
|
|
114
|
+
- Function-level permissions checked (can user X perform action Z)?
|
|
115
|
+
- Centralized authorization mechanism (not scattered across handlers)?
|
|
116
|
+
- Permission checks consistent across all CRUD operations per resource?
|
|
117
|
+
|
|
118
|
+
## Severity Classification
|
|
119
|
+
|
|
120
|
+
- **Critical**: Actively exploitable -- data breach, auth bypass, RCE, or privilege escalation. Remediate immediately.
|
|
121
|
+
- **High**: Exploitable under realistic conditions with significant impact. Remediate before release.
|
|
122
|
+
- **Medium**: Requires specific conditions to exploit or has limited impact. Remediate in current cycle.
|
|
123
|
+
- **Low**: Minor weakness or defense-in-depth improvement. Remediate when convenient.
|
|
124
|
+
- **Informational**: Best practice recommendation with no direct exploitability.
|
|
125
|
+
|
|
126
|
+
### Assignment Rules
|
|
127
|
+
|
|
128
|
+
- Remotely exploitable without authentication: Critical at minimum.
|
|
129
|
+
- Requires authenticated access: High at minimum, unless impact is negligible.
|
|
130
|
+
- Requires physical access or insider knowledge: Medium at most.
|
|
131
|
+
- Defense-in-depth with no direct exploit path: Low or Informational.
|
|
132
|
+
- When in doubt between two levels, choose the higher one.
|
|
133
|
+
|
|
134
|
+
### Confidence Levels
|
|
135
|
+
|
|
136
|
+
- **Confirmed**: Verified through code analysis with a clear exploit path.
|
|
137
|
+
- **High**: Very likely real but depends on runtime behavior not fully visible in code.
|
|
138
|
+
- **Medium**: Plausible but context incomplete. State what information is needed.
|
|
139
|
+
- **Low**: Potential concern that may be mitigated by factors not visible in review.
|
|
140
|
+
|
|
141
|
+
## Finding Format
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
### [SEVERITY] [Short title]
|
|
145
|
+
|
|
146
|
+
**Category:** OWASP A01-A10 | Secret Exposure | Input Validation | Auth/AuthZ | Dependency
|
|
147
|
+
**Location:** `path/to/file.ts:42-58`
|
|
148
|
+
**Confidence:** Confirmed | High | Medium | Low
|
|
149
|
+
**CWE:** CWE-[number] [name] (if applicable)
|
|
150
|
+
|
|
151
|
+
**Vulnerability:** [What is wrong, why it is exploitable, and what the impact would be.]
|
|
152
|
+
|
|
153
|
+
**Evidence:** [Code snippet or pattern demonstrating the vulnerability.]
|
|
154
|
+
|
|
155
|
+
**Remediation:** [Concrete fix with code example or specific library/function to use.]
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Security Audit Report Template
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
# Security Audit Report
|
|
162
|
+
|
|
163
|
+
**Project:** [Name and version]
|
|
164
|
+
**Scope:** [Full codebase, specific modules, or PR diff]
|
|
165
|
+
**Date:** [YYYY-MM-DD]
|
|
166
|
+
|
|
167
|
+
## Executive Summary
|
|
168
|
+
|
|
169
|
+
**Overall risk level:** Critical | High | Medium | Low
|
|
170
|
+
**Findings:** Critical: [N] | High: [N] | Medium: [N] | Low: [N] | Info: [N]
|
|
171
|
+
|
|
172
|
+
[Two to three sentences summarizing security posture and most significant findings.]
|
|
173
|
+
|
|
174
|
+
## Attack Surface Summary
|
|
175
|
+
|
|
176
|
+
- **Entry points:** [N] | **Sensitive data types:** [List]
|
|
177
|
+
- **Third-party integrations:** [List] | **Trust boundaries:** [List]
|
|
178
|
+
|
|
179
|
+
## OWASP Top 10 Compliance
|
|
180
|
+
|
|
181
|
+
| Category | Status | Findings |
|
|
182
|
+
|----------|--------|----------|
|
|
183
|
+
| A01: Broken Access Control | Pass / Fail / N/A | [N] |
|
|
184
|
+
| A02: Cryptographic Failures | Pass / Fail / N/A | [N] |
|
|
185
|
+
| A03: Injection | Pass / Fail / N/A | [N] |
|
|
186
|
+
| A04: Insecure Design | Pass / Fail / N/A | [N] |
|
|
187
|
+
| A05: Security Misconfiguration | Pass / Fail / N/A | [N] |
|
|
188
|
+
| A06: Vulnerable Components | Pass / Fail / N/A | [N] |
|
|
189
|
+
| A07: Auth Failures | Pass / Fail / N/A | [N] |
|
|
190
|
+
| A08: Data Integrity Failures | Pass / Fail / N/A | [N] |
|
|
191
|
+
| A09: Logging Failures | Pass / Fail / N/A | [N] |
|
|
192
|
+
| A10: SSRF | Pass / Fail / N/A | [N] |
|
|
193
|
+
|
|
194
|
+
## Detailed Findings
|
|
195
|
+
|
|
196
|
+
[All findings ordered by severity: Critical first, then High, Medium, Low, Informational.]
|
|
197
|
+
|
|
198
|
+
## Remediation Priority
|
|
199
|
+
|
|
200
|
+
| # | Finding | Effort | Impact |
|
|
201
|
+
|---|---------|--------|--------|
|
|
202
|
+
| 1 | [Title] | Low/Med/High | [Description] |
|
|
203
|
+
|
|
204
|
+
## Positive Observations
|
|
205
|
+
|
|
206
|
+
[Security practices done well. Omit if nothing stands out.]
|
|
207
|
+
|
|
208
|
+
## Recommendations
|
|
209
|
+
|
|
210
|
+
[Strategic recommendations: process improvements, tooling, training.]
|
|
211
|
+
```
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-creator
|
|
3
|
+
description: Create new ClawNet skills by guiding the user through requirements gathering, SKILL.md authoring, validation, and installation. Use when the user wants to create a custom skill or package domain knowledge as a reusable capability.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Creator
|
|
7
|
+
|
|
8
|
+
A meta-skill for creating new ClawNet skills. Guides the process from requirements gathering through SKILL.md authoring, validation, and installation.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
ClawNet skills are Markdown files (`SKILL.md`) that teach an AI agent how to perform a specific task. This skill helps you create high-quality skills that trigger correctly, provide actionable guidance, and produce consistent output.
|
|
13
|
+
|
|
14
|
+
Skills are stored at `~/.clawnet/.claude/skills/{name}/SKILL.md` and are automatically discovered by all ClawNet agents through lazy loading — only the name and description are loaded at startup (~2% of context), with full content injected on demand when the skill is triggered.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
- Creating a new custom skill for a specific domain or workflow
|
|
19
|
+
- Packaging recurring prompt patterns into a reusable skill
|
|
20
|
+
- Extending ClawNet's capabilities with specialized knowledge
|
|
21
|
+
- Formalizing a team's best practices into a skill that agents follow
|
|
22
|
+
|
|
23
|
+
## When NOT to Use
|
|
24
|
+
|
|
25
|
+
- **Creating MCP servers** — use the `mcp-builder` skill instead; MCP servers provide tools, skills provide guidance
|
|
26
|
+
- **One-off prompt engineering** — if you need something once, just ask directly
|
|
27
|
+
- **System configuration** — skills are not for changing agent settings or permissions
|
|
28
|
+
|
|
29
|
+
## Skill Creation Process
|
|
30
|
+
|
|
31
|
+
### Step 1: Requirements Gathering
|
|
32
|
+
|
|
33
|
+
Before writing anything, clarify:
|
|
34
|
+
|
|
35
|
+
1. **What capability does this skill provide?** Describe in one sentence what the agent should be able to do after loading this skill.
|
|
36
|
+
2. **What triggers this skill?** What would a user say or ask that should activate it? List 3-5 example triggers.
|
|
37
|
+
3. **What should NOT trigger this skill?** List scenarios where a similar request should use a different skill or no skill.
|
|
38
|
+
4. **What is the expected output?** Describe the format, structure, and content of what the skill produces.
|
|
39
|
+
5. **What knowledge does the skill encode?** List the domain expertise, processes, or best practices that make this skill valuable.
|
|
40
|
+
|
|
41
|
+
### Step 2: Name and Description
|
|
42
|
+
|
|
43
|
+
**Name rules:**
|
|
44
|
+
- Lowercase kebab-case: `my-skill-name`
|
|
45
|
+
- Maximum 64 characters
|
|
46
|
+
- Descriptive but concise: prefer `security-audit` over `comprehensive-security-vulnerability-analysis-tool`
|
|
47
|
+
- No generic names: avoid `helper`, `utils`, `tool`
|
|
48
|
+
|
|
49
|
+
**Description rules:**
|
|
50
|
+
- Maximum 1024 characters (one sentence ideal, two sentences maximum)
|
|
51
|
+
- Start with an action verb: "Perform...", "Generate...", "Analyze...", "Design..."
|
|
52
|
+
- Include the trigger context: "Use when..." or "Activate when..."
|
|
53
|
+
- Be specific enough to avoid false triggers from unrelated requests
|
|
54
|
+
- Be broad enough to capture all valid use cases
|
|
55
|
+
|
|
56
|
+
**Description quality test:**
|
|
57
|
+
- Would this description trigger on the example inputs from Step 1? (Must be yes)
|
|
58
|
+
- Would this description trigger on the "should NOT trigger" examples? (Must be no)
|
|
59
|
+
- Could someone unfamiliar with the skill understand when to use it from the description alone? (Must be yes)
|
|
60
|
+
|
|
61
|
+
### Step 3: Structure Design
|
|
62
|
+
|
|
63
|
+
Choose sections based on what your skill does. Not every section is needed for every skill.
|
|
64
|
+
|
|
65
|
+
**Required sections:**
|
|
66
|
+
- YAML frontmatter (`name` + `description`)
|
|
67
|
+
- Overview (what and why, 5-15 lines)
|
|
68
|
+
- When to Use (trigger conditions)
|
|
69
|
+
- When NOT to Use (avoid false triggers)
|
|
70
|
+
- Core content (the actual guidance — process, checklist, framework, etc.)
|
|
71
|
+
|
|
72
|
+
**Optional sections (include if relevant):**
|
|
73
|
+
- Output Format / Template (if the skill produces structured output)
|
|
74
|
+
- Examples (if the process is complex and benefits from worked examples)
|
|
75
|
+
- Common Patterns / Variations (if the skill adapts to different scenarios)
|
|
76
|
+
- Anti-Patterns / Pitfalls (if there are common mistakes to avoid)
|
|
77
|
+
- Related Skills (if this skill works in combination with others)
|
|
78
|
+
|
|
79
|
+
### Step 4: Write SKILL.md
|
|
80
|
+
|
|
81
|
+
Follow the template below. Key writing principles:
|
|
82
|
+
|
|
83
|
+
- **Be specific, not abstract.** "Check for SQL injection in all user input fields" is better than "Consider security implications."
|
|
84
|
+
- **Be actionable.** Every section should tell the agent what to DO, not just what to KNOW.
|
|
85
|
+
- **Use checklists for verification.** Agents follow checklists reliably.
|
|
86
|
+
- **Include examples for complex patterns.** Show, don't just tell.
|
|
87
|
+
- **Keep it focused.** One skill, one capability. If you need two capabilities, create two skills.
|
|
88
|
+
|
|
89
|
+
### Step 5: Validate
|
|
90
|
+
|
|
91
|
+
Run through this validation checklist before installing:
|
|
92
|
+
|
|
93
|
+
- [ ] YAML frontmatter is valid (`name` ≤64 chars, `description` ≤1024 chars)
|
|
94
|
+
- [ ] Name is lowercase kebab-case with no spaces
|
|
95
|
+
- [ ] Description starts with an action verb
|
|
96
|
+
- [ ] Description includes "Use when..." trigger context
|
|
97
|
+
- [ ] "When to Use" section lists 3+ concrete trigger scenarios
|
|
98
|
+
- [ ] "When NOT to Use" section lists at least one exclusion
|
|
99
|
+
- [ ] Core content provides step-by-step actionable guidance
|
|
100
|
+
- [ ] No external hard dependencies (tools/libraries are optional, not required)
|
|
101
|
+
- [ ] Output format is defined if the skill produces structured output
|
|
102
|
+
- [ ] Total length is appropriate: 100-600 lines (under 100 is likely too thin; over 600 risks context bloat)
|
|
103
|
+
|
|
104
|
+
### Step 6: Install
|
|
105
|
+
|
|
106
|
+
Save the skill to the ClawNet skills directory:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
~/.clawnet/.claude/skills/{name}/SKILL.md
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The skill will be automatically discovered by all ClawNet agents on their next startup. No restart is needed for agents that are already running — they will pick it up when the skill directory is rescanned.
|
|
113
|
+
|
|
114
|
+
## SKILL.md Template
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
---
|
|
118
|
+
name: {kebab-case-name}
|
|
119
|
+
description: {Action verb} {what it does}. Use when {trigger context}.
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
# {Skill Title}
|
|
123
|
+
|
|
124
|
+
{One paragraph overview: what this skill does, why it exists, and what makes it valuable.}
|
|
125
|
+
|
|
126
|
+
## When to Use
|
|
127
|
+
|
|
128
|
+
- {Trigger scenario 1}
|
|
129
|
+
- {Trigger scenario 2}
|
|
130
|
+
- {Trigger scenario 3}
|
|
131
|
+
|
|
132
|
+
## When NOT to Use
|
|
133
|
+
|
|
134
|
+
- {Exclusion 1 — and which skill to use instead}
|
|
135
|
+
- {Exclusion 2}
|
|
136
|
+
|
|
137
|
+
## {Core Process / Framework / Methodology}
|
|
138
|
+
|
|
139
|
+
### Step 1: {First step}
|
|
140
|
+
|
|
141
|
+
{Detailed guidance for this step. Be specific and actionable.}
|
|
142
|
+
|
|
143
|
+
### Step 2: {Second step}
|
|
144
|
+
|
|
145
|
+
{Detailed guidance.}
|
|
146
|
+
|
|
147
|
+
### Step 3: {Third step}
|
|
148
|
+
|
|
149
|
+
{Detailed guidance.}
|
|
150
|
+
|
|
151
|
+
## Output Format
|
|
152
|
+
|
|
153
|
+
{Describe or show the expected output structure.}
|
|
154
|
+
|
|
155
|
+
## {Additional Sections as Needed}
|
|
156
|
+
|
|
157
|
+
{Common patterns, anti-patterns, examples, related skills, etc.}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Description Writing Guide
|
|
161
|
+
|
|
162
|
+
The description is the most important part of a skill — it determines when the skill is triggered. A poorly written description leads to missed triggers or false activations.
|
|
163
|
+
|
|
164
|
+
**Pattern: Action + Target + Trigger**
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
{Action verb} {what} {on what}. Use when {specific trigger context}.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Good examples:**
|
|
171
|
+
- "Perform systematic security audits on codebases. Use when reviewing code for vulnerabilities, checking OWASP compliance, or assessing dependency security."
|
|
172
|
+
- "Generate structured changelogs from git history. Use when preparing a release, documenting changes, or creating version notes."
|
|
173
|
+
- "Analyze meeting transcripts to extract action items, decisions, and key insights. Use when processing meeting notes or recordings."
|
|
174
|
+
|
|
175
|
+
**Bad examples (and why):**
|
|
176
|
+
- "Help with security stuff." — Too vague, will trigger on anything security-related.
|
|
177
|
+
- "A comprehensive tool for analyzing, reviewing, auditing, and improving security posture across all dimensions of a codebase including dependencies, configurations, and runtime behavior." — Too long, tries to cover everything, description > 1024 chars risk.
|
|
178
|
+
- "Security audit." — No trigger context, no action verb, agent cannot tell when to use it.
|
|
179
|
+
|
|
180
|
+
## Common Skill Types
|
|
181
|
+
|
|
182
|
+
### Analysis Skill
|
|
183
|
+
Input → structured analysis → report. Examples: code-review, security-audit, performance-analysis.
|
|
184
|
+
|
|
185
|
+
Key sections: Analysis Framework (step-by-step), Dimensions/Criteria (what to evaluate), Finding Format (how to report issues), Summary Template.
|
|
186
|
+
|
|
187
|
+
### Generation Skill
|
|
188
|
+
Requirements → artifact. Examples: changelog-generator, skill-creator, technical-writing.
|
|
189
|
+
|
|
190
|
+
Key sections: Input Requirements, Generation Process, Output Format/Template, Quality Checklist.
|
|
191
|
+
|
|
192
|
+
### Process Skill
|
|
193
|
+
Step-by-step workflow. Examples: testing (TDD cycle), pair-programming, deep-research.
|
|
194
|
+
|
|
195
|
+
Key sections: Process Steps (detailed, ordered), Decision Points (when to branch), Common Patterns, Anti-Patterns.
|
|
196
|
+
|
|
197
|
+
### Review Skill
|
|
198
|
+
Input → findings → recommendations. Examples: code-review, architecture (review checklist).
|
|
199
|
+
|
|
200
|
+
Key sections: Review Criteria, Severity/Confidence Calibration, Finding Format, Summary Template.
|