Skip to content

feat: add react-hook-philosophy plugin#366

Merged
kimyouknow merged 18 commits intomainfrom
feat/hook-design-plugin
Apr 21, 2026
Merged

feat: add react-hook-philosophy plugin#366
kimyouknow merged 18 commits intomainfrom
feat/hook-design-plugin

Conversation

@kimyouknow
Copy link
Copy Markdown
Collaborator

@kimyouknow kimyouknow commented Apr 3, 2026

Summary

Initial draft of react-hook-philosophy as a Claude Code plugin, defining 31 hook design principles for code review and writing guidance.

  • 31 principles: C1-C14 (coding principles from CLAUDE.md) + U1-U17 (usage patterns from react.dev)
  • 2 skills: react-hook-review (checklist) + react-hook-writing (guide)
  • 3 reference hooks: useToggle, useDebounce, useMediaQuery with anti-pattern comparisons

Files

File Description
docs/hook-design-principles.md Design document (requirements + C1-C14 + architecture + roadmap)
docs/react-hook-usage-patterns.md React hook usage patterns (U1-U17 from react.dev)
packages/plugin/ Claude Code plugin structure

Validation

  • claude plugin validate ✅ passed
  • Project reference grep: 0 matches ✅
  • SKILL.md token budget: review 598w, writing 552w (< 1500w limit) ✅

Install (after merge)

claude plugin install --source git-subdir \
  --url https://github.com/toss/react-simplikit.git \
  --path packages/plugin

Test plan

  • Run /react-hook-review locally → verify checklist feedback
  • Run /react-hook-writing locally → verify guide + patterns reference
  • Discuss Q1-Q6 decisions and reflect changes
  • Test git-subdir install from another React project

Add Claude Code plugin with 31 hook design principles (C1-C14 coding + U1-U17 usage patterns) for code review and writing guidance. Includes design document, React hook usage patterns reference, and 3 complete hook implementation examples.
@autofix-troubleshooter
Copy link
Copy Markdown

Hi! I'm the autofix logoautofix.ci troubleshooter bot.

It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

Size Change: 0 B 🆕

Total Size: 0 B

compressed-size-action

- Move C8 (guard clauses) and C11 (function keyword) from Required to Recommended
- Add U12 (useSyncExternalStore) to writing guide
- Fix anti-pattern table: count check uses == null instead of !== undefined
- Add MIT LICENSE file
- Convert hook-design-principles.md and react-hook-usage-patterns.md to English
- Add react.dev source URLs and quotes to all U1-U17 patterns
- Move Korean originals to docs/ko/ for reference
Comment thread docs/ko/react-hook-usage-patterns.md Outdated
// ✅ const intervalRef = useRef<number | null>(null);
```

### U4. 복잡한 관련 state는 useReducer
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for review

useReducer is an app-level state management pattern, not a hook library
design principle. Removed from all docs and plugin review checklist.
- C1, C7: mark as project conventions with notes (React allows arbitrary returns)
- C3: correct "cleanup required" → "cleanup when subscribing" (React says optional)
- C2: add react.dev/hydrateRoot source URL
- U6, U9, U10, U11, U13, U14, U16: replace paraphrased quotes with actual react.dev text
Comment thread packages/plugin/README.md Outdated

```bash
claude plugin install --source git-subdir \
--url https://github.com/kimyouknow/react-simplikit.git \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should change the url path!

zztnrudzz13 and others added 8 commits April 15, 2026 05:54
…dangling

- plugin.json + README install URL: kimyouknow -> toss (addresses zztnrudzz13 review)
- LICENSE: align copyright with root repo (Viva Republica, Inc)
- Remove dangling U4 (useReducer) reference from react-hook-writing/SKILL.md after U4 was removed from usage patterns
- README principle counts: 31 -> 30, "17 usage patterns" -> "16 (U4 excluded)", State Design 7 -> 6
- react-design-principles SKILL.md: promote Zero-Dependency Bias to section 5 to match references/principles.md; React design count 4 -> 5
- hook-design-principles.md Opinionated breakdown: "13 + 1" -> "11 + 3 (C1, C7, C14)" to match inline markings
- hook-design-principles.md section 3: "17 patterns" -> "16 patterns (U4 removed)"
- Korean docs: mark C1/C7 inline 🟡 for parity with EN, sync date to 2026-04-21
…ophy

Reflects broader scope after the react-design-principles skill was added.
The plugin now covers higher-level React API design (declarative interfaces,
lifecycle safety, minimal surface, reliability, zero-dependency bias) in
addition to hook review and writing.
The plugin has not been published yet, so documenting the pre-release
name change is unnecessary noise. The rename is recorded in git history.
Credits the contributor who added the react-design-principles skill.
- Drop "Last Updated" / "최종 업데이트" header lines from all four doc files
  (git history is authoritative for update dates)
- Fix remaining "17 principles" / "17개 원칙" drift in usage-patterns intro lines
  to match the U4-removed count (16)
The GitHub login matches the git commit author identifier, so it's
unambiguous and ties directly to commit history.
@kimyouknow kimyouknow marked this pull request as ready for review April 21, 2026 13:21
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

⚠️ No Changeset found

Latest commit: 50dc900

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kimyouknow kimyouknow merged commit b89cd4a into main Apr 21, 2026
11 checks passed
@kimyouknow kimyouknow deleted the feat/hook-design-plugin branch April 21, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants