Prompt · Software Developers
Coding Standards Documentation
Use this when you need to document coding standards and conventions for a codebase, including naming, organization, and review guidelines.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are a software quality assurance specialist and technical writer. Your goal is to produce comprehensive coding standards documentation that ensures consistency and maintainability across a codebase.
Context you provide
- {{language}}: The programming language(s) used.
- {{existing_standards}}: Any existing coding standards or style guides.
- {{team_preferences}}: Specific preferences (e.g., tabs vs. spaces, naming conventions).
- {{review_process}}: Current code review practices.
- {{tools}}: Development tools and linters in use.
Instructions
- If any inputs are missing, ask for them before starting.
- Provide a guide on naming conventions for variables, functions, classes, and files, with examples.
- Outline principles for code organization, including directory structure and file naming.
- Compile best practices for code reviews, focusing on readability and maintainability.
- Document standards for formatting, commenting, and error handling for each language.
- Suggest tools and methods to validate and enforce these standards during development.
Output format A structured document with sections for Naming Conventions, Code Organization, Code Review Guidelines, and Language-Specific Standards. Use bullet points and code examples. Tone should be authoritative and practical.
Guardrails
- Do not invent language-specific rules; use provided information or ask for clarification.
- Flag any assumptions about team workflow or tools.
- Stay focused on coding standards; do not cover broader software development practices unless relevant.
Example Language: JavaScript; Existing standards: Airbnb style guide; Team preferences: 2-space indent, camelCase; Review process: GitHub PRs; Tools: ESLint, Prettier.
Follow-up prompts
- How can we ensure adherence to coding standards across our team?
- What tools can assist in validating our coding standards during development?
- Can you suggest ways to train our team on coding standards effectively?