Skip to main content
Glama
coding-rules.json2.96 kB
{ "rules": { "general": { "codeStyle": "Follow official style guides for each language", "documentation": "Document all public APIs and complex logic", "testing": "Write tests for all new features", "security": "Never commit secrets, validate all inputs" }, "typescript": { "strict": true, "noAny": "Avoid 'any' type, use 'unknown' if needed", "interfaces": "Prefer interfaces over type aliases for objects", "enums": "Use const enums or string unions", "nullChecks": "Enable strict null checks" }, "javascript": { "esModules": "Use ES modules (import/export)", "const": "Use const by default, let when needed", "arrowFunctions": "Prefer arrow functions for callbacks", "destructuring": "Use destructuring for objects/arrays", "asyncAwait": "Prefer async/await over .then()" }, "python": { "style": "Follow PEP 8", "typing": "Use type hints (Python 3.9+)", "docstrings": "Use Google or NumPy docstring format", "virtualEnv": "Always use virtual environments", "linting": "Use ruff or black + pylint" }, "react": { "components": "Functional components with hooks", "state": "Use useState for local, context/zustand for global", "effects": "Minimize useEffect, prefer derived state", "memoization": "Use useMemo/useCallback when needed", "keys": "Always use stable, unique keys in lists" }, "api": { "rest": "Use proper HTTP methods and status codes", "versioning": "Version APIs (/v1/, /v2/)", "errors": "Return consistent error format", "validation": "Validate all input on server side", "documentation": "Use OpenAPI/Swagger for docs" }, "database": { "migrations": "Always use migrations, never manual changes", "indexing": "Index columns used in WHERE/JOIN", "transactions": "Use transactions for multi-step operations", "connections": "Use connection pooling", "backups": "Automate regular backups" }, "security": { "secrets": "Use environment variables or secret managers", "auth": "Use OAuth2/OIDC for authentication", "passwords": "Hash with bcrypt/argon2, never store plain", "https": "Always use HTTPS in production", "cors": "Configure CORS properly, don't use *" }, "git": { "commits": "Use conventional commits format", "branches": "Use feature branches, PR for merges", "prReview": "Require code review before merge", "gitignore": "Exclude secrets, builds, node_modules" } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/millsydotdev/Code-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server