docs(frontend): add hooks naming and organization conventions#6082
Closed
dantovska wants to merge 1 commit into
Closed
docs(frontend): add hooks naming and organization conventions#6082dantovska wants to merge 1 commit into
dantovska wants to merge 1 commit into
Conversation
Expand the Custom Hooks section of the frontend skill with naming, organization, and barrel-file conventions derived from the vector search and vector set features (use-prefix camelCase, named exports, one-folder-per-hook with .types/.utils/.spec companions). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
valkirilov
approved these changes
Jun 17, 2026
Contributor
Author
|
decided to leave it up to personal preference depending on the case |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Expands the Custom Hooks section of the frontend skill (
.ai/skills/frontend/SKILL.md) with explicit naming, organization, and barrel-file conventions for custom React hooks.Previously the skill only said "store component-specific hooks in the component's
/hooksdirectory." The new content documents the conventions actually used across the vector search and vector set features:useprefix,camelCase, file named exactly after the hook, named exports only; context hooks defined inline in their provider.hooks/dirs; one folder per non-trivial hook with.types.ts/.utils.ts/.spec.tscompanions colocated.index.tsre-exporting the hook + public types, and ahooks/index.tsaggregator (tied to the existing 3+ items barrel rule).Docs-only change to a skill file; no code or runtime impact.
Testing
No code changes — review the rendered Markdown in
.ai/skills/frontend/SKILL.md.Note
Low Risk
Documentation-only change to a skill file; no application code or runtime behavior is affected.
Overview
Expands Custom Hooks in
.ai/skills/frontend/SKILL.mdbeyond the one-line “put hooks in/hooks” note with conventions aligned to vector-search / vector-set patterns.Naming documents
use+camelCase, named exports only, hook files named after the hook (camelCase, not PascalCase), and context hooks living in their provider file.Organization distinguishes feature-level vs component-scoped
hooks/, one folder per non-trivial hook with colocated*.types.ts,*.utils.ts, and*.spec.ts, and simple hooks as a single file.Barrels adds per-hook
index.tsre-exports and ahooks/index.tsaggregator gated by the existing 3+ hooks barrel rule.Reviewed by Cursor Bugbot for commit f5e25e3. Bugbot is set up for automated code reviews on this repo. Configure here.