用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SiThuTun-mdy/fast-order --skill spring-data-jpa-skill命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
PostHog integration for client-side web JavaScript applications using posthog-js
Use when planning or writing server-side code that uses `@supabase/server` — Edge Functions, Hono apps, webhook handlers, or any backend that creates Supabase clients or validates inbound auth. Trigger **before** writing or modifying any file that imports from `@supabase/server` (or sub-paths like `@supabase/server/core`); calls `withSupabase`, `createSupabaseContext`, `createAdminClient`, `createContextClient`, `verifyAuth`, `verifyCredentials`, or `extractCredentials`; configures an `auth:` mode (`'none'` | `'publishable'` | `'secret'` | `'user'`, or keyed variants like `'secret:*'`); or lives under `supabase/functions/` and authenticates an inbound request. Also trigger during planning — if a plan mentions any of the above, load the skill before drafting code; do not extrapolate `auth:` values or auth modes from neighboring functions. Also trigger when you see legacy patterns to migrate to this package — `Deno.serve`, `createClient(Deno.env.get('SUPABASE_URL'))`, imports from `esm.sh/@supabase` or `deno.la
Conventions and gotchas for this app's customer order flow (menu browsing → cart → checkout → order status tracking). Use when adding order fields, changing order status/lifecycle, editing the checkout form, or touching CartContext, useOrders, api/orders.js, or the order-related Next.js API routes in server/app/api/.
基于 SOC 职业分类
正在显示 SKILL.md
| name | spring-data-jpa-skill |
| description | Implement the persistence layer using Spring Data JPA in Spring Boot applications. |
Follow the below principles when using Spring Data JPA:
Disable the Open Session in View (OSIV) filter: spring.jpa.open-in-view=false
Disable in-memory pagination: spring.jpa.properties.hibernate.query.fail_on_pagination_over_collection_fetch=true
Avoid the N+1 SELECT problem: use JOIN FETCH to load associated child collections in a single query.
Avoid in-memory pagination: when loading a paginated list of parent entities with child collections:
PostRepository.java
public interface PostRepository extends JpaRepository<Post, Long> {
@Query("select p.id from Post p order by p.id") Page findPostIds(Pageable pageable);
@Query("select distinct p from Post p left join fetch p.comments where p.id in :ids") List findAllByIdInWithComments(@Param("ids") Collection ids); }
PostService.java
@Service public class PostService { private final PostRepository postRepository;
public PostService(PostRepository postRepository) { this.postRepository = postRepository; }
@Transactional(readOnly = true) public Page findPosts(Pageable pageable) { Page idsPage = postRepository.findPostIds(pageable); if (idsPage.isEmpty()) { return Page.empty(pageable); } List posts = postRepository.findAllByIdInWithComments(idsPage.getContent()); return new PageImpl<>(posts, pageable, idsPage.getTotalElements()); } }