Deep Stack Research Prompt Generator
Deep stack analysis tool.
Arguments: $ARGUMENTS
Instructions
Generate a comprehensive deep research prompt for the topic "$ARGUMENTS" tailored to the current project's technology stack.
If no topic is provided, ask the user what topic they want to research (e.g., security, performance, maintainability, scalability, testing, deployment, accessibility).
Phase 1: Detect the Technology Stack
Analyze the current project to identify all technologies and their versions. Check these files:
Backend Detection
| File |
Technology |
composer.json |
PHP ecosystem (Laravel, Symfony, etc.) — check require for framework and PHP version |
package.json |
Node.js ecosystem (Express, Fastify, NestJS, etc.) — check for server-side frameworks |
requirements.txt / pyproject.toml / Pipfile |
Python (Django, Flask, FastAPI) |
Gemfile |
Ruby (Rails, Sinatra) |
go.mod |
Go (Gin, Echo, Fiber) |
Cargo.toml |
Rust (Actix, Axum, Rocket) |
pom.xml / build.gradle |
Java (Spring Boot) |
*.csproj / *.sln |
.NET (ASP.NET Core) |
Frontend Detection
Check package.json dependencies for:
- Frameworks: React, Vue, Svelte, Angular, Solid, Preact, Qwik
- Meta-frameworks: Next.js, Nuxt, SvelteKit, Remix, Astro
- Build tools: Vite, Webpack, Parcel, esbuild, Turbopack
- CSS: Tailwind CSS, Bootstrap, styled-components, Sass, PostCSS
Integration/Middleware Layer
Look for glue technologies:
- Inertia.js (
@inertiajs/vue3, @inertiajs/react, etc.)
- Livewire (in
composer.json)
- HTMX (in
package.json or HTML files)
- Turbo/Hotwire (in
package.json or Gemfile)
- Alpine.js (often paired with Livewire/HTMX)
Database Detection
Check these locations:
.env file: DB_CONNECTION, DATABASE_URL
docker-compose.yml: Database service definitions
config/database.php (Laravel), settings.py (Django), etc.
- ORM configs: Prisma (
schema.prisma), Drizzle, TypeORM, Eloquent
Common databases: MySQL, PostgreSQL, SQLite, MongoDB, Redis, Elasticsearch
Infrastructure/Other Tools
- Caching: Redis, Memcached
- Search: Elasticsearch, Meilisearch, Algolia
- Queues: Redis, RabbitMQ, SQS
- Storage: S3, local filesystem
- Auth: Sanctum, Passport, NextAuth, Auth0, Clerk
Version Detection
For each technology found, extract the version:
package.json: Check dependencies and devDependencies for exact versions
composer.json: Check require section
- Lock files (
package-lock.json, composer.lock) have exact versions
.env or Docker configs may specify database versions
Phase 2: Confirm Stack with User
IMPORTANT: First output the detected stack as a text message to the user. Do NOT put the stack details inside the AskUserQuestion tool — the tool has limited space for display.
Step 1: Display the stack as text output
Output a message like this (with actual detected values):
I detected the following technology stack for this project:
**Backend:**
- Rust 1.75
- Tauri 2.0
**Frontend:**
- TypeScript 5.3
- React 18.2
- Vite 5.0
- Tailwind CSS 3.4
**Database:**
- SQLite (via Tauri)
**Desktop:**
- Tauri 2.0 (Rust backend, webview frontend)
**Other:**
- pnpm (package manager)
Step 2: Then ask for confirmation
AFTER displaying the stack details above, use the AskUserQuestion tool with a simple confirmation question:
- Question: "Does this detected stack look correct?"
- Options: "Yes, looks correct" / "Need corrections"
Wait for user confirmation before proceeding. If the user provides corrections, incorporate them into the stack.
Phase 3: Generate the Deep Research Prompt
Once the stack is confirmed, generate a comprehensive research prompt. The prompt should be structured for a deep research tool (like Claude, Perplexity, or similar).
Prompt Template
Generate output in this format (replace placeholders with actual stack details):
START OF GENERATED PROMPT
I'm working on a web application with the following technology stack:
Backend:
- [List each backend technology with version]
Frontend:
- [List each frontend technology with version]
Integration:
- [List integration/middleware if applicable]
Database:
- [List databases and data stores with versions]
Other:
- [List other notable tools]
I need comprehensive research on [TOPIC from $ARGUMENTS] best practices, patterns, and considerations for this specific stack.
Research Scope
1. Individual Technology Analysis
For each technology in my stack, research:
- [TOPIC] best practices specific to this version
- Known issues, vulnerabilities, or limitations related to [TOPIC]
- Configuration options that affect [TOPIC]
- Common mistakes developers make regarding [TOPIC]
- Version-specific considerations (what changed in recent versions)
2. Integration Points
Research [TOPIC] considerations for these technology combinations:
- [Backend framework] + [Frontend framework] (data flow, state management)
- [Backend] + [Database] (query patterns, connection handling)
- [Integration layer] specifics (if applicable)
- [Any other relevant combinations based on the stack]
Focus on issues that arise specifically from these technologies working together, not just individual concerns.
3. Stack-Specific Patterns
Identify [TOPIC] patterns and architectures that are:
- Recommended for this exact stack combination
- Anti-patterns to avoid with this stack
- Trade-offs specific to these technology choices
4. Real-World Considerations
Research:
- Common [TOPIC] issues reported by developers using this stack
- Production lessons learned
- Scaling considerations related to [TOPIC]
- Monitoring and observability for [TOPIC]
Requested Output Format
Please provide your findings organized as:
Executive Summary
- Top 10 most critical [TOPIC] considerations for this stack
- Priority-ranked action items
Per-Technology Guidelines
- Organized by each technology in the stack
- Specific, actionable recommendations
- Code examples where helpful
Integration Guidelines
- [TOPIC] at the boundaries between technologies
- Data flow considerations
- Common pitfalls when technologies interact
Known Issues & Gotchas
- Version-specific bugs or limitations
- Documented vulnerabilities (for security topics)
- Edge cases to watch for
Checklist
- Actionable audit checklist for [TOPIC]
- Can be used to review existing code
Anti-Patterns
- What NOT to do
- Common mistakes with this stack
- Why they're problematic
Resources
- Official documentation links
- Recommended articles, tutorials, talks
- Tools that help with [TOPIC] for this stack
END OF GENERATED PROMPT
Phase 4: Present the Output
Output the generated prompt as plain text that the user can easily copy.
Before the prompt, add:
Here's your deep research prompt for "[TOPIC]" tailored to your stack. Copy this and paste it into your preferred research tool:
After the prompt, add:
Tip: This prompt works well with Claude, ChatGPT, Perplexity, or similar AI research tools. For best results, use a tool that can search the web for current information.
Topic-Specific Additions
Depending on the topic provided in $ARGUMENTS, emphasize different aspects:
If topic is "security":
- Emphasize CVEs, OWASP Top 10, authentication, authorization, input validation
- Include encryption, secrets management, dependency vulnerabilities
- Request exploit examples and mitigation strategies
If topic is "performance":
- Emphasize profiling, caching strategies, database optimization, lazy loading
- Include bundle size, Core Web Vitals, memory management
- Request benchmarking approaches and monitoring tools
If topic is "testing":
- Emphasize unit, integration, e2e testing strategies for the stack
- Include mocking strategies, test data management, CI/CD integration
- Request coverage goals and testing anti-patterns
If topic is "maintainability":
- Emphasize code organization, naming conventions, documentation
- Include refactoring patterns, technical debt management
- Request code review checklists and architecture patterns
If topic is "scalability":
- Emphasize horizontal/vertical scaling, load balancing, caching
- Include database sharding, microservices considerations
- Request capacity planning and bottleneck identification
If topic is "deployment":
- Emphasize CI/CD, containerization, environment management
- Include rollback strategies, zero-downtime deployments
- Request infrastructure as code and monitoring setup
If topic is "accessibility":
- Emphasize WCAG compliance, screen reader support, keyboard navigation
- Include ARIA patterns, color contrast, focus management
- Request testing tools and audit approaches
Notes
- Always include version numbers — they matter for accurate research
- If you can't detect a version, note it as "[version unknown]" and ask the user
- The generated prompt should be self-contained and not require additional context
- Tailor the integration section to the actual technologies detected (don't include generic examples)
1---2name: deepstack3description: Detects your project's full technology stack, then generates a comprehensive research prompt tailored to a specific topic like security, performance, or testing.4---56# Deep Stack Research Prompt Generator78Deep stack analysis tool.910Arguments: $ARGUMENTS1112## Instructions1314Generate a comprehensive deep research prompt for the topic **"$ARGUMENTS"** tailored to the current project's technology stack.1516**If no topic is provided**, ask the user what topic they want to research (e.g., security, performance, maintainability, scalability, testing, deployment, accessibility).1718---1920## Phase 1: Detect the Technology Stack2122Analyze the current project to identify all technologies and their versions. Check these files:2324### Backend Detection2526| File | Technology |27|------|------------|28| `composer.json` | PHP ecosystem (Laravel, Symfony, etc.) — check `require` for framework and PHP version |29| `package.json` | Node.js ecosystem (Express, Fastify, NestJS, etc.) — check for server-side frameworks |30| `requirements.txt` / `pyproject.toml` / `Pipfile` | Python (Django, Flask, FastAPI) |31| `Gemfile` | Ruby (Rails, Sinatra) |32| `go.mod` | Go (Gin, Echo, Fiber) |33| `Cargo.toml` | Rust (Actix, Axum, Rocket) |34| `pom.xml` / `build.gradle` | Java (Spring Boot) |35| `*.csproj` / `*.sln` | .NET (ASP.NET Core) |3637### Frontend Detection3839Check `package.json` dependencies for:40- **Frameworks**: React, Vue, Svelte, Angular, Solid, Preact, Qwik41- **Meta-frameworks**: Next.js, Nuxt, SvelteKit, Remix, Astro42- **Build tools**: Vite, Webpack, Parcel, esbuild, Turbopack43- **CSS**: Tailwind CSS, Bootstrap, styled-components, Sass, PostCSS4445### Integration/Middleware Layer4647Look for glue technologies:48- **Inertia.js** (`@inertiajs/vue3`, `@inertiajs/react`, etc.)49- **Livewire** (in `composer.json`)50- **HTMX** (in `package.json` or HTML files)51- **Turbo/Hotwire** (in `package.json` or `Gemfile`)52- **Alpine.js** (often paired with Livewire/HTMX)5354### Database Detection5556Check these locations:57- `.env` file: `DB_CONNECTION`, `DATABASE_URL`58- `docker-compose.yml`: Database service definitions59- `config/database.php` (Laravel), `settings.py` (Django), etc.60- ORM configs: Prisma (`schema.prisma`), Drizzle, TypeORM, Eloquent6162Common databases: MySQL, PostgreSQL, SQLite, MongoDB, Redis, Elasticsearch6364### Infrastructure/Other Tools6566- **Caching**: Redis, Memcached67- **Search**: Elasticsearch, Meilisearch, Algolia68- **Queues**: Redis, RabbitMQ, SQS69- **Storage**: S3, local filesystem70- **Auth**: Sanctum, Passport, NextAuth, Auth0, Clerk7172### Version Detection7374For each technology found, extract the version:75- `package.json`: Check `dependencies` and `devDependencies` for exact versions76- `composer.json`: Check `require` section77- Lock files (`package-lock.json`, `composer.lock`) have exact versions78- `.env` or Docker configs may specify database versions7980---8182## Phase 2: Confirm Stack with User8384**IMPORTANT: First output the detected stack as a text message to the user.** Do NOT put the stack details inside the AskUserQuestion tool — the tool has limited space for display.8586### Step 1: Display the stack as text output8788Output a message like this (with actual detected values):8990```91I detected the following technology stack for this project:9293**Backend:**94- Rust 1.7595- Tauri 2.09697**Frontend:**98- TypeScript 5.399- React 18.2100- Vite 5.0101- Tailwind CSS 3.4102103**Database:**104- SQLite (via Tauri)105106**Desktop:**107- Tauri 2.0 (Rust backend, webview frontend)108109**Other:**110- pnpm (package manager)111```112113### Step 2: Then ask for confirmation114115AFTER displaying the stack details above, use the AskUserQuestion tool with a simple confirmation question:116117- Question: "Does this detected stack look correct?"118- Options: "Yes, looks correct" / "Need corrections"119120**Wait for user confirmation before proceeding.** If the user provides corrections, incorporate them into the stack.121122---123124## Phase 3: Generate the Deep Research Prompt125126Once the stack is confirmed, generate a comprehensive research prompt. The prompt should be structured for a deep research tool (like Claude, Perplexity, or similar).127128### Prompt Template129130Generate output in this format (replace placeholders with actual stack details):131132---133134**START OF GENERATED PROMPT**135136I'm working on a web application with the following technology stack:137138**Backend:**139- [List each backend technology with version]140141**Frontend:**142- [List each frontend technology with version]143144**Integration:**145- [List integration/middleware if applicable]146147**Database:**148- [List databases and data stores with versions]149150**Other:**151- [List other notable tools]152153I need comprehensive research on **[TOPIC from $ARGUMENTS]** best practices, patterns, and considerations for this specific stack.154155## Research Scope156157### 1. Individual Technology Analysis158159For each technology in my stack, research:160- **[TOPIC]** best practices specific to this version161- Known issues, vulnerabilities, or limitations related to **[TOPIC]**162- Configuration options that affect **[TOPIC]**163- Common mistakes developers make regarding **[TOPIC]**164- Version-specific considerations (what changed in recent versions)165166### 2. Integration Points167168Research **[TOPIC]** considerations for these technology combinations:169- [Backend framework] + [Frontend framework] (data flow, state management)170- [Backend] + [Database] (query patterns, connection handling)171- [Integration layer] specifics (if applicable)172- [Any other relevant combinations based on the stack]173174Focus on issues that arise specifically from these technologies working together, not just individual concerns.175176### 3. Stack-Specific Patterns177178Identify **[TOPIC]** patterns and architectures that are:179- Recommended for this exact stack combination180- Anti-patterns to avoid with this stack181- Trade-offs specific to these technology choices182183### 4. Real-World Considerations184185Research:186- Common **[TOPIC]** issues reported by developers using this stack187- Production lessons learned188- Scaling considerations related to **[TOPIC]**189- Monitoring and observability for **[TOPIC]**190191## Requested Output Format192193Please provide your findings organized as:1941951. **Executive Summary**196 - Top 10 most critical **[TOPIC]** considerations for this stack197 - Priority-ranked action items1981992. **Per-Technology Guidelines**200 - Organized by each technology in the stack201 - Specific, actionable recommendations202 - Code examples where helpful2032043. **Integration Guidelines**205 - **[TOPIC]** at the boundaries between technologies206 - Data flow considerations207 - Common pitfalls when technologies interact2082094. **Known Issues & Gotchas**210 - Version-specific bugs or limitations211 - Documented vulnerabilities (for security topics)212 - Edge cases to watch for2132145. **Checklist**215 - Actionable audit checklist for **[TOPIC]**216 - Can be used to review existing code2172186. **Anti-Patterns**219 - What NOT to do220 - Common mistakes with this stack221 - Why they're problematic2222237. **Resources**224 - Official documentation links225 - Recommended articles, tutorials, talks226 - Tools that help with **[TOPIC]** for this stack227228**END OF GENERATED PROMPT**229230---231232## Phase 4: Present the Output233234Output the generated prompt as plain text that the user can easily copy.235236Before the prompt, add:237238> **Here's your deep research prompt for "[TOPIC]" tailored to your stack. Copy this and paste it into your preferred research tool:**239240After the prompt, add:241242> **Tip:** This prompt works well with Claude, ChatGPT, Perplexity, or similar AI research tools. For best results, use a tool that can search the web for current information.243244---245246## Topic-Specific Additions247248Depending on the topic provided in `$ARGUMENTS`, emphasize different aspects:249250### If topic is "security":251- Emphasize CVEs, OWASP Top 10, authentication, authorization, input validation252- Include encryption, secrets management, dependency vulnerabilities253- Request exploit examples and mitigation strategies254255### If topic is "performance":256- Emphasize profiling, caching strategies, database optimization, lazy loading257- Include bundle size, Core Web Vitals, memory management258- Request benchmarking approaches and monitoring tools259260### If topic is "testing":261- Emphasize unit, integration, e2e testing strategies for the stack262- Include mocking strategies, test data management, CI/CD integration263- Request coverage goals and testing anti-patterns264265### If topic is "maintainability":266- Emphasize code organization, naming conventions, documentation267- Include refactoring patterns, technical debt management268- Request code review checklists and architecture patterns269270### If topic is "scalability":271- Emphasize horizontal/vertical scaling, load balancing, caching272- Include database sharding, microservices considerations273- Request capacity planning and bottleneck identification274275### If topic is "deployment":276- Emphasize CI/CD, containerization, environment management277- Include rollback strategies, zero-downtime deployments278- Request infrastructure as code and monitoring setup279280### If topic is "accessibility":281- Emphasize WCAG compliance, screen reader support, keyboard navigation282- Include ARIA patterns, color contrast, focus management283- Request testing tools and audit approaches284285---286287## Notes288289- Always include version numbers — they matter for accurate research290- If you can't detect a version, note it as "[version unknown]" and ask the user291- The generated prompt should be self-contained and not require additional context292- Tailor the integration section to the actual technologies detected (don't include generic examples)