RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Copilot instructions/chihebnabil/lovable-boilerplate

Copilot instructions

.github/instructions/hooks.instructions.md
Copilot instructions

Quality

54/100

Scores the file, not the repository.

Length

193 words

6 headings · 3 code blocks

Repository

63

— · pushed 15 days ago

Last changed

3 days ago

First indexed 3 days ago.
chihebnabil/lovable-boilerplate/.github/instructions/hooks.instructions.mdRawGitHub
1---
2applyTo: 'src/hooks/**/*.{ts,tsx}'
3---
4# Custom Hooks Guidelines
5 
6## HOOK PATTERNS & BEST PRACTICES
7 
8### Data Fetching Hooks
9```tsx
10// PERFECT: Focused data fetching
11export const useUsers = () => {
12 return useQuery({
13 queryKey: ['users'],
14 queryFn: () => userService.getAllUsers(),
15 staleTime: 5 * 60 * 1000, // 5 minutes
16 })
17}
18 
19export const useUser = (id: string) => {
20 return useQuery({
21 queryKey: ['users', id],
22 queryFn: () => userService.getUser(id),
23 enabled: !!id,
24 })
25}
26```
27 
28### Form Hooks
29```tsx
30// PERFECT: Reusable form logic
31export const useUserForm = (initialData?: Partial<User>) => {
32 const form = useForm<UserFormData>({
33 resolver: zodResolver(userSchema),
34 defaultValues: initialData || {},
35 })
36 
37 const { mutate: saveUser, isPending } = useMutation({
38 mutationFn: userService.updateUser,
39 onSuccess: () => toast.success('User saved'),
40 onError: (error) => toast.error(error.message),
41 })
42 
43 return { form, saveUser, isPending }
44}
45```
46 
47### UI State Hooks
48```tsx
49// PERFECT: Reusable UI state
50export const useDisclosure = (initialState = false) => {
51 const [isOpen, setIsOpen] = useState(initialState)
52
53 return {
54 isOpen,
55 open: () => setIsOpen(true),
56 close: () => setIsOpen(false),
57 toggle: () => setIsOpen(prev => !prev),
58 }
59}
60```
61 
62## Hook Naming Convention
63- **Data**: `useUsers`, `useUser`, `useProducts`
64- **Forms**: `useUserForm`, `useProductForm`
65- **UI State**: `useDisclosure`, `useToggle`, `useLocalStorage`
66- **Business Logic**: `useAuth`, `useCart`, `useNotifications`
67 

Sections

  • Custom Hooks Guidelines
  • HOOK PATTERNS & BEST PRACTICES
  • Data Fetching Hooks
  • Form Hooks
  • UI State Hooks
  • Hook Naming Convention

What it covers

code-styleui

Stack — with the evidence

typescript

(1.00)

react

(1.00)

supabase

(1.00)

tailwind

(1.00)

vite

(1.00)

eslint

(1.00)

node

(0.70)

javascript

(0.60)

github-actions

(0.60)

Glob targeting

  • src/hooks/**/*.{ts
  • tsx}

Format

Copilot instructions

Two layers: one always-on repo file, plus optional glob-scoped instruction files. Lives under .github/ rather than the repo root, which is the tell that it is aimed at the GitHub platform surface as much as the editor.

What the corpus says about it

Repository

Owner
chihebnabil
Language
—
License
—
Archived
no

All configs in this repo

