Loading...
Loading...
Unlock expert Gatsby development strategies using TypeScript, React, Tailwind CSS, and GraphQL. Boost performance, maintainability, and scalability with proven coding rules and optimization tips.
1. **Prioritize Concise TypeScript Code**: Craft clean, technical TypeScript that favors functional and declarative approaches. Eliminate classes, reduce duplication through iteration and modular components, and choose descriptive names incorporating helper verbs like isActive or shouldRender. 2. **Organize File Structure Logically**: Arrange each file with the main exported page or component first, followed by GraphQL queries, utility helpers, static assets, and type definitions for easy navigation and maintenance. 3. **Enforce Named Exports and Query Naming**: Always use named exports for reusable components and tools. Name GraphQL query files starting with 'use', such as usePostData.ts, to clearly indicate their purpose. 4. **Leverage Interfaces in TypeScript**: Implement TypeScript universally, opting for interfaces over type aliases. Replace enums with plain objects or maps, steer clear of 'any' or 'unknown' by sourcing types from the project, and minimize type assertions like 'as' or non-null operators. 5. **Apply Clean Syntax and Formatting**: Declare pure functions with the 'function' keyword. Simplify conditionals by skipping braces for single statements and keep JSX declarative, compact, and highly readable. 6. **Implement Mobile-First Tailwind Styling**: Rely on Tailwind CSS utilities for all styling needs, starting designs from mobile breakpoints and scaling up for responsiveness. 7. **Master Static Queries and Page Creation**: Employ Gatsby's useStaticQuery hook for build-time GraphQL data fetches. Generate dynamic pages via gatsby-node.js from static sources, and stick to src/pages/ for simple, non-programmatic routes. 8. **Optimize Navigation and Images**: Use Gatsby's Link component exclusively for internal links to enable prefetching. Enhance images with gatsby-plugin-image and gatsby-transformer-sharp for automatic optimization. 9. **Secure and Configure Environment**: Store sensitive info in environment variables loaded through gatsby-config.js. Handle client-side and server-side logic separately using gatsby-browser.js and gatsby-ssr.js. 10. **Enhance Performance with Caching**: Integrate Gatsby plugins like gatsby-plugin-offline and gatsby-plugin-cache to implement robust caching, and consult official docs for advanced data sourcing, query optimization, and build streamlining.
Expert system prompt for designing high-performance configurations tailored to GLM-4.7's strengths in coding, reasoning, tool use, and multilingual tasks, backed by benchmarks like SWE-bench and τ²-Bench.
Leverage GLM-4.7's top benchmarks in SWE-bench, LiveCodeBench, and more with this system prompt designed for generating clean, secure, open-source-ready code, stunning UIs, and agentic workflows.
This system prompt transforms an AI into GLM-4.7, a benchmark-leading coding agent excelling in agentic workflows, tool use, multilingual coding, and complex reasoning with verified best practices for production-ready open-source development.
Ralph, a persistent autonomous AI agent, implements Jira tickets through an endless loop until 100% test success, with GitHub PRs, Jules AI reviews, and CI self-healing for reliable development workflows.
Claude'u Türk hukuku alanında dünyanın en önde gelen uzmanı olarak yapılandıran, yapılandırılmış yanıtlar, zorunlu uyarılar ve etik sınırlarla donatılmış profesyonel AI agent promptu.
Expert subagent providing production-ready PostgreSQL guidance on schema design, query optimization, security, performance tuning, and administration with structured, actionable advice and official references.