@patricio0312rev/skillset 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/LICENSE +21 -0
  3. package/README.md +176 -0
  4. package/bin/cli.js +37 -0
  5. package/package.json +55 -0
  6. package/src/commands/init.js +301 -0
  7. package/src/index.js +168 -0
  8. package/src/lib/config.js +200 -0
  9. package/src/lib/generator.js +166 -0
  10. package/src/utils/display.js +95 -0
  11. package/src/utils/readme.js +196 -0
  12. package/src/utils/tool-specific.js +233 -0
  13. package/templates/ai-engineering/agent-orchestration-planner/ SKILL.md +266 -0
  14. package/templates/ai-engineering/cost-latency-optimizer/ SKILL.md +270 -0
  15. package/templates/ai-engineering/doc-to-vector-dataset-generator/ SKILL.md +239 -0
  16. package/templates/ai-engineering/evaluation-harness/ SKILL.md +219 -0
  17. package/templates/ai-engineering/guardrails-safety-filter-builder/ SKILL.md +226 -0
  18. package/templates/ai-engineering/llm-debugger/ SKILL.md +283 -0
  19. package/templates/ai-engineering/prompt-regression-tester/ SKILL.md +216 -0
  20. package/templates/ai-engineering/prompt-template-builder/ SKILL.md +393 -0
  21. package/templates/ai-engineering/rag-pipeline-builder/ SKILL.md +244 -0
  22. package/templates/ai-engineering/tool-function-schema-designer/ SKILL.md +219 -0
  23. package/templates/architecture/adr-writer/ SKILL.md +250 -0
  24. package/templates/architecture/api-versioning-deprecation-planner/ SKILL.md +331 -0
  25. package/templates/architecture/domain-model-boundaries-mapper/ SKILL.md +300 -0
  26. package/templates/architecture/migration-planner/ SKILL.md +376 -0
  27. package/templates/architecture/performance-budget-setter/ SKILL.md +318 -0
  28. package/templates/architecture/reliability-strategy-builder/ SKILL.md +286 -0
  29. package/templates/architecture/rfc-generator/ SKILL.md +362 -0
  30. package/templates/architecture/scalability-playbook/ SKILL.md +279 -0
  31. package/templates/architecture/system-design-generator/ SKILL.md +339 -0
  32. package/templates/architecture/tech-debt-prioritizer/ SKILL.md +329 -0
  33. package/templates/backend/api-contract-normalizer/ SKILL.md +487 -0
  34. package/templates/backend/api-endpoint-generator/ SKILL.md +415 -0
  35. package/templates/backend/auth-module-builder/ SKILL.md +99 -0
  36. package/templates/backend/background-jobs-designer/ SKILL.md +166 -0
  37. package/templates/backend/caching-strategist/ SKILL.md +190 -0
  38. package/templates/backend/error-handling-standardizer/ SKILL.md +174 -0
  39. package/templates/backend/rate-limiting-abuse-protection/ SKILL.md +147 -0
  40. package/templates/backend/rbac-permissions-builder/ SKILL.md +158 -0
  41. package/templates/backend/service-layer-extractor/ SKILL.md +269 -0
  42. package/templates/backend/webhook-receiver-hardener/ SKILL.md +211 -0
  43. package/templates/ci-cd/artifact-sbom-publisher/ SKILL.md +236 -0
  44. package/templates/ci-cd/caching-strategy-optimizer/ SKILL.md +195 -0
  45. package/templates/ci-cd/deployment-checklist-generator/ SKILL.md +381 -0
  46. package/templates/ci-cd/github-actions-pipeline-creator/ SKILL.md +348 -0
  47. package/templates/ci-cd/monorepo-ci-optimizer/ SKILL.md +298 -0
  48. package/templates/ci-cd/preview-environments-builder/ SKILL.md +187 -0
  49. package/templates/ci-cd/quality-gates-enforcer/ SKILL.md +342 -0
  50. package/templates/ci-cd/release-automation-builder/ SKILL.md +281 -0
  51. package/templates/ci-cd/rollback-workflow-builder/ SKILL.md +372 -0
  52. package/templates/ci-cd/secrets-env-manager/ SKILL.md +242 -0
  53. package/templates/db-management/backup-restore-runbook-generator/ SKILL.md +505 -0
  54. package/templates/db-management/data-integrity-auditor/ SKILL.md +505 -0
  55. package/templates/db-management/data-retention-archiving-planner/ SKILL.md +430 -0
  56. package/templates/db-management/data-seeding-fixtures-builder/ SKILL.md +375 -0
  57. package/templates/db-management/db-performance-watchlist/ SKILL.md +425 -0
  58. package/templates/db-management/etl-sync-job-builder/ SKILL.md +457 -0
  59. package/templates/db-management/multi-tenant-safety-checker/ SKILL.md +398 -0
  60. package/templates/db-management/prisma-migration-assistant/ SKILL.md +379 -0
  61. package/templates/db-management/schema-consistency-checker/ SKILL.md +440 -0
  62. package/templates/db-management/sql-query-optimizer/ SKILL.md +324 -0
  63. package/templates/foundation/changelog-writer/ SKILL.md +431 -0
  64. package/templates/foundation/code-formatter-installer/ SKILL.md +320 -0
  65. package/templates/foundation/codebase-summarizer/ SKILL.md +360 -0
  66. package/templates/foundation/dependency-doctor/ SKILL.md +163 -0
  67. package/templates/foundation/dev-environment-bootstrapper/ SKILL.md +259 -0
  68. package/templates/foundation/dev-onboarding-builder/ SKILL.md +556 -0
  69. package/templates/foundation/docs-starter-kit/ SKILL.md +574 -0
  70. package/templates/foundation/explaining-code/SKILL.md +13 -0
  71. package/templates/foundation/git-hygiene-enforcer/ SKILL.md +455 -0
  72. package/templates/foundation/project-scaffolder/ SKILL.md +65 -0
  73. package/templates/foundation/project-scaffolder/references/templates.md +126 -0
  74. package/templates/foundation/repo-structure-linter/ SKILL.md +0 -0
  75. package/templates/foundation/repo-structure-linter/references/conventions.md +98 -0
  76. package/templates/frontend/animation-micro-interaction-pack/ SKILL.md +41 -0
  77. package/templates/frontend/component-scaffold-generator/ SKILL.md +562 -0
  78. package/templates/frontend/design-to-component-translator/ SKILL.md +547 -0
  79. package/templates/frontend/form-wizard-builder/ SKILL.md +553 -0
  80. package/templates/frontend/frontend-refactor-planner/ SKILL.md +37 -0
  81. package/templates/frontend/i18n-frontend-implementer/ SKILL.md +44 -0
  82. package/templates/frontend/modal-drawer-system/ SKILL.md +377 -0
  83. package/templates/frontend/page-layout-builder/ SKILL.md +630 -0
  84. package/templates/frontend/state-ux-flow-builder/ SKILL.md +23 -0
  85. package/templates/frontend/table-builder/ SKILL.md +350 -0
  86. package/templates/performance/alerting-dashboard-builder/ SKILL.md +162 -0
  87. package/templates/performance/backend-latency-profiler-helper/ SKILL.md +108 -0
  88. package/templates/performance/caching-cdn-strategy-planner/ SKILL.md +150 -0
  89. package/templates/performance/capacity-planning-helper/ SKILL.md +242 -0
  90. package/templates/performance/core-web-vitals-tuner/ SKILL.md +126 -0
  91. package/templates/performance/incident-runbook-generator/ SKILL.md +162 -0
  92. package/templates/performance/load-test-scenario-builder/ SKILL.md +256 -0
  93. package/templates/performance/observability-setup/ SKILL.md +232 -0
  94. package/templates/performance/postmortem-writer/ SKILL.md +203 -0
  95. package/templates/performance/structured-logging-standardizer/ SKILL.md +122 -0
  96. package/templates/security/auth-security-reviewer/ SKILL.md +428 -0
  97. package/templates/security/dependency-vulnerability-triage/ SKILL.md +495 -0
  98. package/templates/security/input-validation-sanitization-auditor/ SKILL.md +76 -0
  99. package/templates/security/pii-redaction-logging-policy-builder/ SKILL.md +65 -0
  100. package/templates/security/rbac-policy-tester/ SKILL.md +80 -0
  101. package/templates/security/secrets-scanner/ SKILL.md +462 -0
  102. package/templates/security/secure-headers-csp-builder/ SKILL.md +404 -0
  103. package/templates/security/security-incident-playbook-generator/ SKILL.md +76 -0
  104. package/templates/security/security-pr-checklist-skill/ SKILL.md +62 -0
  105. package/templates/security/threat-model-generator/ SKILL.md +394 -0
  106. package/templates/testing/contract-testing-builder/ SKILL.md +492 -0
  107. package/templates/testing/coverage-strategist/ SKILL.md +436 -0
  108. package/templates/testing/e2e-test-builder/ SKILL.md +382 -0
  109. package/templates/testing/flaky-test-detective/ SKILL.md +416 -0
  110. package/templates/testing/integration-test-builder/ SKILL.md +525 -0
  111. package/templates/testing/mocking-assistant/ SKILL.md +383 -0
  112. package/templates/testing/snapshot-test-refactorer/ SKILL.md +375 -0
  113. package/templates/testing/test-data-factory-builder/ SKILL.md +449 -0
  114. package/templates/testing/test-reporting-triage-skill/ SKILL.md +469 -0
  115. package/templates/testing/unit-test-generator/ SKILL.md +548 -0
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: tool-function-schema-designer
3
+ description: Designs robust function/tool calling schemas for LLMs with JSON schemas, validation strategies, typed interfaces, and example calls. Use when implementing "function calling", "tool use", "LLM tools", or "agent actions".
4
+ ---
5
+
6
+ # Tool/Function Schema Designer
7
+
8
+ Design robust tool schemas that LLMs can reliably invoke.
9
+
10
+ ## Function Schema Format
11
+
12
+ ```typescript
13
+ // OpenAI function calling format
14
+ const searchDocsTool = {
15
+ type: "function",
16
+ function: {
17
+ name: "search_documentation",
18
+ description:
19
+ "Search through product documentation using semantic search. Use this when the user asks about features, how-tos, or troubleshooting.",
20
+ parameters: {
21
+ type: "object",
22
+ properties: {
23
+ query: {
24
+ type: "string",
25
+ description: "The search query, phrased as a question or keywords",
26
+ },
27
+ filters: {
28
+ type: "object",
29
+ properties: {
30
+ category: {
31
+ type: "string",
32
+ enum: ["api", "guides", "tutorials", "troubleshooting"],
33
+ description: "Filter by documentation category",
34
+ },
35
+ version: {
36
+ type: "string",
37
+ description: "Filter by product version (e.g., 'v2.0')",
38
+ },
39
+ },
40
+ },
41
+ max_results: {
42
+ type: "integer",
43
+ minimum: 1,
44
+ maximum: 10,
45
+ default: 5,
46
+ description: "Maximum number of results to return",
47
+ },
48
+ },
49
+ required: ["query"],
50
+ },
51
+ },
52
+ };
53
+ ```
54
+
55
+ ## Typed Interfaces
56
+
57
+ ```typescript
58
+ // TypeScript types matching schema
59
+ interface SearchDocsParams {
60
+ query: string;
61
+ filters?: {
62
+ category?: "api" | "guides" | "tutorials" | "troubleshooting";
63
+ version?: string;
64
+ };
65
+ max_results?: number;
66
+ }
67
+
68
+ // Implementation
69
+ async function search_documentation(
70
+ params: SearchDocsParams
71
+ ): Promise<SearchResult[]> {
72
+ const { query, filters = {}, max_results = 5 } = params;
73
+
74
+ // Implementation
75
+ return await vectorStore.search(query, {
76
+ filter: filters,
77
+ limit: max_results,
78
+ });
79
+ }
80
+ ```
81
+
82
+ ## Validation Strategy
83
+
84
+ ```typescript
85
+ import { z } from "zod";
86
+
87
+ // Zod schema for runtime validation
88
+ const searchDocsSchema = z.object({
89
+ query: z.string().min(1, "Query cannot be empty"),
90
+ filters: z
91
+ .object({
92
+ category: z
93
+ .enum(["api", "guides", "tutorials", "troubleshooting"])
94
+ .optional(),
95
+ version: z.string().optional(),
96
+ })
97
+ .optional(),
98
+ max_results: z.number().int().min(1).max(10).default(5),
99
+ });
100
+
101
+ // Validate before execution
102
+ function validateAndExecute(toolName: string, params: unknown) {
103
+ const validated = searchDocsSchema.parse(params);
104
+ return search_documentation(validated);
105
+ }
106
+ ```
107
+
108
+ ## Tool Registry
109
+
110
+ ```typescript
111
+ export const TOOLS = {
112
+ search_documentation: {
113
+ schema: searchDocsTool,
114
+ implementation: search_documentation,
115
+ validator: searchDocsSchema,
116
+ },
117
+ create_ticket: {
118
+ schema: createTicketTool,
119
+ implementation: create_ticket,
120
+ validator: createTicketSchema,
121
+ },
122
+ // ... more tools
123
+ };
124
+
125
+ // Execute tool safely
126
+ async function executeTool(name: string, params: unknown) {
127
+ const tool = TOOLS[name];
128
+ if (!tool) throw new Error(`Unknown tool: ${name}`);
129
+
130
+ const validated = tool.validator.parse(params);
131
+ return tool.implementation(validated);
132
+ }
133
+ ```
134
+
135
+ ## Example Calls
136
+
137
+ ```typescript
138
+ // Example 1: Simple search
139
+ {
140
+ "name": "search_documentation",
141
+ "parameters": {
142
+ "query": "How do I authenticate API requests?"
143
+ }
144
+ }
145
+
146
+ // Example 2: With filters
147
+ {
148
+ "name": "search_documentation",
149
+ "parameters": {
150
+ "query": "rate limiting",
151
+ "filters": {
152
+ "category": "api",
153
+ "version": "v2.0"
154
+ },
155
+ "max_results": 3
156
+ }
157
+ }
158
+ ```
159
+
160
+ ## Error Handling
161
+
162
+ ```typescript
163
+ interface ToolResult {
164
+ success: boolean;
165
+ data?: any;
166
+ error?: {
167
+ code: string;
168
+ message: string;
169
+ };
170
+ }
171
+
172
+ async function safeExecuteTool(
173
+ name: string,
174
+ params: unknown
175
+ ): Promise<ToolResult> {
176
+ try {
177
+ const data = await executeTool(name, params);
178
+ return { success: true, data };
179
+ } catch (error) {
180
+ if (error instanceof z.ZodError) {
181
+ return {
182
+ success: false,
183
+ error: {
184
+ code: "VALIDATION_ERROR",
185
+ message: `Invalid parameters: ${error.message}`,
186
+ },
187
+ };
188
+ }
189
+ return {
190
+ success: false,
191
+ error: {
192
+ code: "EXECUTION_ERROR",
193
+ message: error.message,
194
+ },
195
+ };
196
+ }
197
+ }
198
+ ```
199
+
200
+ ## Best Practices
201
+
202
+ 1. **Clear descriptions**: Explain when to use the tool
203
+ 2. **Specific types**: Use enums, ranges, patterns
204
+ 3. **Sensible defaults**: Reduce required parameters
205
+ 4. **Validate rigorously**: Don't trust LLM output
206
+ 5. **Error messages**: Help LLM correct mistakes
207
+ 6. **Example calls**: Show success cases
208
+ 7. **Type safety**: TypeScript interfaces
209
+
210
+ ## Output Checklist
211
+
212
+ - [ ] JSON schema defined
213
+ - [ ] TypeScript interface
214
+ - [ ] Validation with Zod
215
+ - [ ] Implementation function
216
+ - [ ] Error handling
217
+ - [ ] Example calls (3+)
218
+ - [ ] Tool registry entry
219
+ - [ ] Documentation
@@ -0,0 +1,250 @@
1
+ ---
2
+ name: adr-writer
3
+ description: Creates Architecture Decision Records documenting key technical decisions with context, alternatives considered, tradeoffs, consequences, and decision owners. Use when documenting "architecture decisions", "technical choices", "design decisions", or "ADRs".
4
+ ---
5
+
6
+ # ADR Writer
7
+
8
+ Document architecture decisions with clear context, alternatives, and consequences.
9
+
10
+ ## ADR Template
11
+
12
+ ```markdown
13
+ # ADR-001: [Title of Decision]
14
+
15
+ **Status:** Proposed | Accepted | Deprecated | Superseded by ADR-XXX
16
+ **Date:** 2024-01-15
17
+ **Deciders:** Alice (Tech Lead), Bob (Principal Engineer)
18
+ **Owner:** Alice
19
+
20
+ ## Context
21
+
22
+ What is the issue we're facing? What factors are driving this decision?
23
+
24
+ We need to choose a database for our new analytics service. Current
25
+ requirements:
26
+
27
+ - 10M+ events per day
28
+ - Complex aggregation queries
29
+ - Real-time dashboards
30
+ - Budget: $5k/month
31
+ - Team familiar with SQL
32
+
33
+ ## Decision
34
+
35
+ We will use PostgreSQL with TimescaleDB extension.
36
+
37
+ ## Alternatives Considered
38
+
39
+ ### Option 1: PostgreSQL + TimescaleDB (CHOSEN)
40
+
41
+ **Pros:**
42
+
43
+ - Team already knows PostgreSQL
44
+ - Time-series optimization for analytics
45
+ - Reliable and proven
46
+ - Good query performance
47
+ - Reasonable cost (~$3k/month)
48
+
49
+ **Cons:**
50
+
51
+ - Requires manual scaling effort
52
+ - Not purpose-built for analytics
53
+
54
+ ### Option 2: ClickHouse
55
+
56
+ **Pros:**
57
+
58
+ - Excellent query performance for analytics
59
+ - Built for analytics workloads
60
+ - Column-oriented storage
61
+
62
+ **Cons:**
63
+
64
+ - Team unfamiliar with ClickHouse
65
+ - Steeper learning curve
66
+ - Different query syntax
67
+
68
+ ### Option 3: BigQuery
69
+
70
+ **Pros:**
71
+
72
+ - Fully managed
73
+ - Excellent for analytics
74
+ - Scales automatically
75
+
76
+ **Cons:**
77
+
78
+ - Higher cost (~$8k/month for our volume)
79
+ - Vendor lock-in to GCP
80
+ - Less control over optimization
81
+
82
+ ## Tradeoffs
83
+
84
+ **What we're optimizing for:**
85
+
86
+ - Team velocity (familiar tech)
87
+ - Cost efficiency
88
+ - Good enough performance
89
+
90
+ **What we're sacrificing:**
91
+
92
+ - Peak analytical performance (vs ClickHouse)
93
+ - Fully managed experience (vs BigQuery)
94
+
95
+ ## Consequences
96
+
97
+ ### Positive
98
+
99
+ - Development can start immediately (no learning curve)
100
+ - Lower operational costs
101
+ - Can reuse existing PostgreSQL expertise
102
+ - Easy integration with current stack
103
+
104
+ ### Negative
105
+
106
+ - Will need to manually optimize queries
107
+ - May need to revisit if we scale 10x
108
+ - Requires more operational work than BigQuery
109
+
110
+ ### Risks
111
+
112
+ - Performance may degrade at 100M+ events/day
113
+ - **Mitigation:** Monitor query performance, plan migration at 50M events/day
114
+
115
+ ## Implementation Notes
116
+
117
+ - Use TimescaleDB hypertables for event storage
118
+ - Implement continuous aggregates for common queries
119
+ - Set up read replicas for dashboard queries
120
+ - Document scaling runbook at 50M events/day
121
+
122
+ ## Follow-up Actions
123
+
124
+ - [ ] Provision PostgreSQL + TimescaleDB cluster (Alice, by 2024-01-20)
125
+ - [ ] Create migration script from MySQL (Bob, by 2024-01-22)
126
+ - [ ] Set up monitoring dashboards (Alice, by 2024-01-25)
127
+ - [ ] Document scaling thresholds (Alice, by 2024-01-30)
128
+
129
+ ## References
130
+
131
+ - [TimescaleDB Benchmarks](https://example.com)
132
+ - [Cost Analysis Spreadsheet](https://docs.google.com/...)
133
+ - [Team Survey Results](https://example.com)
134
+
135
+ ## Revision History
136
+
137
+ - 2024-01-15: Initial draft (Alice)
138
+ - 2024-01-16: Added cost analysis (Bob)
139
+ - 2024-01-17: Accepted by architecture review board
140
+ ```
141
+
142
+ ## ADR Numbering
143
+
144
+ ```
145
+ ADR-001: Initial System Architecture
146
+ ADR-002: Database Selection for Analytics
147
+ ADR-003: Authentication Strategy
148
+ ...
149
+ ```
150
+
151
+ ## Status Workflow
152
+
153
+ ```
154
+ Proposed → Accepted → Implemented
155
+
156
+ Rejected
157
+
158
+ Accepted → Deprecated → Superseded by ADR-XXX
159
+ ```
160
+
161
+ ## Common Decision Types
162
+
163
+ **Technology Selection:**
164
+
165
+ - Database choice
166
+ - Framework selection
167
+ - Cloud provider
168
+ - Programming language
169
+
170
+ **Architecture Patterns:**
171
+
172
+ - Microservices vs Monolith
173
+ - Event-driven vs Request-response
174
+ - Sync vs Async communication
175
+
176
+ **Infrastructure:**
177
+
178
+ - Deployment strategy
179
+ - Monitoring approach
180
+ - Scaling strategy
181
+
182
+ **Security:**
183
+
184
+ - Authentication method
185
+ - Data encryption approach
186
+ - Access control model
187
+
188
+ ## Quick Start Guide
189
+
190
+ ```bash
191
+ # 1. Create new ADR
192
+ cp templates/adr-template.md docs/adr/ADR-042-title.md
193
+
194
+ # 2. Fill in sections
195
+ # - Context: Why are we making this decision?
196
+ # - Decision: What did we decide?
197
+ # - Alternatives: What else did we consider?
198
+ # - Consequences: What are the impacts?
199
+
200
+ # 3. Review with team
201
+ # - Share in architecture channel
202
+ # - Get feedback from stakeholders
203
+ # - Iterate on alternatives
204
+
205
+ # 4. Update status to "Accepted"
206
+ # 5. Link from main architecture docs
207
+ ```
208
+
209
+ ## Best Practices
210
+
211
+ 1. **Write ADRs for significant decisions**: Not every choice needs an ADR
212
+ 2. **Document alternatives**: Show you considered options
213
+ 3. **Be honest about tradeoffs**: Every decision has downsides
214
+ 4. **Keep it concise**: 1-2 pages maximum
215
+ 5. **Update status**: Mark deprecated/superseded ADRs
216
+ 6. **Link related ADRs**: Create decision trails
217
+ 7. **Include follow-ups**: Action items with owners
218
+
219
+ ## Anti-Patterns
220
+
221
+ ❌ **Too detailed**: 10-page ADRs nobody reads
222
+ ❌ **No alternatives**: Looks like decision was predetermined
223
+ ❌ **Missing consequences**: Ignoring downsides
224
+ ❌ **No owner**: Nobody accountable
225
+ ❌ **Outdated status**: Old ADRs marked "Proposed"
226
+
227
+ ## Review Checklist
228
+
229
+ - [ ] Clear problem statement in Context
230
+ - [ ] Decision is stated explicitly
231
+ - [ ] 2+ alternatives considered
232
+ - [ ] Tradeoffs honestly assessed
233
+ - [ ] Consequences (positive and negative) documented
234
+ - [ ] Risks identified with mitigations
235
+ - [ ] Decision owner assigned
236
+ - [ ] Follow-up actions with deadlines
237
+ - [ ] Status is current
238
+
239
+ ## Output Checklist
240
+
241
+ - [ ] ADR document created
242
+ - [ ] Context explains the problem
243
+ - [ ] Decision clearly stated
244
+ - [ ] 2-3 alternatives documented
245
+ - [ ] Tradeoffs section filled
246
+ - [ ] Consequences listed (positive & negative)
247
+ - [ ] Risks identified with mitigations
248
+ - [ ] Decision date and owners
249
+ - [ ] Follow-up actions assigned
250
+ - [ ] Status is set