claude-all-config 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/LICENSE.md +70 -0
- package/README.md +133 -0
- package/VERSION +1 -0
- package/agents/accessibility-reviewer.md +96 -0
- package/agents/ai-prompt-optimizer.md +94 -0
- package/agents/api-tester.md +102 -0
- package/agents/code-generator.md +94 -0
- package/agents/code-reviewer.md +47 -0
- package/agents/component-generator.md +102 -0
- package/agents/doc-generator.md +91 -0
- package/agents/migration-generator.md +94 -0
- package/agents/performance-analyzer.md +90 -0
- package/agents/proactive-mode.md +91 -0
- package/agents/readme-generator.md +101 -0
- package/agents/security-auditor.md +86 -0
- package/agents/terraform-generator.md +94 -0
- package/agents/test-generator.md +76 -0
- package/bin/agentrouter.json +36 -0
- package/bin/ai-chat +20 -0
- package/bin/antigravity.json +76 -0
- package/bin/api-manager +340 -0
- package/bin/claude-launcher +19 -0
- package/bin/claude-master +15 -0
- package/bin/claude_master.py +295 -0
- package/bin/cohere.json +7 -0
- package/bin/deepseek.json +44 -0
- package/bin/gemini.json +56 -0
- package/bin/glm.json +21 -0
- package/bin/groq.json +41 -0
- package/bin/minimax.json +26 -0
- package/bin/mistral.json +7 -0
- package/bin/moonshot.json +7 -0
- package/bin/ollama.json +36 -0
- package/bin/openai.json +46 -0
- package/bin/openrouter.json +38 -0
- package/bin/perplexity.json +12 -0
- package/bin/qwen.json +7 -0
- package/bin/switch-provider +73 -0
- package/bin/test.json +7 -0
- package/bin/xai.json +41 -0
- package/claude-all +2707 -0
- package/claude-config.json +340 -0
- package/claude-suite/REFACTORING_SUMMARY.md +88 -0
- package/claude-suite/auth/.antigravity_proxy.py +78 -0
- package/claude-suite/auth/__pycache__/openai_auth.cpython-312.pyc +0 -0
- package/claude-suite/auth/gemini_auth.py +80 -0
- package/claude-suite/auth/openai_auth.py +138 -0
- package/claude-suite/backups/claude-all-before-refactor +1075 -0
- package/claude-suite/backups/claude-all.backup +840 -0
- package/claude-suite/backups/claude-all.original +840 -0
- package/claude-suite/models/add-model-manual.sh +588 -0
- package/claude-suite/models/add-model.sh +114 -0
- package/claude-suite/models/model-switcher.sh +69 -0
- package/claude-suite/providers/claude-glm +89 -0
- package/claude-suite/providers/claude-glm-wrapper.sh +55 -0
- package/claude-suite/providers/claude-minimax +12 -0
- package/claude-suite/providers/claude-smart +132 -0
- package/claude-suite/providers/xai_chat.sh +56 -0
- package/claude-suite/utils/__pycache__/claude_master.cpython-312.pyc +0 -0
- package/claude-suite/utils/antigravity_proxy_server.py +168 -0
- package/claude-suite/utils/claude-all-help.txt +83 -0
- package/claude-suite/utils/claude_master.py +408 -0
- package/commands/brainstorm.md +5 -0
- package/commands/execute-plan.md +5 -0
- package/commands/write-plan.md +5 -0
- package/docs/ANTIGRAVITY-SETUP.md +176 -0
- package/docs/AUTH_CREDENTIALS.md +54 -0
- package/docs/NPM-INSTALLATION.md +166 -0
- package/hooks/hooks.json +15 -0
- package/hooks/run-hook.cmd +19 -0
- package/hooks/session-start.sh +52 -0
- package/install.sh +155 -0
- package/mcp.json +34 -0
- package/model/perplexity.json +12 -0
- package/package.json +69 -0
- package/plugins/README.md +47 -0
- package/plugins/installed_plugins.json +317 -0
- package/plugins/known_marketplaces.json +10 -0
- package/plugins/marketplace-info/marketplace.json +517 -0
- package/postinstall.js +100 -0
- package/scripts/antigravity_proxy_server.py +168 -0
- package/scripts/get_gemini_api_key.py +96 -0
- package/scripts/setup_antigravity_auth.py +171 -0
- package/skills/api-development/SKILL.md +11 -0
- package/skills/api-development/openapi/api-documentation.yaml +108 -0
- package/skills/brainstorming/SKILL.md +54 -0
- package/skills/code-quality/SKILL.md +196 -0
- package/skills/condition-based-waiting/SKILL.md +120 -0
- package/skills/condition-based-waiting/example.ts +158 -0
- package/skills/database-development/SKILL.md +11 -0
- package/skills/database-development/migrations/migration.template.sql +49 -0
- package/skills/defense-in-depth/SKILL.md +127 -0
- package/skills/deployment/SKILL.md +11 -0
- package/skills/deployment/ci-cd/github-actions.yml +95 -0
- package/skills/deployment/docker/Dockerfile.template +39 -0
- package/skills/dispatching-parallel-agents/SKILL.md +180 -0
- package/skills/documentation-generation/SKILL.md +8 -0
- package/skills/documentation-generation/templates/README.template.md +60 -0
- package/skills/error-handling/SKILL.md +267 -0
- package/skills/executing-plans/SKILL.md +76 -0
- package/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/skills/frontend-design/frontend-design/SKILL.md +42 -0
- package/skills/integration-testing/SKILL.md +13 -0
- package/skills/integration-testing/examples/contract-test.py +317 -0
- package/skills/integration-testing/examples/e2e-test.js +147 -0
- package/skills/integration-testing/examples/test-isolation.md +94 -0
- package/skills/logging-monitoring/SKILL.md +66 -0
- package/skills/mobile-development/SKILL.md +11 -0
- package/skills/mobile-development/responsive/responsive.css +80 -0
- package/skills/performance-optimization/SKILL.md +9 -0
- package/skills/performance-optimization/profiling/profile.template.js +21 -0
- package/skills/receiving-code-review/SKILL.md +209 -0
- package/skills/refactoring/SKILL.md +11 -0
- package/skills/refactoring/code-smells/common-smells.md +115 -0
- package/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/requesting-code-review/code-reviewer.md +146 -0
- package/skills/root-cause-tracing/SKILL.md +174 -0
- package/skills/root-cause-tracing/find-polluter.sh +63 -0
- package/skills/security-review/SKILL.md +11 -0
- package/skills/security-review/checklists/owasp-checklist.md +31 -0
- package/skills/sharing-skills/SKILL.md +194 -0
- package/skills/subagent-driven-development/SKILL.md +240 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/skills/subagent-driven-development/implementer-prompt.md +78 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +295 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +364 -0
- package/skills/testing-anti-patterns/SKILL.md +302 -0
- package/skills/testing-skills-with-subagents/SKILL.md +387 -0
- package/skills/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/ui-ux-review/SKILL.md +13 -0
- package/skills/ui-ux-review/checklists/ux-heuristics.md +61 -0
- package/skills/using-git-worktrees/SKILL.md +213 -0
- package/skills/using-superpowers/SKILL.md +101 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/writing-plans/SKILL.md +116 -0
- package/skills/writing-skills/SKILL.md +622 -0
- package/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/persuasion-principles.md +187 -0
- package/update.sh +36 -0
- package/utils/check-superpowers.sh +114 -0
- package/utils/claude-branding.md +166 -0
- package/utils/config.js +185 -0
- package/utils/custom-claude-config.sh +89 -0
- package/utils/custom-claude-hooks.md +129 -0
- package/utils/custom-claude-lib.js +222 -0
- package/utils/customize-claude-ui.sh +162 -0
- package/utils/fix-claude-integration.sh +133 -0
- package/utils/help.js +125 -0
- package/utils/install-curl.ps1 +135 -0
- package/utils/install-curl.sh +525 -0
- package/utils/install-superpowers.js +411 -0
- package/utils/install.js +298 -0
- package/utils/install.sh +182 -0
- package/utils/postinstall.js +63 -0
- package/utils/rename-claude.sh +96 -0
- package/utils/uninstall-superpowers.js +273 -0
- package/utils/uninstall.ps1 +136 -0
- package/utils/uninstall.sh +163 -0
- package/utils/update.sh +160 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// End-to-End Test Example
|
|
2
|
+
// Tests the complete user journey from registration to purchase
|
|
3
|
+
|
|
4
|
+
const { test, expect } = require('@playwright/test');
|
|
5
|
+
|
|
6
|
+
test.describe('E2E User Journey', () => {
|
|
7
|
+
test.beforeEach(async ({ page }) => {
|
|
8
|
+
// Set up test data
|
|
9
|
+
await setupTestData();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test('user can register, login, and make a purchase', async ({ page }) => {
|
|
13
|
+
// 1. Registration
|
|
14
|
+
await page.goto('/register');
|
|
15
|
+
|
|
16
|
+
await page.fill('[data-testid="email"]', 'test@example.com');
|
|
17
|
+
await page.fill('[data-testid="password"]', 'SecurePass123!');
|
|
18
|
+
await page.fill('[data-testid="confirmPassword"]', 'SecurePass123!');
|
|
19
|
+
|
|
20
|
+
await page.click('[data-testid="register-button"]');
|
|
21
|
+
|
|
22
|
+
// Verify successful registration
|
|
23
|
+
await expect(page.locator('[data-testid="success-message"]'))
|
|
24
|
+
.toContainText('Registration successful');
|
|
25
|
+
|
|
26
|
+
// 2. Login
|
|
27
|
+
await page.goto('/login');
|
|
28
|
+
|
|
29
|
+
await page.fill('[data-testid="email"]', 'test@example.com');
|
|
30
|
+
await page.fill('[data-testid="password"]', 'SecurePass123!');
|
|
31
|
+
|
|
32
|
+
await page.click('[data-testid="login-button"]');
|
|
33
|
+
|
|
34
|
+
// Verify logged in
|
|
35
|
+
await expect(page.locator('[data-testid="user-menu"]')).toBeVisible();
|
|
36
|
+
|
|
37
|
+
// 3. Browse products
|
|
38
|
+
await page.goto('/products');
|
|
39
|
+
await page.click('[data-testid="product-card"]:first-child');
|
|
40
|
+
|
|
41
|
+
// 4. Add to cart
|
|
42
|
+
await page.click('[data-testid="add-to-cart"]');
|
|
43
|
+
await expect(page.locator('[data-testid="cart-count"]'))
|
|
44
|
+
.toContainText('1');
|
|
45
|
+
|
|
46
|
+
// 5. Checkout
|
|
47
|
+
await page.click('[data-testid="cart-icon"]');
|
|
48
|
+
await page.click('[data-testid="checkout-button"]');
|
|
49
|
+
|
|
50
|
+
// Fill shipping info
|
|
51
|
+
await page.fill('[data-testid="shipping-address"]', '123 Test St');
|
|
52
|
+
await page.fill('[data-testid="shipping-city"]', 'Test City');
|
|
53
|
+
await page.fill('[data-testid="shipping-zip"]', '12345');
|
|
54
|
+
|
|
55
|
+
// Add payment info
|
|
56
|
+
await page.fill('[data-testid="card-number"]', '4242424242424242');
|
|
57
|
+
await page.fill('[data-testid="card-expiry"]', '12/25');
|
|
58
|
+
await page.fill('[data-testid="card-cvc"]', '123');
|
|
59
|
+
|
|
60
|
+
await page.click('[data-testid="place-order"]');
|
|
61
|
+
|
|
62
|
+
// Verify order confirmation
|
|
63
|
+
await expect(page.locator('[data-testid="order-confirmation"]'))
|
|
64
|
+
.toContainText('Order placed successfully');
|
|
65
|
+
await expect(page.locator('[data-testid="order-number"]'))
|
|
66
|
+
.toMatch(/ORD-\d+/);
|
|
67
|
+
|
|
68
|
+
// 6. Verify order in user dashboard
|
|
69
|
+
await page.goto('/dashboard/orders');
|
|
70
|
+
await expect(page.locator('[data-testid="order-item"]'))
|
|
71
|
+
.toContainText('ORD-');
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test('handles errors gracefully', async ({ page }) => {
|
|
75
|
+
// Test network error handling
|
|
76
|
+
await page.route('/api/products', route => route.abort());
|
|
77
|
+
|
|
78
|
+
await page.goto('/products');
|
|
79
|
+
await expect(page.locator('[data-testid="error-message"]'))
|
|
80
|
+
.toContainText('Failed to load products');
|
|
81
|
+
|
|
82
|
+
// Test retry mechanism
|
|
83
|
+
await page.unroute('/api/products');
|
|
84
|
+
await page.click('[data-testid="retry-button"]');
|
|
85
|
+
|
|
86
|
+
await expect(page.locator('[data-testid="product-list"]'))
|
|
87
|
+
.toBeVisible();
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test('maintains session across pages', async ({ page }) => {
|
|
91
|
+
// Login
|
|
92
|
+
await loginAsTestUser(page);
|
|
93
|
+
|
|
94
|
+
// Navigate through different pages
|
|
95
|
+
await page.goto('/products');
|
|
96
|
+
await expect(page.locator('[data-testid="user-menu"]')).toBeVisible();
|
|
97
|
+
|
|
98
|
+
await page.goto('/profile');
|
|
99
|
+
await expect(page.locator('[data-testid="user-menu"]')).toBeVisible();
|
|
100
|
+
|
|
101
|
+
await page.goto('/support');
|
|
102
|
+
await expect(page.locator('[data-testid="user-menu"]')).toBeVisible();
|
|
103
|
+
|
|
104
|
+
// Verify session persistence after refresh
|
|
105
|
+
await page.reload();
|
|
106
|
+
await expect(page.locator('[data-testid="user-menu"]')).toBeVisible();
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
test('real-time updates work correctly', async ({ page }) => {
|
|
110
|
+
// Open two pages to test real-time features
|
|
111
|
+
const context = page.context();
|
|
112
|
+
const page2 = await context.newPage();
|
|
113
|
+
|
|
114
|
+
// Login as user
|
|
115
|
+
await loginAsTestUser(page);
|
|
116
|
+
await loginAsTestUser(page2);
|
|
117
|
+
|
|
118
|
+
// Start chat on first page
|
|
119
|
+
await page.goto('/chat');
|
|
120
|
+
await page.fill('[data-testid="message-input"]', 'Hello, world!');
|
|
121
|
+
await page.click('[data-testid="send-button"]');
|
|
122
|
+
|
|
123
|
+
// Verify message appears on second page
|
|
124
|
+
await page2.goto('/chat');
|
|
125
|
+
await expect(page2.locator('[data-testid="message-list"]'))
|
|
126
|
+
.toContainText('Hello, world!');
|
|
127
|
+
|
|
128
|
+
// Test typing indicators
|
|
129
|
+
await page2.fill('[data-testid="message-input"]', 'Typing...');
|
|
130
|
+
await expect(page.locator('[data-testid="typing-indicator"]'))
|
|
131
|
+
.toContainText('User is typing...');
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// Helper functions
|
|
136
|
+
async function setupTestData() {
|
|
137
|
+
// Initialize test database with required data
|
|
138
|
+
// This could involve API calls or direct database operations
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
async function loginAsTestUser(page) {
|
|
142
|
+
await page.goto('/login');
|
|
143
|
+
await page.fill('[data-testid="email"]', 'test@example.com');
|
|
144
|
+
await page.fill('[data-testid="password"]', 'SecurePass123!');
|
|
145
|
+
await page.click('[data-testid="login-button"]');
|
|
146
|
+
await expect(page.locator('[data-testid="user-menu"]')).toBeVisible();
|
|
147
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Test Isolation Best Practices
|
|
2
|
+
|
|
3
|
+
## 1. Database Isolation
|
|
4
|
+
|
|
5
|
+
### Using Test Containers
|
|
6
|
+
```javascript
|
|
7
|
+
// test-setup.js
|
|
8
|
+
const { setup, teardown } = require('jest-dev-server');
|
|
9
|
+
|
|
10
|
+
beforeAll(async () => {
|
|
11
|
+
await setup({
|
|
12
|
+
command: `docker run --name test-db -e POSTGRES_PASSWORD=test -p 5433:5432 -d postgres:13`,
|
|
13
|
+
port: 5433,
|
|
14
|
+
usedPortAction: 'ignore',
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
afterAll(async () => {
|
|
19
|
+
await teardown();
|
|
20
|
+
await exec('docker rm -f test-db');
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Database Transactions
|
|
25
|
+
```javascript
|
|
26
|
+
// Each test runs in its own transaction
|
|
27
|
+
beforeEach(async () => {
|
|
28
|
+
await db.query('BEGIN');
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
afterEach(async () => {
|
|
32
|
+
await db.query('ROLLBACK');
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 2. Mock External Services
|
|
37
|
+
|
|
38
|
+
### Service Virtualization
|
|
39
|
+
```javascript
|
|
40
|
+
// jest.config.js
|
|
41
|
+
module.exports = {
|
|
42
|
+
setupFilesAfterEnv: ['./test/setup/mocks.js'],
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// test/setup/mocks.js
|
|
46
|
+
jest.mock('./services/payment', () => ({
|
|
47
|
+
processPayment: jest.fn().mockResolvedValue({
|
|
48
|
+
success: true,
|
|
49
|
+
transactionId: 'tx_12345',
|
|
50
|
+
}),
|
|
51
|
+
}));
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 3. Test Data Management
|
|
55
|
+
|
|
56
|
+
### Factory Pattern
|
|
57
|
+
```javascript
|
|
58
|
+
// factories/user-factory.js
|
|
59
|
+
class UserFactory {
|
|
60
|
+
static create(overrides = {}) {
|
|
61
|
+
return {
|
|
62
|
+
id: faker.datatype.uuid(),
|
|
63
|
+
name: faker.name.findName(),
|
|
64
|
+
email: faker.internet.email(),
|
|
65
|
+
createdAt: new Date(),
|
|
66
|
+
...overrides,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static async createInDatabase(overrides = {}) {
|
|
71
|
+
const user = this.create(overrides);
|
|
72
|
+
return await UserModel.create(user);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 4. Parallel Test Execution
|
|
78
|
+
|
|
79
|
+
### Test Sharding
|
|
80
|
+
```bash
|
|
81
|
+
# Run tests in parallel
|
|
82
|
+
jest --runInBand=false --shard=1/3
|
|
83
|
+
jest --runInBand=false --shard=2/3
|
|
84
|
+
jest --runInBand=false --shard=3/3
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Unique Test Data
|
|
88
|
+
```javascript
|
|
89
|
+
// Ensure unique data for parallel tests
|
|
90
|
+
const uniqueId = `${process.env.JEST_WORKER_ID}-${Date.now()}`;
|
|
91
|
+
const testData = {
|
|
92
|
+
email: `test-${uniqueId}@example.com`,
|
|
93
|
+
};
|
|
94
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
name: logging-monitoring
|
|
4
|
+
description: Use when implementing logging and monitoring features - covers structured logging, log levels, performance monitoring, error tracking, log aggregation, observability, and monitoring dashboards
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Logging & Monitoring Skill
|
|
8
|
+
|
|
9
|
+
You are a Logging & Monitoring Expert specializing in implementing robust logging and monitoring systems for production applications.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Trigger this skill when:
|
|
14
|
+
- Implementing logging for new features
|
|
15
|
+
- Setting up monitoring for production
|
|
16
|
+
- Debugging production issues
|
|
17
|
+
- Optimizing performance
|
|
18
|
+
- Setting up alerting
|
|
19
|
+
- Creating observability
|
|
20
|
+
|
|
21
|
+
## Core Principles
|
|
22
|
+
|
|
23
|
+
### Log Levels
|
|
24
|
+
|
|
25
|
+
- **DEBUG**: Detailed info for development
|
|
26
|
+
- **INFO**: General information (default)
|
|
27
|
+
- **WARN**: Warning messages
|
|
28
|
+
- **ERROR**: Error events
|
|
29
|
+
- **CRITICAL**: System-fatal errors
|
|
30
|
+
|
|
31
|
+
### Structured Logging
|
|
32
|
+
|
|
33
|
+
Use JSON logging for machine-readability:
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
logger.info('Transaction completed', {
|
|
37
|
+
transactionId: 'tx_123456',
|
|
38
|
+
userId: 'user_789',
|
|
39
|
+
timestamp: new Date().toISOString(),
|
|
40
|
+
duration_ms: 150,
|
|
41
|
+
status: 'completed'
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Performance Metrics
|
|
46
|
+
|
|
47
|
+
**Application Metrics:**
|
|
48
|
+
- Request rate, response time, error rate
|
|
49
|
+
- Memory usage, CPU usage
|
|
50
|
+
- Active users, transaction volume
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Security Checklist
|
|
54
|
+
|
|
55
|
+
- [ ] Security headers implemented
|
|
56
|
+
- [ ] CSRF protection enabled
|
|
57
|
+
- [ ] Input sanitization implemented
|
|
58
|
+
- [ ] Secrets properly managed
|
|
59
|
+
- [ ] Error tracking enabled
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
**Remember**: Security is an ongoing process, not a ☂️!
|
|
65
|
+
|
|
66
|
+
Check for vulnerabilities regularly!
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
mobile-development skill helps create responsive, mobile-first applications and optimize them for native performance.
|
|
2
|
+
|
|
3
|
+
For code review, check that:
|
|
4
|
+
1. Mobile-first responsive design is implemented
|
|
5
|
+
2. Touch interactions are properly handled
|
|
6
|
+
3. Performance is optimized for mobile devices
|
|
7
|
+
4. Offline functionality is considered
|
|
8
|
+
5. App store guidelines are followed
|
|
9
|
+
6. Battery usage is optimized
|
|
10
|
+
7. Network requests are batched/optimized
|
|
11
|
+
8. Gesture support is implemented where appropriate
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* Mobile-First Responsive Design */
|
|
2
|
+
|
|
3
|
+
/* Base styles - Mobile First */
|
|
4
|
+
.container {
|
|
5
|
+
width: 100%;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
padding: 0 16px;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Tablet styles */
|
|
12
|
+
@media (min-width: 768px) {
|
|
13
|
+
.container {
|
|
14
|
+
max-width: 750px;
|
|
15
|
+
padding: 0 24px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Desktop styles */
|
|
20
|
+
@media (min-width: 1024px) {
|
|
21
|
+
.container {
|
|
22
|
+
max-width: 1200px;
|
|
23
|
+
padding: 0 32px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Large desktop styles */
|
|
28
|
+
@media (min-width: 1440px) {
|
|
29
|
+
.container {
|
|
30
|
+
max-width: 1440px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Touch-friendly buttons */
|
|
35
|
+
.btn {
|
|
36
|
+
min-height: 44px;
|
|
37
|
+
min-width: 44px;
|
|
38
|
+
padding: 12px 24px;
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Disable hover effects on mobile */
|
|
43
|
+
@media (hover: none) and (pointer: coarse) {
|
|
44
|
+
.btn:hover {
|
|
45
|
+
background-color: inherit;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Optimize images for mobile */
|
|
50
|
+
img {
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
height: auto;
|
|
53
|
+
object-fit: cover;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Prevent horizontal scroll on mobile */
|
|
57
|
+
body {
|
|
58
|
+
overflow-x: hidden;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Mobile navigation */
|
|
62
|
+
.mobile-menu {
|
|
63
|
+
display: block;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media (min-width: 768px) {
|
|
67
|
+
.mobile-menu {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.desktop-menu {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (min-width: 768px) {
|
|
77
|
+
.desktop-menu {
|
|
78
|
+
display: block;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
performance-optimization skill helps identify and resolve performance bottlenecks in applications through systematic profiling and optimization techniques.
|
|
2
|
+
|
|
3
|
+
For code review, check that:
|
|
4
|
+
1. Profiling has been done for critical paths
|
|
5
|
+
2. Performance benchmarks exist
|
|
6
|
+
3. Memory leaks are checked
|
|
7
|
+
4. Algorithm complexity is optimal (O(n log n) or better)
|
|
8
|
+
5. Database queries are optimized
|
|
9
|
+
6. Caching strategies are implemented where appropriate
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const profiler = require('v8-profiler-next');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
// Start profiling
|
|
5
|
+
profiler.startSampling();
|
|
6
|
+
|
|
7
|
+
// Run your code here
|
|
8
|
+
// Example: Your application logic
|
|
9
|
+
for (let i = 0; i < 1000000; i++) {
|
|
10
|
+
// Code to profile
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Stop profiling
|
|
14
|
+
profiler.stop();
|
|
15
|
+
|
|
16
|
+
// Save results
|
|
17
|
+
const results = profiler.buildTree();
|
|
18
|
+
fs.writeFileSync('profile.json', JSON.stringify(results, null, 2));
|
|
19
|
+
|
|
20
|
+
console.log('Profile saved to profile.json');
|
|
21
|
+
console.log('Use Chrome DevTools > More > Tools > JavaScript Profiler to analyze');
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: receiving-code-review
|
|
3
|
+
description: Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review Reception
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Code review requires technical evaluation, not emotional performance.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
|
|
13
|
+
|
|
14
|
+
## The Response Pattern
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
WHEN receiving code review feedback:
|
|
18
|
+
|
|
19
|
+
1. READ: Complete feedback without reacting
|
|
20
|
+
2. UNDERSTAND: Restate requirement in own words (or ask)
|
|
21
|
+
3. VERIFY: Check against codebase reality
|
|
22
|
+
4. EVALUATE: Technically sound for THIS codebase?
|
|
23
|
+
5. RESPOND: Technical acknowledgment or reasoned pushback
|
|
24
|
+
6. IMPLEMENT: One item at a time, test each
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Forbidden Responses
|
|
28
|
+
|
|
29
|
+
**NEVER:**
|
|
30
|
+
- "You're absolutely right!" (explicit CLAUDE.md violation)
|
|
31
|
+
- "Great point!" / "Excellent feedback!" (performative)
|
|
32
|
+
- "Let me implement that now" (before verification)
|
|
33
|
+
|
|
34
|
+
**INSTEAD:**
|
|
35
|
+
- Restate the technical requirement
|
|
36
|
+
- Ask clarifying questions
|
|
37
|
+
- Push back with technical reasoning if wrong
|
|
38
|
+
- Just start working (actions > words)
|
|
39
|
+
|
|
40
|
+
## Handling Unclear Feedback
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
IF any item is unclear:
|
|
44
|
+
STOP - do not implement anything yet
|
|
45
|
+
ASK for clarification on unclear items
|
|
46
|
+
|
|
47
|
+
WHY: Items may be related. Partial understanding = wrong implementation.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Example:**
|
|
51
|
+
```
|
|
52
|
+
your human partner: "Fix 1-6"
|
|
53
|
+
You understand 1,2,3,6. Unclear on 4,5.
|
|
54
|
+
|
|
55
|
+
❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
|
|
56
|
+
✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Source-Specific Handling
|
|
60
|
+
|
|
61
|
+
### From your human partner
|
|
62
|
+
- **Trusted** - implement after understanding
|
|
63
|
+
- **Still ask** if scope unclear
|
|
64
|
+
- **No performative agreement**
|
|
65
|
+
- **Skip to action** or technical acknowledgment
|
|
66
|
+
|
|
67
|
+
### From External Reviewers
|
|
68
|
+
```
|
|
69
|
+
BEFORE implementing:
|
|
70
|
+
1. Check: Technically correct for THIS codebase?
|
|
71
|
+
2. Check: Breaks existing functionality?
|
|
72
|
+
3. Check: Reason for current implementation?
|
|
73
|
+
4. Check: Works on all platforms/versions?
|
|
74
|
+
5. Check: Does reviewer understand full context?
|
|
75
|
+
|
|
76
|
+
IF suggestion seems wrong:
|
|
77
|
+
Push back with technical reasoning
|
|
78
|
+
|
|
79
|
+
IF can't easily verify:
|
|
80
|
+
Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
|
|
81
|
+
|
|
82
|
+
IF conflicts with your human partner's prior decisions:
|
|
83
|
+
Stop and discuss with your human partner first
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**your human partner's rule:** "External feedback - be skeptical, but check carefully"
|
|
87
|
+
|
|
88
|
+
## YAGNI Check for "Professional" Features
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
IF reviewer suggests "implementing properly":
|
|
92
|
+
grep codebase for actual usage
|
|
93
|
+
|
|
94
|
+
IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
|
|
95
|
+
IF used: Then implement properly
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
|
|
99
|
+
|
|
100
|
+
## Implementation Order
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
FOR multi-item feedback:
|
|
104
|
+
1. Clarify anything unclear FIRST
|
|
105
|
+
2. Then implement in this order:
|
|
106
|
+
- Blocking issues (breaks, security)
|
|
107
|
+
- Simple fixes (typos, imports)
|
|
108
|
+
- Complex fixes (refactoring, logic)
|
|
109
|
+
3. Test each fix individually
|
|
110
|
+
4. Verify no regressions
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## When To Push Back
|
|
114
|
+
|
|
115
|
+
Push back when:
|
|
116
|
+
- Suggestion breaks existing functionality
|
|
117
|
+
- Reviewer lacks full context
|
|
118
|
+
- Violates YAGNI (unused feature)
|
|
119
|
+
- Technically incorrect for this stack
|
|
120
|
+
- Legacy/compatibility reasons exist
|
|
121
|
+
- Conflicts with your human partner's architectural decisions
|
|
122
|
+
|
|
123
|
+
**How to push back:**
|
|
124
|
+
- Use technical reasoning, not defensiveness
|
|
125
|
+
- Ask specific questions
|
|
126
|
+
- Reference working tests/code
|
|
127
|
+
- Involve your human partner if architectural
|
|
128
|
+
|
|
129
|
+
**Signal if uncomfortable pushing back out loud:** "Strange things are afoot at the Circle K"
|
|
130
|
+
|
|
131
|
+
## Acknowledging Correct Feedback
|
|
132
|
+
|
|
133
|
+
When feedback IS correct:
|
|
134
|
+
```
|
|
135
|
+
✅ "Fixed. [Brief description of what changed]"
|
|
136
|
+
✅ "Good catch - [specific issue]. Fixed in [location]."
|
|
137
|
+
✅ [Just fix it and show in the code]
|
|
138
|
+
|
|
139
|
+
❌ "You're absolutely right!"
|
|
140
|
+
❌ "Great point!"
|
|
141
|
+
❌ "Thanks for catching that!"
|
|
142
|
+
❌ "Thanks for [anything]"
|
|
143
|
+
❌ ANY gratitude expression
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
|
|
147
|
+
|
|
148
|
+
**If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.
|
|
149
|
+
|
|
150
|
+
## Gracefully Correcting Your Pushback
|
|
151
|
+
|
|
152
|
+
If you pushed back and were wrong:
|
|
153
|
+
```
|
|
154
|
+
✅ "You were right - I checked [X] and it does [Y]. Implementing now."
|
|
155
|
+
✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
|
|
156
|
+
|
|
157
|
+
❌ Long apology
|
|
158
|
+
❌ Defending why you pushed back
|
|
159
|
+
❌ Over-explaining
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
State the correction factually and move on.
|
|
163
|
+
|
|
164
|
+
## Common Mistakes
|
|
165
|
+
|
|
166
|
+
| Mistake | Fix |
|
|
167
|
+
|---------|-----|
|
|
168
|
+
| Performative agreement | State requirement or just act |
|
|
169
|
+
| Blind implementation | Verify against codebase first |
|
|
170
|
+
| Batch without testing | One at a time, test each |
|
|
171
|
+
| Assuming reviewer is right | Check if breaks things |
|
|
172
|
+
| Avoiding pushback | Technical correctness > comfort |
|
|
173
|
+
| Partial implementation | Clarify all items first |
|
|
174
|
+
| Can't verify, proceed anyway | State limitation, ask for direction |
|
|
175
|
+
|
|
176
|
+
## Real Examples
|
|
177
|
+
|
|
178
|
+
**Performative Agreement (Bad):**
|
|
179
|
+
```
|
|
180
|
+
Reviewer: "Remove legacy code"
|
|
181
|
+
❌ "You're absolutely right! Let me remove that..."
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Technical Verification (Good):**
|
|
185
|
+
```
|
|
186
|
+
Reviewer: "Remove legacy code"
|
|
187
|
+
✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**YAGNI (Good):**
|
|
191
|
+
```
|
|
192
|
+
Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
|
|
193
|
+
✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Unclear Item (Good):**
|
|
197
|
+
```
|
|
198
|
+
your human partner: "Fix items 1-6"
|
|
199
|
+
You understand 1,2,3,6. Unclear on 4,5.
|
|
200
|
+
✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## The Bottom Line
|
|
204
|
+
|
|
205
|
+
**External feedback = suggestions to evaluate, not orders to follow.**
|
|
206
|
+
|
|
207
|
+
Verify. Question. Then implement.
|
|
208
|
+
|
|
209
|
+
No performative agreement. Technical rigor always.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
refactoring skill helps improve code quality and maintainability through systematic identification and elimination of code smells and implementation of design patterns.
|
|
2
|
+
|
|
3
|
+
For code review, check that:
|
|
4
|
+
1. Code has no obvious code smells (duplicate code, long methods, etc.)
|
|
5
|
+
2. Design patterns are appropriately applied
|
|
6
|
+
3. Code follows SOLID principles
|
|
7
|
+
4. Function and class names are descriptive
|
|
8
|
+
5. Comments explain "why" not "what"
|
|
9
|
+
6. Code is modular and loosely coupled
|
|
10
|
+
7. Test coverage is maintained
|
|
11
|
+
8. Technical debt is tracked and addressed
|