@codedir/mimir-code 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.
@@ -0,0 +1,51 @@
1
+ # Security Analysis Command
2
+ # Analyzes git diffs for security vulnerabilities and issues
3
+ # Usage: /security [file-or-commit]
4
+
5
+ name: security
6
+ description: Analyze git changes for security vulnerabilities
7
+ usage: /security [file-or-commit]
8
+ aliases: [sec, vuln]
9
+ prompt: |
10
+ Perform a comprehensive security analysis of the git diff. Focus on:
11
+
12
+ **Critical Security Issues:**
13
+ - SQL injection vulnerabilities (unsanitized input in queries)
14
+ - XSS vulnerabilities (unescaped output in HTML/templates)
15
+ - Command injection (unsanitized shell execution)
16
+ - Path traversal (directory traversal attacks via user input)
17
+ - Authentication/authorization bypass
18
+ - Hardcoded secrets, API keys, passwords, or tokens
19
+ - Insecure cryptography (weak algorithms, hardcoded keys)
20
+ - CSRF vulnerabilities (missing tokens on state-changing operations)
21
+
22
+ **High-Priority Issues:**
23
+ - Input validation gaps (missing sanitization, type checking)
24
+ - Unsafe deserialization
25
+ - Race conditions in concurrent code
26
+ - Information disclosure in error messages
27
+ - Insecure defaults or misconfigurations
28
+ - Missing security headers
29
+ - Weak password policies
30
+
31
+ **Best Practices:**
32
+ - Principle of least privilege violations
33
+ - Missing rate limiting
34
+ - Inadequate logging of security events
35
+ - Unencrypted sensitive data transmission
36
+ - Missing input length/size limits
37
+
38
+ **Analysis Target:**
39
+ $ARGUMENTS
40
+
41
+ **Output Format:**
42
+ 1. Executive Summary (severity: critical/high/medium/low)
43
+ 2. Detailed findings with:
44
+ - File path and line numbers
45
+ - Vulnerability type (OWASP category)
46
+ - Proof of concept/exploit scenario
47
+ - Remediation code snippet
48
+ 3. Risk assessment and prioritization
49
+
50
+ If no target specified, analyze the current staged changes (git diff --staged).
51
+ Be thorough but concise. Flag false positives as "Needs Review".
@@ -0,0 +1,50 @@
1
+ # Test Generation Command
2
+ # Generates comprehensive test cases for code
3
+ # Usage: /test [file-or-function]
4
+
5
+ name: test
6
+ description: Generate comprehensive test cases
7
+ usage: /test [file-or-function]
8
+ aliases: [tests, spec]
9
+ prompt: |
10
+ Generate comprehensive test cases for the specified code. Cover:
11
+
12
+ **Test Types:**
13
+ - Unit tests (isolated function/class behavior)
14
+ - Integration tests (component interaction)
15
+ - Edge cases and boundary conditions
16
+ - Error handling and exceptions
17
+ - Async/concurrent behavior (if applicable)
18
+
19
+ **Coverage Areas:**
20
+ - Happy path (normal expected inputs)
21
+ - Invalid inputs (type errors, null/undefined, empty values)
22
+ - Boundary values (min/max, empty collections, single item)
23
+ - Error conditions (network failures, timeouts, rejected promises)
24
+ - State transitions (if stateful)
25
+ - Side effects (file I/O, database, external APIs)
26
+
27
+ **Test Quality:**
28
+ - Arrange-Act-Assert pattern
29
+ - Clear test names describing behavior
30
+ - Minimal mocking (use real objects when possible)
31
+ - One assertion per test (where logical)
32
+ - Setup/teardown for resource cleanup
33
+
34
+ **Target:**
35
+ $ARGUMENTS
36
+
37
+ **Output:**
38
+ 1. Test file structure (describe/it blocks or equivalent)
39
+ 2. Test cases with:
40
+ - Descriptive test name
41
+ - Setup code (arrange)
42
+ - Invocation (act)
43
+ - Assertions (assert)
44
+ - Mock/stub setup if needed
45
+ 3. Coverage estimate (% of code paths tested)
46
+ 4. Missing test scenarios (if any)
47
+
48
+ Use the project's testing framework (detect from package.json/imports).
49
+ If no target specified, analyze the most recently modified files.
50
+ Prioritize high-value tests over exhaustive coverage.
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "dark-colorblind",
3
+ "displayName": "Dark (Colorblind)",
4
+ "description": "Dark theme optimized for colorblind users",
5
+ "colors": {
6
+ "primary": "#3B82F6",
7
+ "secondary": "#8B5CF6",
8
+ "success": "#0EA5E9",
9
+ "warning": "#F59E0B",
10
+ "error": "#F97316",
11
+ "info": "#06B6D4",
12
+ "text": "#F3F4F6",
13
+ "textDim": "#D1D5DB",
14
+ "textMuted": "#6B7280",
15
+ "background": "#111827",
16
+ "backgroundLight": "#1F2937",
17
+ "border": "#374151",
18
+ "accent": "#A855F7"
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "dark",
3
+ "displayName": "Dark",
4
+ "description": "Classic dark theme with high contrast",
5
+ "colors": {
6
+ "primary": "#60A5FA",
7
+ "secondary": "#A78BFA",
8
+ "success": "#10B981",
9
+ "warning": "#F59E0B",
10
+ "error": "#EF4444",
11
+ "info": "#06B6D4",
12
+ "text": "#F3F4F6",
13
+ "textDim": "#D1D5DB",
14
+ "textMuted": "#6B7280",
15
+ "background": "#111827",
16
+ "backgroundLight": "#1F2937",
17
+ "border": "#374151",
18
+ "accent": "#EC4899"
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "light-colorblind",
3
+ "displayName": "Light (Colorblind)",
4
+ "description": "Light theme optimized for colorblind users",
5
+ "colors": {
6
+ "primary": "#1D4ED8",
7
+ "secondary": "#6D28D9",
8
+ "success": "#0369A1",
9
+ "warning": "#D97706",
10
+ "error": "#EA580C",
11
+ "info": "#0891B2",
12
+ "text": "#111827",
13
+ "textDim": "#374151",
14
+ "textMuted": "#9CA3AF",
15
+ "background": "#FFFFFF",
16
+ "backgroundLight": "#F9FAFB",
17
+ "border": "#E5E7EB",
18
+ "accent": "#9333EA"
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "light",
3
+ "displayName": "Light",
4
+ "description": "Clean light theme for bright environments",
5
+ "colors": {
6
+ "primary": "#2563EB",
7
+ "secondary": "#7C3AED",
8
+ "success": "#059669",
9
+ "warning": "#D97706",
10
+ "error": "#DC2626",
11
+ "info": "#0891B2",
12
+ "text": "#111827",
13
+ "textDim": "#374151",
14
+ "textMuted": "#9CA3AF",
15
+ "background": "#FFFFFF",
16
+ "backgroundLight": "#F9FAFB",
17
+ "border": "#E5E7EB",
18
+ "accent": "#DB2777"
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "mimir",
3
+ "displayName": "Mimir (Default)",
4
+ "description": "Nordic-inspired theme with cold blue palette",
5
+ "colors": {
6
+ "primary": "#88C0D0",
7
+ "secondary": "#81A1C1",
8
+ "success": "#A3BE8C",
9
+ "warning": "#EBCB8B",
10
+ "error": "#BF616A",
11
+ "info": "#8FBCBB",
12
+ "text": "#ECEFF4",
13
+ "textDim": "#D8DEE9",
14
+ "textMuted": "#4C566A",
15
+ "background": "#2E3440",
16
+ "backgroundLight": "#3B4252",
17
+ "border": "#434C5E",
18
+ "accent": "#B48EAD"
19
+ }
20
+ }