emerging-specialty-skills
Master emerging technologies including blockchain, cybersecurity, QA testing, and specialized tech roles. Stay ahead with cutting-edge technologies.
What this skill does
# Emerging Tech & Specialty Skills
## Blockchain & Smart Contracts
```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract SecureToken is ReentrancyGuard, Ownable {
mapping(address => uint256) public balances;
bool public paused;
event Transfer(address indexed from, address indexed to, uint256 amount);
event Paused(address account);
modifier whenNotPaused() {
require(!paused, "Contract is paused");
_;
}
constructor() Ownable(msg.sender) {
balances[msg.sender] = 1000000 * 10**18;
}
// Checks-Effects-Interactions pattern
function transfer(address to, uint256 amount)
external
nonReentrant
whenNotPaused
{
// Checks
require(to != address(0), "Invalid address");
require(balances[msg.sender] >= amount, "Insufficient balance");
// Effects
balances[msg.sender] -= amount;
balances[to] += amount;
// Interactions (none in this case, but would go here)
emit Transfer(msg.sender, to, amount);
}
function pause() external onlyOwner {
paused = true;
emit Paused(msg.sender);
}
}
```
```javascript
// Ethers.js v6 - Interact with blockchain
import { ethers } from 'ethers';
async function interactWithContract() {
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, provider);
const contract = new ethers.Contract(
CONTRACT_ADDRESS,
ABI,
wallet
);
try {
// Estimate gas first
const gasEstimate = await contract.transfer.estimateGas(
recipientAddress,
amount
);
// Send transaction with buffer
const tx = await contract.transfer(recipientAddress, amount, {
gasLimit: gasEstimate * 120n / 100n // 20% buffer
});
const receipt = await tx.wait();
console.log(`TX confirmed: ${receipt.hash}`);
} catch (error) {
console.error('Transaction failed:', error.message);
}
}
```
## Cybersecurity Best Practices
```python
# Security scanning with bandit
# bandit -r src/ -f json -o security-report.json
# Secure password hashing
from argon2 import PasswordHasher
from argon2.exceptions import VerifyMismatchError
ph = PasswordHasher(
time_cost=3,
memory_cost=65536,
parallelism=4
)
def hash_password(password: str) -> str:
"""Hash password with Argon2id."""
return ph.hash(password)
def verify_password(hash: str, password: str) -> bool:
"""Verify password against hash."""
try:
ph.verify(hash, password)
return True
except VerifyMismatchError:
return False
# Input validation
import re
from html import escape
def sanitize_input(user_input: str) -> str:
"""Sanitize user input to prevent XSS."""
# Remove script tags
cleaned = re.sub(r'<script.*?>.*?</script>', '', user_input, flags=re.DOTALL)
# Escape HTML entities
return escape(cleaned)
def validate_email(email: str) -> bool:
"""Validate email format."""
pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
return bool(re.match(pattern, email))
```
## QA & Testing Framework
```javascript
// Jest with comprehensive testing patterns
import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
describe('Authentication Flow', () => {
// Setup and teardown
beforeEach(() => {
jest.clearAllMocks();
localStorage.clear();
});
afterEach(() => {
jest.restoreAllMocks();
});
// Happy path
test('successful login redirects to dashboard', async () => {
const mockLogin = jest.fn().mockResolvedValue({ token: 'abc123' });
render(<LoginForm onLogin={mockLogin} />);
await userEvent.type(screen.getByLabelText(/email/i), '[email protected]');
await userEvent.type(screen.getByLabelText(/password/i), 'securepass');
await userEvent.click(screen.getByRole('button', { name: /login/i }));
await waitFor(() => {
expect(mockLogin).toHaveBeenCalledWith({
email: '[email protected]',
password: 'securepass'
});
});
});
// Error handling
test('displays error on invalid credentials', async () => {
const mockLogin = jest.fn().mockRejectedValue(new Error('Invalid credentials'));
render(<LoginForm onLogin={mockLogin} />);
await userEvent.type(screen.getByLabelText(/email/i), '[email protected]');
await userEvent.type(screen.getByLabelText(/password/i), 'wrongpass');
await userEvent.click(screen.getByRole('button', { name: /login/i }));
await waitFor(() => {
expect(screen.getByRole('alert')).toHaveTextContent(/invalid credentials/i);
});
});
// Edge cases
test('prevents submission with empty fields', async () => {
const mockLogin = jest.fn();
render(<LoginForm onLogin={mockLogin} />);
await userEvent.click(screen.getByRole('button', { name: /login/i }));
expect(mockLogin).not.toHaveBeenCalled();
expect(screen.getByText(/email is required/i)).toBeInTheDocument();
});
});
```
```javascript
// Cypress E2E with best practices
describe('E-commerce Checkout', () => {
beforeEach(() => {
cy.intercept('GET', '/api/cart', { fixture: 'cart.json' }).as('getCart');
cy.intercept('POST', '/api/checkout', { fixture: 'order.json' }).as('checkout');
cy.login('[email protected]', 'password'); // Custom command
cy.visit('/checkout');
cy.wait('@getCart');
});
it('completes checkout successfully', () => {
// Fill shipping info
cy.get('[data-testid="shipping-form"]').within(() => {
cy.get('input[name="address"]').type('123 Main St');
cy.get('input[name="city"]').type('New York');
cy.get('select[name="state"]').select('NY');
cy.get('input[name="zip"]').type('10001');
});
// Fill payment info
cy.get('[data-testid="payment-form"]').within(() => {
cy.get('input[name="card"]').type('4242424242424242');
cy.get('input[name="expiry"]').type('12/25');
cy.get('input[name="cvv"]').type('123');
});
// Submit and verify
cy.get('[data-testid="submit-order"]').click();
cy.wait('@checkout');
cy.url().should('include', '/order-confirmation');
cy.get('[data-testid="order-number"]').should('exist');
});
});
```
## Security Testing Checklist
```yaml
# OWASP Top 10 Testing Checklist
security_tests:
injection:
- SQL injection in all inputs
- NoSQL injection
- Command injection
- LDAP injection
status: [ ]
authentication:
- Password policy enforcement
- Account lockout mechanism
- Session management
- MFA implementation
status: [ ]
sensitive_data:
- Data encrypted at rest
- Data encrypted in transit (TLS 1.3)
- No sensitive data in logs
- Secure key management
status: [ ]
access_control:
- RBAC implementation
- Privilege escalation tests
- IDOR vulnerabilities
- Path traversal
status: [ ]
security_headers:
- Content-Security-Policy
- X-Frame-Options
- X-Content-Type-Options
- Strict-Transport-Security
status: [ ]
```
## Test Pyramid
```
/\
/ \ E2E Tests (10%)
/ \ - Full user flows
/------\ - Browser automation
/ \
/ \ Integration Tests (20%)
/ \ - API contracts
/--------------\ - Service integration
/ \
/ \ Unit Tests (70%)
/--------------------\ - Fast, isolated
- Mock dependencies
```
## Troubleshooting Guide
| Symptom | Cause | Solution |
|---------|-------|----------|
| Reentrancy exploit | No guard | Use ReentrancyGuard |
| Gas too high | Inefficient code | Optimize loops, storage |
| Test flaky | Async issues | Add proper waits |
| False positive | ScanneRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.