codemaxxing 0.1.14 → 0.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.
@@ -0,0 +1,482 @@
1
+ /**
2
+ * Built-in skills registry — hardcoded skill packs shipped with codemaxxing.
3
+ * No network needed — everything is local.
4
+ */
5
+
6
+ export interface RegistrySkill {
7
+ name: string;
8
+ description: string;
9
+ version: string;
10
+ author: string;
11
+ tags: string[];
12
+ prompt: string;
13
+ }
14
+
15
+ export const REGISTRY: RegistrySkill[] = [
16
+ {
17
+ name: "react-expert",
18
+ description: "React/Next.js best practices, hooks, component patterns, performance",
19
+ version: "1.0.0",
20
+ author: "codemaxxing",
21
+ tags: ["react", "nextjs", "frontend", "hooks", "components"],
22
+ prompt: `# React & Next.js Expert
23
+
24
+ ## Component Design
25
+ - Prefer function components with hooks over class components
26
+ - Keep components small and focused — one responsibility per component
27
+ - Extract custom hooks when logic is reused across 2+ components
28
+ - Use composition over prop drilling — leverage children, render props, or context
29
+ - Co-locate related files: Component.tsx, Component.test.tsx, Component.module.css
30
+
31
+ ## Hooks Best Practices
32
+ - Follow the Rules of Hooks — only call at the top level, only in React functions
33
+ - useMemo for expensive computations, useCallback for stable function references passed as props
34
+ - Don't over-memoize — profile first, optimize second
35
+ - useRef for values that don't trigger re-renders (timers, previous values, DOM refs)
36
+ - Custom hooks should start with "use" and encapsulate a single concern
37
+
38
+ ## State Management
39
+ - Start with local state (useState) — lift only when needed
40
+ - useReducer for complex state logic with multiple sub-values
41
+ - Context for truly global state (theme, auth, locale) — not for frequently updating data
42
+ - Consider Zustand or Jotai for medium-complexity state before reaching for Redux
43
+ - Avoid storing derived state — compute it during render
44
+
45
+ ## Performance
46
+ - React.memo only for components that re-render with same props frequently
47
+ - Virtualize long lists (react-window, @tanstack/virtual)
48
+ - Lazy load routes and heavy components with React.lazy + Suspense
49
+ - Use the React DevTools Profiler to identify actual bottlenecks
50
+ - Avoid creating new objects/arrays in render — define outside or memoize
51
+
52
+ ## Next.js Patterns
53
+ - Use Server Components by default — add "use client" only when needed
54
+ - Prefer server actions for mutations over API routes
55
+ - Use next/image for automatic image optimization
56
+ - Implement loading.tsx and error.tsx for each route segment
57
+ - Use generateStaticParams for static generation of dynamic routes
58
+
59
+ ## Anti-Patterns to Avoid
60
+ - Don't use useEffect for data that can be computed during render
61
+ - Don't sync state with useEffect when derived state works
62
+ - Don't use index as key for lists that reorder or filter
63
+ - Don't put everything in a single global store
64
+ - Don't fetch data in useEffect without cleanup/cancellation
65
+ - Avoid prop drilling more than 2 levels deep
66
+ `,
67
+ },
68
+ {
69
+ name: "python-pro",
70
+ description: "Pythonic code, type hints, async, testing, virtual envs",
71
+ version: "1.0.0",
72
+ author: "codemaxxing",
73
+ tags: ["python", "typing", "async", "testing", "backend"],
74
+ prompt: `# Python Professional
75
+
76
+ ## Pythonic Code
77
+ - Use list/dict/set comprehensions over manual loops when readable
78
+ - Prefer f-strings over .format() or % formatting
79
+ - Use enumerate() instead of manual index tracking
80
+ - Use zip() to iterate multiple sequences in parallel
81
+ - Leverage unpacking: a, b = tuple_val; first, *rest = items
82
+ - Use pathlib.Path over os.path for file operations
83
+ - Context managers (with statements) for resource management
84
+ - Use dataclasses or Pydantic models over raw dicts for structured data
85
+
86
+ ## Type Hints
87
+ - Add type hints to all function signatures (parameters and return types)
88
+ - Use | union syntax (Python 3.10+) over Union: \`def f(x: int | None)\`
89
+ - Use TypeVar and Generic for type-safe generic functions/classes
90
+ - Use Protocol for structural subtyping (duck typing with type safety)
91
+ - Annotate collections: list[str], dict[str, int], not just list, dict
92
+ - Use TypeAlias for complex types: \`UserMap: TypeAlias = dict[str, list[User]]\`
93
+ - Use @overload for functions with different return types based on input
94
+
95
+ ## Async Python
96
+ - Use asyncio for I/O-bound concurrency, not CPU-bound work
97
+ - Use \`async with\` for async context managers (aiohttp sessions, db connections)
98
+ - Use asyncio.gather() for concurrent async tasks
99
+ - Never mix sync and async I/O — use run_in_executor for legacy sync code
100
+ - Use asyncio.TaskGroup (3.11+) for structured concurrency
101
+ - Always handle cancellation in long-running async tasks
102
+
103
+ ## Testing
104
+ - Use pytest over unittest — it's simpler and more powerful
105
+ - Name tests descriptively: test_create_user_with_duplicate_email_raises_error
106
+ - Use fixtures for setup/teardown, conftest.py for shared fixtures
107
+ - Use parametrize for testing multiple inputs/outputs
108
+ - Mock external dependencies (APIs, databases) at the boundary
109
+ - Use freezegun or time-machine for time-dependent tests
110
+ - Aim for testing behavior, not implementation details
111
+
112
+ ## Project Structure
113
+ - Use pyproject.toml for project metadata and tool configuration
114
+ - Virtual environments: always use one (venv, uv, or poetry)
115
+ - Use ruff for linting and formatting (replaces flake8, black, isort)
116
+ - Structure: src/package_name/ layout for installable packages
117
+ - Pin dependencies with lock files (uv.lock, poetry.lock)
118
+ `,
119
+ },
120
+ {
121
+ name: "typescript-strict",
122
+ description: "Strict TS patterns, generics, utility types, type guards",
123
+ version: "1.0.0",
124
+ author: "codemaxxing",
125
+ tags: ["typescript", "types", "generics", "strict", "javascript"],
126
+ prompt: `# TypeScript Strict Mode Expert
127
+
128
+ ## Strict Configuration
129
+ - Enable all strict flags: strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes
130
+ - Never use \`any\` — use \`unknown\` and narrow with type guards
131
+ - Prefer \`as const\` assertions over widening literals
132
+ - Enable \`verbatimModuleSyntax\` for explicit type-only imports
133
+
134
+ ## Type Design
135
+ - Use discriminated unions over optional properties for state variants
136
+ - Prefer interfaces for object shapes, type aliases for unions/intersections
137
+ - Use branded/opaque types for semantic distinction: \`type UserId = string & { __brand: "UserId" }\`
138
+ - Make impossible states unrepresentable with union types
139
+ - Use \`satisfies\` operator to validate types without widening
140
+ - Template literal types for string patterns: \`type Route = \`/\${string}\`\`
141
+
142
+ ## Generics
143
+ - Name generic parameters descriptively: TItem over T when context helps
144
+ - Use constraints: \`<T extends Record<string, unknown>>\`
145
+ - Use conditional types for type-level branching: \`T extends string ? A : B\`
146
+ - Infer types in conditional types: \`T extends Promise<infer U> ? U : T\`
147
+ - Use mapped types for transformations: \`{ [K in keyof T]: Readonly<T[K]> }\`
148
+ - Use the \`NoInfer\` utility to prevent inference in specific positions
149
+
150
+ ## Utility Types
151
+ - Partial<T>, Required<T>, Readonly<T> for property modifiers
152
+ - Pick<T, K>, Omit<T, K> for object subsets
153
+ - Record<K, V> for typed dictionaries
154
+ - Extract<T, U>, Exclude<T, U> for union manipulation
155
+ - ReturnType<T>, Parameters<T> for function type extraction
156
+ - NonNullable<T> to strip null/undefined from unions
157
+
158
+ ## Type Guards & Narrowing
159
+ - Prefer \`in\` operator narrowing: \`if ("kind" in value)\`
160
+ - Write custom type guards: \`function isUser(v: unknown): v is User\`
161
+ - Use assertion functions: \`function assertDefined<T>(v: T | undefined): asserts v is T\`
162
+ - Exhaustive checks with \`never\`: \`const _exhaustive: never = value\`
163
+ - Use optional chaining (?.) and nullish coalescing (??) over manual checks
164
+
165
+ ## Anti-Patterns
166
+ - Never use \`as\` casts to silence errors — fix the types instead
167
+ - Don't use \`!\` non-null assertion — use proper null checks
168
+ - Don't use \`object\` type — use \`Record<string, unknown>\` or a specific interface
169
+ - Don't use enums — use \`as const\` objects or union types
170
+ - Don't use \`Function\` type — use specific function signatures
171
+ - Avoid \`@ts-ignore\` — use \`@ts-expect-error\` with an explanation if truly needed
172
+ `,
173
+ },
174
+ {
175
+ name: "api-designer",
176
+ description: "REST/GraphQL API design, OpenAPI, auth patterns, error handling",
177
+ version: "1.0.0",
178
+ author: "codemaxxing",
179
+ tags: ["api", "rest", "graphql", "openapi", "backend", "auth"],
180
+ prompt: `# API Design Expert
181
+
182
+ ## REST Design Principles
183
+ - Use nouns for resources, HTTP verbs for actions: GET /users, POST /users, DELETE /users/:id
184
+ - Use plural nouns for collections: /users not /user
185
+ - Nest resources for relationships: /users/:id/posts (max 2 levels deep)
186
+ - Use query parameters for filtering, sorting, pagination: ?status=active&sort=-created_at&page=2
187
+ - Return appropriate HTTP status codes: 200 OK, 201 Created, 204 No Content, 400 Bad Request, 404 Not Found
188
+ - Use PATCH for partial updates, PUT for full replacements
189
+ - Version your API: /v1/users or Accept: application/vnd.api+json;version=1
190
+
191
+ ## Response Design
192
+ - Consistent response envelope: { data, meta, errors }
193
+ - Pagination: cursor-based for real-time data, offset for simple lists
194
+ - Include total count in paginated responses: { data: [...], meta: { total: 142, page: 2 } }
195
+ - Use ISO 8601 for dates: "2024-01-15T10:30:00Z"
196
+ - Return created/updated resources in POST/PATCH responses
197
+ - HATEOAS links for discoverability when appropriate
198
+
199
+ ## Error Handling
200
+ - Structured error responses: { error: { code: "VALIDATION_ERROR", message: "...", details: [...] } }
201
+ - Use machine-readable error codes alongside human-readable messages
202
+ - Include field-level errors for validation: { field: "email", message: "already taken" }
203
+ - Never expose stack traces or internal details in production
204
+ - Rate limit errors should include retry-after headers
205
+ - 422 for validation errors, 409 for conflicts, 429 for rate limiting
206
+
207
+ ## Authentication & Security
208
+ - Use OAuth 2.0 / OIDC for user authentication
209
+ - API keys for service-to-service, JWTs for user sessions
210
+ - Short-lived access tokens (15min) + refresh tokens (7 days)
211
+ - Always validate and sanitize input — never trust the client
212
+ - CORS: whitelist specific origins, never use wildcard in production
213
+ - Rate limiting: per-user and per-IP, with appropriate headers
214
+
215
+ ## OpenAPI / Documentation
216
+ - Write OpenAPI 3.1 specs for all endpoints
217
+ - Include request/response examples for every endpoint
218
+ - Document error responses, not just success cases
219
+ - Use $ref for reusable schemas (User, Error, Pagination)
220
+ - Generate client SDKs from OpenAPI specs when possible
221
+
222
+ ## Anti-Patterns
223
+ - Don't use verbs in URLs: /getUsers → GET /users
224
+ - Don't return 200 for errors — use proper status codes
225
+ - Don't nest resources more than 2 levels deep
226
+ - Don't use POST for everything — use proper HTTP methods
227
+ - Don't expose database IDs if you can use UUIDs or slugs
228
+ - Don't return all fields by default — support field selection
229
+ `,
230
+ },
231
+ {
232
+ name: "test-engineer",
233
+ description: "Unit/integration/e2e testing, TDD, mocking, coverage strategies",
234
+ version: "1.0.0",
235
+ author: "codemaxxing",
236
+ tags: ["testing", "tdd", "jest", "vitest", "e2e", "mocking"],
237
+ prompt: `# Test Engineering Expert
238
+
239
+ ## Testing Philosophy
240
+ - Test behavior, not implementation — tests should survive refactors
241
+ - Follow the testing pyramid: many unit tests, fewer integration, fewest e2e
242
+ - Write the test first (TDD) when the interface is clear
243
+ - Each test should test one thing and have a descriptive name
244
+ - Tests are documentation — they should be readable without comments
245
+
246
+ ## Unit Testing
247
+ - Test pure functions exhaustively — they're the easiest to test
248
+ - Use the Arrange-Act-Assert (AAA) pattern
249
+ - Test edge cases: empty inputs, null/undefined, boundary values, error paths
250
+ - Keep tests independent — no shared mutable state between tests
251
+ - Use test.each / parametrize for data-driven tests
252
+ - Prefer real implementations over mocks when feasible
253
+
254
+ ## Mocking Strategy
255
+ - Mock at the boundary: external APIs, databases, file system, time
256
+ - Don't mock what you don't own — wrap third-party code and mock your wrapper
257
+ - Use dependency injection to make code testable
258
+ - Prefer stubs (return canned values) over spies (track calls) when possible
259
+ - Reset mocks between tests to prevent leakage
260
+ - Use MSW (Mock Service Worker) for API mocking in frontend tests
261
+
262
+ ## Integration Testing
263
+ - Test the contract between components/services
264
+ - Use real databases with test containers (testcontainers)
265
+ - Test API endpoints with supertest or similar HTTP testing libraries
266
+ - Verify database state changes, not just response codes
267
+ - Test error scenarios: network failures, timeouts, invalid data
268
+
269
+ ## E2E Testing
270
+ - Use Playwright or Cypress for browser-based e2e tests
271
+ - Test critical user journeys, not every feature
272
+ - Use data-testid attributes for stable selectors
273
+ - Implement retry logic for flaky network-dependent tests
274
+ - Run e2e tests in CI against a staging environment
275
+ - Keep e2e tests fast — parallelize and minimize setup
276
+
277
+ ## Coverage & Quality
278
+ - Aim for 80%+ line coverage, but don't chase 100%
279
+ - Focus coverage on business logic, not boilerplate
280
+ - Use mutation testing (Stryker) to verify test effectiveness
281
+ - Track coverage trends — decreasing coverage should block PRs
282
+ - Snapshot tests: use sparingly, review carefully, update intentionally
283
+
284
+ ## Anti-Patterns
285
+ - Don't test private methods directly — test through public interface
286
+ - Don't write tests that duplicate the implementation logic
287
+ - Don't use sleep/delays — use waitFor or polling utilities
288
+ - Don't share state between tests or depend on test execution order
289
+ - Don't mock everything — over-mocking makes tests meaningless
290
+ - Don't write flaky tests — fix or delete them
291
+ `,
292
+ },
293
+ {
294
+ name: "doc-writer",
295
+ description: "README, API docs, JSDoc/TSDoc, changelogs, clear writing",
296
+ version: "1.0.0",
297
+ author: "codemaxxing",
298
+ tags: ["documentation", "readme", "jsdoc", "tsdoc", "changelog", "writing"],
299
+ prompt: `# Documentation Expert
300
+
301
+ ## README Structure
302
+ - Start with a one-line description of what the project does
303
+ - Include a quick-start section: install → configure → run (under 5 steps)
304
+ - Add badges: CI status, npm version, license, coverage
305
+ - Show a screenshot or GIF for visual projects
306
+ - List key features as bullet points (5-8 max)
307
+ - Include a "Contributing" section with setup instructions
308
+ - License section at the bottom
309
+
310
+ ## Code Documentation (JSDoc/TSDoc)
311
+ - Document public APIs — skip obvious implementations
312
+ - Include @param, @returns, @throws, and @example tags
313
+ - Write descriptions that explain WHY, not WHAT (the code shows what)
314
+ - Use @deprecated with migration instructions
315
+ - Document non-obvious behavior, edge cases, and gotchas
316
+ - Keep descriptions concise — one sentence if possible
317
+ - Use @link to reference related functions or types
318
+
319
+ ## API Documentation
320
+ - Document every endpoint with: method, path, description, parameters, response
321
+ - Include request/response examples with realistic data
322
+ - Document error responses and status codes
323
+ - Group endpoints by resource/domain
324
+ - Use tools: Swagger/OpenAPI, Redoc, or Stoplight
325
+ - Keep docs in sync with code — generate from source when possible
326
+
327
+ ## Changelog
328
+ - Follow Keep a Changelog format (keepachangelog.com)
329
+ - Categories: Added, Changed, Deprecated, Removed, Fixed, Security
330
+ - Write entries from the user's perspective, not the developer's
331
+ - Link to relevant PRs and issues
332
+ - Include migration guides for breaking changes
333
+ - Use semantic versioning (semver.org)
334
+
335
+ ## Writing Style
336
+ - Use active voice: "Configure the database" not "The database should be configured"
337
+ - Be direct and concise — cut filler words
338
+ - Use second person: "you" not "the user"
339
+ - Define acronyms on first use
340
+ - Use consistent terminology throughout
341
+ - Prefer bullet points over long paragraphs
342
+ - Include code examples for anything non-trivial
343
+
344
+ ## Anti-Patterns
345
+ - Don't write docs that restate the function name: "getName gets the name"
346
+ - Don't leave TODO or placeholder docs in production code
347
+ - Don't document every line — trust readers to understand basic code
348
+ - Don't use jargon without explanation
349
+ - Don't write docs once and forget — keep them updated
350
+ - Don't put configuration details in comments — use docs or config files
351
+ `,
352
+ },
353
+ {
354
+ name: "security-audit",
355
+ description: "OWASP, dependency scanning, secrets, auth vulnerabilities",
356
+ version: "1.0.0",
357
+ author: "codemaxxing",
358
+ tags: ["security", "owasp", "auth", "vulnerabilities", "audit"],
359
+ prompt: `# Security Audit Expert
360
+
361
+ ## Input Validation
362
+ - Validate ALL user input on the server side — client validation is for UX only
363
+ - Use allowlists over denylists for input validation
364
+ - Sanitize HTML to prevent XSS — use DOMPurify or equivalent
365
+ - Parameterize all database queries — never concatenate user input into SQL
366
+ - Validate file uploads: check MIME type, size limits, and file content (not just extension)
367
+ - Rate limit all public endpoints, especially authentication
368
+ - Validate Content-Type headers to prevent CSRF via form submission
369
+
370
+ ## Authentication & Authorization
371
+ - Hash passwords with bcrypt, scrypt, or Argon2 — never MD5/SHA
372
+ - Implement account lockout after N failed attempts
373
+ - Use CSRF tokens for state-changing requests in web apps
374
+ - Validate JWTs properly: check signature, expiration, issuer, audience
375
+ - Never store sensitive data in JWTs — they're base64 encoded, not encrypted
376
+ - Implement proper session invalidation on logout
377
+ - Use httpOnly, secure, sameSite flags on session cookies
378
+ - Apply principle of least privilege — check permissions on every request
379
+
380
+ ## Secrets Management
381
+ - Never commit secrets to version control — use .env files and .gitignore
382
+ - Use environment variables or secret managers (Vault, AWS SSM, Doppler)
383
+ - Rotate secrets regularly and after any suspected compromise
384
+ - Scan repos for leaked secrets: gitleaks, truffleHog, git-secrets
385
+ - Use different credentials per environment (dev, staging, prod)
386
+ - Never log sensitive data (passwords, tokens, PII)
387
+
388
+ ## Dependency Security
389
+ - Run npm audit / pip-audit / cargo audit regularly
390
+ - Pin dependency versions — use lockfiles
391
+ - Enable Dependabot or Renovate for automated updates
392
+ - Audit transitive dependencies, not just direct ones
393
+ - Remove unused dependencies to reduce attack surface
394
+ - Review dependency changelogs before major version updates
395
+
396
+ ## OWASP Top 10 Checklist
397
+ - A01 Broken Access Control: verify authorization on every endpoint
398
+ - A02 Cryptographic Failures: use TLS everywhere, strong algorithms
399
+ - A03 Injection: parameterize queries, validate input, escape output
400
+ - A04 Insecure Design: threat model before building
401
+ - A05 Security Misconfiguration: disable debug mode, remove defaults
402
+ - A06 Vulnerable Components: keep dependencies updated
403
+ - A07 Auth Failures: strong passwords, MFA, proper session management
404
+ - A08 Data Integrity: verify software updates, use SRI for CDN scripts
405
+ - A09 Logging Failures: log security events, monitor for anomalies
406
+ - A10 SSRF: validate URLs, restrict outbound requests, use allowlists
407
+
408
+ ## Anti-Patterns
409
+ - Don't roll your own crypto — use battle-tested libraries
410
+ - Don't trust client-side validation as your only defense
411
+ - Don't expose detailed error messages to end users
412
+ - Don't use GET requests for state-changing operations
413
+ - Don't store passwords in plaintext or reversible encryption
414
+ - Don't disable security features "for development" and forget to re-enable
415
+ `,
416
+ },
417
+ {
418
+ name: "devops-toolkit",
419
+ description: "Docker, CI/CD, Terraform, K8s, monitoring, deployment",
420
+ version: "1.0.0",
421
+ author: "codemaxxing",
422
+ tags: ["docker", "cicd", "terraform", "kubernetes", "monitoring", "devops"],
423
+ prompt: `# DevOps Toolkit Expert
424
+
425
+ ## Docker
426
+ - Use multi-stage builds to minimize image size
427
+ - Pin base image versions: node:20-slim not node:latest
428
+ - Order Dockerfile layers by change frequency (least → most frequent)
429
+ - COPY package*.json first, then npm install, then COPY source (layer caching)
430
+ - Use .dockerignore to exclude node_modules, .git, tests, docs
431
+ - Run as non-root user: USER node
432
+ - Use HEALTHCHECK for production containers
433
+ - One process per container — use docker compose for multi-service apps
434
+
435
+ ## CI/CD Pipelines
436
+ - Fast feedback: lint → type check → unit tests → build → integration tests → deploy
437
+ - Parallelize independent jobs (lint + typecheck + test can run simultaneously)
438
+ - Cache dependencies between runs (npm cache, Docker layer cache)
439
+ - Use matrix builds for cross-platform/version testing
440
+ - Gate deployments on test passage — never deploy broken code
441
+ - Keep CI config DRY — use reusable workflows/templates
442
+ - Pin action/plugin versions for reproducibility
443
+ - Run security scans in CI: SAST, dependency audit, container scanning
444
+
445
+ ## Infrastructure as Code (Terraform)
446
+ - Use modules for reusable infrastructure components
447
+ - Remote state with locking (S3 + DynamoDB, Terraform Cloud)
448
+ - Separate state files per environment (dev, staging, prod)
449
+ - Use terraform plan before apply — review changes carefully
450
+ - Tag all resources for cost tracking and ownership
451
+ - Use data sources to reference existing infrastructure
452
+ - Validate with terraform validate and tflint before applying
453
+
454
+ ## Kubernetes
455
+ - Use Deployments for stateless apps, StatefulSets for stateful
456
+ - Set resource requests AND limits for all containers
457
+ - Use ConfigMaps for config, Secrets for sensitive data
458
+ - Implement readiness and liveness probes
459
+ - Use namespaces to isolate environments/teams
460
+ - HPA (Horizontal Pod Autoscaler) for auto-scaling
461
+ - Use Network Policies to restrict pod-to-pod communication
462
+ - Rolling update strategy with proper maxUnavailable/maxSurge
463
+
464
+ ## Monitoring & Observability
465
+ - Three pillars: metrics (Prometheus), logs (Loki/ELK), traces (Jaeger/Tempo)
466
+ - Alert on symptoms (error rate, latency), not causes (CPU, memory)
467
+ - Use structured logging (JSON) with consistent fields
468
+ - Implement health check endpoints: /health, /ready
469
+ - Dashboard essentials: request rate, error rate, latency (p50/p95/p99), saturation
470
+ - Set up PagerDuty/Opsgenie for critical alerts, Slack for warnings
471
+ - Use SLOs/SLIs to measure reliability objectively
472
+
473
+ ## Anti-Patterns
474
+ - Don't use :latest tags in production — pin versions
475
+ - Don't store state in containers — they're ephemeral
476
+ - Don't skip staging — always test in a production-like environment
477
+ - Don't hardcode config — use environment variables or config maps
478
+ - Don't ignore failed CI — fix or revert immediately
479
+ - Don't alert on everything — alert fatigue leads to ignored alerts
480
+ `,
481
+ },
482
+ ];
@@ -1,6 +1,7 @@
1
1
  import { existsSync, readFileSync, readdirSync, statSync } from "fs";