Also in chihebnabil/lovable-boilerplate

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
chihebnabil/lovable-boilerplate.cursor/rules/design.mdc · 63Cursor rulestypescriptreact+7styleuido-not65/1003 days ago
chihebnabil/lovable-boilerplate.cursor/rules/forms.mdc · 63Cursor rulestypescriptreact+7setupstyledo-not73/1003 days ago
chihebnabil/lovable-boilerplate.cursor/rules/hooks.mdc · 63Cursor rulestypescriptreact+7styleuido-not61/1003 days ago
chihebnabil/lovable-boilerplate.cursor/rules/services.mdc · 63Cursor rulestypescriptreact+7archtypesdo-not73/1003 days ago
chihebnabil/lovable-boilerplate.cursor/rules/typescript.mdc · 63Cursor rulestypescriptreact+7setupstyletypessecurity+273/1003 days ago
chihebnabil/lovable-boilerplate.github/instructions/architecture.instructions.md · 63Copilot instructionstypescriptreact+7stylearchtypesdatabase+269/1003 days ago
chihebnabil/lovable-boilerplate.github/instructions/design.instructions.md · 63Copilot instructionstypescriptreact+7lint-formatstyleuido-not61/1003 days ago
chihebnabil/lovable-boilerplate.github/instructions/development.instructions.md · 63Copilot instructionstypescriptreact+7setupbuildtestlint-format+788/1003 days ago
chihebnabil/lovable-boilerplate.github/instructions/lib.instructions.md · 63Copilot instructionstypescriptreact+7archtypesdo-not69/1003 days ago
chihebnabil/lovable-boilerplate.github/instructions/pages.instructions.md · 63Copilot instructionstypescriptreact+7archuido-not69/1003 days ago
chihebnabil/lovable-boilerplate.github/instructions/quality.instructions.md · 63Copilot instructionstypescriptreact+7lint-formatdeploymentdo-not63/1003 days ago
chihebnabil/lovable-boilerplate.github/instructions/reusable.instructions.md · 63Copilot instructionstypescriptreact+7uido-notagent-behaviour32/1003 days ago
chihebnabil/lovable-boilerplateCLAUDE.md · 63CLAUDE.mdtypescriptreact+7setupbuildtestlint-format+589/1003 days ago
chihebnabil/lovable-boilerplate.cursor/rules/core.mdc · 63Cursor rulestypescriptreact+7buildlint-formatarchui+192/1003 days ago
chihebnabil/lovable-boilerplate.github/instructions/components.instructions.md · 63Copilot instructionstypescriptreact+7styleuido-not61/1003 days ago
chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63Copilot instructionstypescriptreact+7buildlint-formatstylearch+4100/1003 days ago
chihebnabil/lovable-boilerplate.cursor/rules/components.mdc · 63Cursor rulestypescriptreact+7stylearchuido-not65/1003 days ago
chihebnabil/lovable-boilerplate.cursor/rules/quality.mdc · 63Cursor rulestypescriptreact+7buildlint-formatstyleui+388/1003 days ago
Diff against .cursor/rules/design.mdc Diff against .cursor/rules/forms.mdc Diff against .cursor/rules/hooks.mdc Diff against .cursor/rules/services.mdc Diff against .cursor/rules/typescript.mdc Diff against .github/instructions/architecture.instructions.md Diff against .github/instructions/design.instructions.md Diff against .github/instructions/development.instructions.md Diff against .github/instructions/lib.instructions.md Diff against .github/instructions/pages.instructions.md Diff against .github/instructions/quality.instructions.md Diff against .github/instructions/reusable.instructions.md Diff against CLAUDE.md Diff against .cursor/rules/core.mdc Diff against .github/instructions/components.instructions.md Diff against .github/instructions/global.instructions.md Diff against .cursor/rules/components.mdc Diff against .cursor/rules/quality.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63Copilot instructionstypescriptreact+7buildlint-formatstylearch+4100/1003 days ago
louislam/uptime-kuma.github/copilot-instructions.md · 90kCopilot instructionstypescriptjavascript+10setupbuildtestlint-format+9100/1003 days ago
JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31kCopilot instructionstypescriptnode+7buildlint-formatstylearch+397/1002 days ago
darkmatter/nixmac.github/copilot-instructions.md · 24Copilot instructionstypescriptrust+14setupbuildtestlint-format+896/1003 days ago
nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32Copilot instructionstypescriptnode+8setupbuildtestlint-format+1196/1003 days ago
thangaram611/second-brain.github/copilot-instructions.md · 0Copilot instructionstypescriptnode+12setupteststylearch+496/1003 days ago
keycloak/keycloak.github/copilot-instructions.md · 36kCopilot instructionsjavanode+9setupbuildtestlint-format+693/1003 days ago
jnPiyush/AgentX.github/instructions/typescript.instructions.md · 14Copilot instructionstypescriptnode+5setuptestlint-formatstyle+592/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack