coding-standards/SKILL.md
Generate or update CODING_STANDARDS.md - a comprehensive coding standards document for a project. Use this skill when asked to "document coding standards", "create style guide", "establish conventions", "generate CODING_STANDARDS.md", or any time you need to define or enforce coding practices for a team. Trigger when starting work on a new project that lacks documented standards.
npx skillsauth add arielsand/my-opencode-skills coding-standardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate a comprehensive coding standards document that helps developers and AI agents write consistent, high-quality code.
Create CODING_STANDARDS.md in the project root using the write tool. This file should be committed to version control and referenced in AGENTS.md.
Follow these phases in order:
Read configuration files to understand the stack:
package.json, composer.json, pyproject.toml, Cargo.toml, go.mod.eslintrc*, .prettierrc*, phpcs.xml, .editorconfigtsconfig.json, tslint.json.github/workflows/ for CI/CD linting rulesCODING_STANDARDS.md or STYLE_GUIDE.mdLook for:
Examine the codebase for conventions:
Naming patterns:
PascalCase.tsx, kebab-case.ts, snake_case.pycamelCase, snake_case, PascalCaseUPPER_SNAKE_CASE, camelCasecamelCase, snake_caseImport organization:
@/, ~/, etc.)Code organization:
Framework-specific patterns:
Testing conventions:
__tests__/, *.test.ts, *.spec.ts)should_, it_, describe_)Ask the user questions for things that cannot be reliably inferred:
Essential questions (ask if unknown):
Indentation & Formatting:
Testing Philosophy:
Code Review Requirements:
Commit Conventions:
Documentation:
Error Handling:
Ask 2-4 of the most relevant questions in a single message. Don't overwhelm the user.
Write CODING_STANDARDS.md with these sections:
A brief intro explaining:
Brief table or list of technologies:
| Layer | Technology | Version | |-------|-----------|---------| | Language | TypeScript | 5.x | | Framework | React | 19.x | | etc. | | |
Comprehensive naming rules for:
Include examples for each:
✅ Good:
const userProfile = useUserProfile(userId);
❌ Bad:
const data = useData(id);
Establish the language for code:
Ask the user if you cannot determine the app's target language for user-facing content.
Example section:
## Language Policy
**All code must be written in English.**
This includes:
- Variable names (`isLoading`, `hasError`)
- Function names (`handleLogin`, `validateEmail`)
- Interface names (`User`, `LoginResponse`)
- Comments (`// Check if user is authenticated`)
- Git commit messages
**Exceptions**:
- User-facing error messages and UI text **must be in [target language]**
```typescript
// ✅ Good - English code, Spanish user message
const handleLogin = async (email: string, password: string) => {
try {
await authApi.login(email, password);
} catch (error) {
setError('Error de conexión. Verifica tu conexión.');
}
};
### 6. Code Style
Language-specific formatting rules:
- Indentation (tabs/spaces, width)
- Quotes (single/double)
- Semicolons
- Trailing commas
- Line length limits
- Bracket style (Allman, K&R, etc.)
If a linter/formatter is configured:
```bash
# Run linting
npm run lint
# Auto-fix issues
npm run lint:fix
Rules for ordering imports:
Example:
// 1. React built-ins
import { useState, useEffect } from 'react';
// 2. External packages
import axios from 'axios';
// 3. Internal modules
import { useAuth } from '@/hooks/useAuth';
// 4. Relative imports
import { Button } from './Button';
// 5. Types
import type { User } from '@/types';
feat/, fix/, break/After creating CODING_STANDARDS.md, verify AI agents are instructed to use it:
AGENTS.md exists in the project rootCODING_STANDARDS.md in AGENTS.md## Coding Standards
This project has strict coding standards documented in `CODING_STANDARDS.md`. Before submitting code:
1. Read the full document
2. Run linting: `npm run lint` (or equivalent)
3. Ensure tests pass
4. Check naming conventions match the guide
5. Verify import organization follows the standard
All code must adhere to these standards. No exceptions.
After writing the file and updating AGENTS.md, inform the user:
Coding standards documented in CODING_STANDARDS.md AGENTS.md updated to reference coding standards.
Suggest they commit both files and consider adding a pre-commit hook to run linting automatically.
If the skill discovers conflicting conventions in the codebase:
"I found both
snake_caseandcamelCasefunction names in the Python codebase:
snake_case: 127 occurrences (mostly in older modules)camelCase: 89 occurrences (mostly in newer modules)Which should be the standard going forward?"
Never guess. Always ask when there's genuine ambiguity.
data-ai
Track work sessions and maintain a WORKLOG.md file. Use this skill at the end of any significant work session, when the user asks to log work, update the worklog, or track time spent. Also use when the user says things like "log this", "update worklog", "track time", "record what we did", or "add to worklog". This skill should be used proactively at natural stopping points like finishing a feature, fixing a bug, or ending a coding session.
development
MUST use whenever the user asks for a security audit, vulnerability assessment, penetration test review, security scan, compliance check (GDPR, SOC2, PCI-DSS), or hardening review of any codebase, API, frontend, or infrastructure. Triggers on phrases like: "audit security", "security review", "check for vulns", "scan for secrets", "assess compliance", "pentest review", "hardening audit", "OWASP check", "CWE audit", "SAST/DAST", "security posture", or any request that involves finding vulnerabilities, misconfigurations, credential leaks, injection flaws, auth weaknesses, or data-exposure risks in code. Use this skill even if the user only mentions a subset (e.g., "check JWT auth") — the skill will scope appropriately.
development
Generate or update PROJECT_ARCHITECTURE.md - a comprehensive architectural map for AI context. Use this skill when asked to "map the architecture", "document the project structure", "onboard a new AI", "analyze the codebase", "create context for AI", or any time you need to understand a codebase's architecture. This skill is essential for new project onboarding and should trigger automatically when starting work on unfamiliar projects.
documentation
Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]