1.2 KiB
1.2 KiB
description: [YOUR_DESCRIPTION] (e.g., "Analyze and explain a specific file")
argument-hint: [YOUR_ARG_HINT] (e.g., "")
[YOUR_COMMAND_NAME]
File Contents
File: @$1
[ADDITIONAL_FILE_REFERENCES] Examples:
- Single file: @src/utils/helpers.ts
- Multiple files: @$1 and @$2
- With arguments: @$1 for file path from user
Analysis
[YOUR_INSTRUCTIONS_FOR_ANALYZING_THE_FILE_CONTENTS]
Example: Provide a detailed explanation of:
- Purpose: What is this file responsible for?
- Key Components: Main functions, classes, and exports
- Dependencies: External libraries and internal imports
- Architecture: How does it fit in the larger system?
- Potential Issues: Bugs, performance concerns, or technical debt
- Improvements: Specific refactoring suggestions
Usage Examples
# Analyze a single file
/analyze src/utils/helpers.ts
# Compare two files
/compare src/v1/api.ts src/v2/api.ts
# Document a file
/document src/components/Button.tsx
Notes
- The
@prefix includes file contents in the prompt - Files are read at command execution time
- Combine with arguments:
@$1for dynamic file paths - Works with relative paths from project root