2
2
  import { join, extname } from "path";
3
3
  import { buildRepoMap } from "./repomap.js";
4
+ import { buildSkillPrompts } from "./skills.js";
4
5
 
5
6
  /**
6
7
  * Build a project context string by scanning the working directory
@@ -93,8 +94,8 @@ export async function buildProjectContext(cwd: string): Promise<string> {
93
94
  /**
94
95
  * Get the system prompt for the coding agent
95
96
  */
96
- export async function getSystemPrompt(projectContext: string): Promise<string> {
97
- return `You are CODEMAXXING, an AI coding assistant running in the terminal.
97
+ export async function getSystemPrompt(projectContext: string, skillPrompts: string = ""): Promise<string> {
98
+ const base = `You are CODEMAXXING, an AI coding assistant running in the terminal.
98
99
 
99
100
  You help developers understand, write, debug, and refactor code. You have access to tools that let you read files, write files, list directories, search code, and run shell commands.
100
101
 
@@ -118,6 +119,11 @@ ${projectContext}
118
119
  - Use code blocks with language tags
119
120
  - Be direct and helpful
120
121
  - If the user asks to "just do it", skip explanations and execute`;
122
+
123
+ if (skillPrompts) {
124
+ return base + "\n\n## Active Skills\n" + skillPrompts;
125
+ }
126
+ return base;
121
127
  }
122
128
 
123
129
  /**