VS Code Snippets Generator
ide
VS Code
.vscode/snippets.json
scaffolding
mentor
Generate custom VS Code snippets configuration file for any language or framework with triggers and templates.
By alex_dev
12/8/2025
Prompt
Generate a VS Code snippets configuration file for the following requirements:
Snippet Configuration
- Target Language: [TypeScript / JavaScript / Python / etc.]
- Framework: [React / Vue / Angular / etc., or None]
- File Location:
.vscode/snippets/[language].json(e.g., typescriptreact.json, python.json)
Snippets to Create
For each snippet, specify:
Snippet 1: [Snippet Name]
- Trigger/Prefix: [e.g., "rfc", "comp", "fn"]
- Description: [What this snippet generates]
- Template Requirements:
- [Requirement 1, e.g., "Include TypeScript interface for props"]
- [Requirement 2, e.g., "Use functional component pattern"]
- [Requirement 3, e.g., "Include placeholder for component logic"]
- Tab Stops: [Where cursor should jump: ${1:placeholder}, ${2:nextField}, $0 (final position)]
Snippet 2: [Snippet Name]
- Trigger/Prefix: [e.g., "hook", "useState"]
- Description: [What this snippet generates]
- Template Requirements:
- [List requirements]
- Tab Stops: [Specify cursor positions]
Snippet 3: [Snippet Name]
- Trigger/Prefix: [e.g., "test", "describe"]
- Description: [What this snippet generates]
- Template Requirements:
- [List requirements]
- Tab Stops: [Specify cursor positions]
[Add 3-5 total snippets]
Code Style Requirements
- Follow [PEP8 / Airbnb / Google / etc.] style guide
- Use [ES6+ / TypeScript / modern syntax]
- Include proper imports
- Add inline comments for complex sections
Example Patterns
Include snippets for common patterns like:
- Component boilerplate (if applicable)
- Function/method templates
- Test structure
- Import statements
- Error handling blocks
- Documentation comments
VS Code Snippet Format
Generate the complete JSON file with proper VS Code snippet syntax:
- Use
"prefix"for trigger keyword - Use
"body"as array of strings (one per line) - Use
"description"for snippet documentation - Support tab stops with
${1:placeholder}syntax - Support transformations with regex if needed
- Support choice options with
${1|option1,option2,option3|}
Generate the complete .vscode/snippets/[language].json file ready to use in VS Code.
Tags
vscode
react
typescript
snippets
Tested Models
gpt-4
claude-3-5-sonnet