Thank you for your interest in contributing to 10X.in Browser Extension! This document provides guidelines and instructions for contributing.
- Code of Conduct
- How to Contribute
- Reporting Bugs
- Suggesting Features
- Development Setup
- Code Style Guidelines
- Pull Request Process
- Adding New Platform Handlers
- Testing Guidelines
By participating in this project, you agree to:
- Be respectful and inclusive
- Accept constructive criticism gracefully
- Focus on what is best for the community
- Show empathy towards other community members
There are many ways to contribute:
- Report Bugs - Found a bug? Let us know!
- Suggest Features - Have ideas? Share them!
- Fix Issues - Pick up open issues and submit PRs
- Improve Documentation - Help make docs clearer
- Add Platform Support - Create handlers for new platforms
- Write Tests - Improve test coverage
Before creating a bug report:
- Check existing issues - Your bug may already be reported
- Use latest version - Ensure you're using the latest extension version
- Test in clean environment - Disable other extensions to rule out conflicts
**Description**
Clear description of the bug
**Steps to Reproduce**
1. Go to '...'
2. Click on '...'
3. Execute command '...'
4. See error
**Expected Behavior**
What should have happened
**Actual Behavior**
What actually happened
**Environment**
- Browser: Chrome/Edge/Brave
- Browser Version: 120.0
- Extension Version: 1.0.0
- OS: Windows/Mac/Linux
- WebSocket Server: Node.js/Python/etc.
**Screenshots/Logs**
Add browser console logs or screenshots
**Additional Context**
Any other relevant informationWe welcome feature suggestions! Before suggesting:
- Check existing feature requests - May already be planned
- Describe the problem - Explain what problem your feature solves
- Describe the solution - How would you implement it?
- Consider alternatives - What other approaches exist?
**Problem Statement**
What problem does this feature solve?
**Proposed Solution**
How should this feature work?
**Use Cases**
Who would use this? When? Why?
**Alternatives Considered**
What other solutions did you consider?
**Additional Context**
Mockups, examples, references- Node.js: v14+ (for running tests)
- Chrome/Edge/Brave: Latest version
- Git: For version control
-
Fork the repository
# Click "Fork" on GitHub -
Clone your fork
git clone https://github.com/YOUR-USERNAME/claudekit-browser-extension.git cd claudekit-browser-extension -
Install dependencies
cd tests npm install -
Load extension in browser
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the extension folder
- Open
-
Start WebSocket server (for testing)
cd tests node websocket-test-server.js -
Create a branch
git checkout -b feature/your-feature-name
- ES6+ Features: Use modern JavaScript (async/await, arrow functions, destructuring)
- Semicolons: Use semicolons
- Indentation: 2 spaces
- Naming: camelCase for variables/functions, PascalCase for classes
- Comments: Add JSDoc comments for functions
/**
* Execute LinkedIn action with rate limiting
* @param {Object} action - Action configuration
* @param {string} action.type - Action type (view_profile, send_connection, etc.)
* @param {string} action.profileUrl - LinkedIn profile URL
* @returns {Promise<Object>} Action result with success status
*/
async function executeLinkedInAction(action) {
const { type, profileUrl } = action;
// Check rate limit
const rateLimit = await checkRateLimit(type);
if (!rateLimit.allowed) {
throw new Error(`Rate limit exceeded: ${rateLimit.limit}/day`);
}
// Execute action
try {
const result = await performAction(type, profileUrl);
return { success: true, result, rateLimit };
} catch (error) {
console.error('[LinkedIn] Action failed:', error);
return { success: false, error: error.message };
}
}Use conventional commits:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Test additions/changeschore: Build/config changes
Examples:
feat(linkedin): add InMail sending support
fix(background): reconnect on connection drop
docs(readme): update installation instructions
test(linkedin): add connection request tests-
Test your changes thoroughly
npm test -
Update documentation
- Update README.md if adding features
- Update code comments
- Update CHANGELOG.md
-
Follow code style guidelines
-
Ensure no breaking changes (or document them clearly)
- Code follows project style guidelines
- Tests pass (
npm test) - Documentation updated (README, JSDoc)
- CHANGELOG.md updated
- Commit messages follow conventional format
- No console errors in browser
- Tested in Chrome/Edge (if possible)
**Description**
Brief description of changes
**Related Issue**
Fixes #123
**Type of Change**
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
**Testing**
How was this tested?
**Screenshots**
If applicable
**Checklist**
- [ ] Tests pass
- [ ] Documentation updated
- [ ] Code style followed- Automated checks - Must pass CI/CD
- Code review - At least 1 approval required
- Testing - Reviewer tests changes
- Merge - Maintainer merges PR
Create handlers/yourplatform.js:
/**
* 10X.in YourPlatform Handler
*
* Platform-specific automation actions
*/
// Rate limits
const RATE_LIMITS = {
follows: { daily: 50, key: 'yourplatform_follows_today' },
messages: { daily: 30, key: 'yourplatform_messages_today' }
};
// Selectors (inspect platform to find)
const SELECTORS = {
followButton: 'button[data-action="follow"]',
messageBox: 'textarea[name="message"]'
};
class YourPlatformHandler {
constructor() {
this.platform = 'yourplatform';
}
async execute(action) {
switch (action.type) {
case 'follow':
return await this.follow(action);
case 'message':
return await this.sendMessage(action);
default:
throw new Error(`Unknown action: ${action.type}`);
}
}
async follow(action) {
// Implementation
}
async sendMessage(action) {
// Implementation
}
}
export default YourPlatformHandler;Add platform detection in content.js:
const PLATFORMS = {
// ... existing platforms
YOURPLATFORM: 'yourplatform'
};
function detectPlatform() {
const hostname = window.location.hostname;
if (hostname.includes('yourplatform.com')) {
return PLATFORMS.YOURPLATFORM;
}
// ... existing detection
}Add selectors:
const SELECTORS = {
// ... existing selectors
[PLATFORMS.YOURPLATFORM]: {
followButton: 'button[data-action="follow"]',
messageBox: 'textarea[name="message"]'
}
};Add handler in background.js:
async function executeYourPlatformAction(action) {
console.log('[10X.in Browser] YourPlatform action:', action.type);
const { default: YourPlatformHandler } = await import('./handlers/yourplatform.js');
const handler = new YourPlatformHandler();
const result = await handler.execute(action);
sendToWebSocket({
type: 'action-result',
platform: 'yourplatform',
actionType: action.type,
success: true,
result
});
}Add message handler:
switch (message.type) {
// ... existing cases
case 'yourplatform-action':
await executeYourPlatformAction(message.payload);
break;
}Create tests/test-yourplatform.js:
const test = require('./test-config');
async function testYourPlatform() {
console.log('🧪 Testing YourPlatform Handler...\n');
// Test follow
await test.sendCommand({
type: 'yourplatform-action',
payload: {
type: 'follow',
username: 'testuser'
}
});
// Add more tests
}
testYourPlatform().catch(console.error);- Add to README.md platform support table
- Add usage examples
- Update API reference
// tests/test-feature.js
const test = require('./test-config');
async function testFeature() {
console.log('🧪 Testing Feature...\n');
try {
// Test case 1
console.log('Test 1: Description');
const result = await test.sendCommand({ /* ... */ });
console.log('✅ Test 1 passed\n');
// Test case 2
console.log('Test 2: Description');
// ...
} catch (error) {
console.error('❌ Test failed:', error);
}
}
testFeature().catch(console.error);# All tests
npm test
# Specific test
node tests/test-linkedin.jsAim for:
- Unit tests - Individual functions
- Integration tests - Handler workflows
- End-to-end tests - Full command execution
- General questions: GitHub Discussions
- Bug reports: GitHub Issues
- Security concerns: See SECURITY.md
Thank you for contributing! 🎉