Commit 316c676
committed
[repo] init claude config (facebook#35617)
## Overview
Adds a claude setup that works with the nested /compiler setup.
The constraints are:
- when working in the root repo, don't use the compiler configs (easy)
- when working in the compiler/ don't use the parent contigs (hard)
The first one is easy: there's a claude.md and .claude directory in
/compiler that is only loaded when you start a session from /compuler.
The second one is hard, because if you start a session from /compiler,
the parent claude files and skills are loaded.
I was able to deny the permissions to the parent skills in
settings.json, but the descriptions are still loaded into context and I
don't think that's avoidable.
To keep the parent claude file out of context, I created a hook hack: I
moved all the non-compiler claude file context to instructions.md and
added a SessionStart hook to cat the file into context if the cwd isn't
the /compiler. Works well, but won't show it as part of the `/context`
slash command.
## Skills
I also added a number of skills specific to the React repo:
| Skill | Description |
|-------|-------------|
| `/extract-errors` | `yarn extract-errors` |
| `/feature-flags` | how feature flags work and `@gate` |
| `/fix` | linc and prettier |
| `/flags` | `yarn flags` |
| `/flow` | `yarn flow <variant>` |
| `/test` | `yarn test-*` |
| `/verify` | `run all the lints/tests/flow to verify` |
### Example: Flow
| before | after |
|-----|-----|
| <img width="1076" height="442" alt="flow-before"
src="https://github.com/user-attachments/assets/73eec143-d0af-4771-b501-c9dc29cc09ac"
/> | <img width="1076" height="273" alt="flow-after"
src="https://github.com/user-attachments/assets/292d33af-1d98-4252-9c08-744b33e88b86"
/> |
### Example: Tests
| before | after |
|-----|-----|
| <img width="1048" height="607" alt="test-before"
src="https://github.com/user-attachments/assets/aa558ccf-2cee-4d22-b1f1-e4221c5a59dd"
/> | <img width="1075" height="359" alt="test-after"
src="https://github.com/user-attachments/assets/eb795392-6f46-403f-b9bb-8851ed790165"
/> |
DiffTrain build for [a056625](facebook@a056625)1 parent 0a47de0 commit 316c676
File tree
23 files changed
+804
-4440
lines changed- compiled-rn
- facebook-fbsource/xplat/js
- RKJSModules/vendor/react
- react-dom/cjs
- react-test-renderer/cjs
- react/cjs
- react-native-github/Libraries/Renderer
- implementations
- tools/eslint-plugin-react-hooks
- cjs
23 files changed
+804
-4440
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
30267 | 30267 | | |
30268 | 30268 | | |
30269 | 30269 | | |
30270 | | - | |
| 30270 | + | |
30271 | 30271 | | |
30272 | 30272 | | |
30273 | 30273 | | |
30274 | | - | |
| 30274 | + | |
30275 | 30275 | | |
30276 | 30276 | | |
30277 | 30277 | | |
| |||
30308 | 30308 | | |
30309 | 30309 | | |
30310 | 30310 | | |
30311 | | - | |
| 30311 | + | |
30312 | 30312 | | |
30313 | 30313 | | |
30314 | | - | |
| 30314 | + | |
30315 | 30315 | | |
30316 | 30316 | | |
30317 | 30317 | | |
| |||
30461 | 30461 | | |
30462 | 30462 | | |
30463 | 30463 | | |
30464 | | - | |
| 30464 | + | |
30465 | 30465 | | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
17710 | 17710 | | |
17711 | 17711 | | |
17712 | 17712 | | |
17713 | | - | |
| 17713 | + | |
17714 | 17714 | | |
17715 | 17715 | | |
17716 | 17716 | | |
17717 | 17717 | | |
17718 | 17718 | | |
17719 | 17719 | | |
17720 | | - | |
| 17720 | + | |
17721 | 17721 | | |
17722 | 17722 | | |
17723 | 17723 | | |
| |||
17739 | 17739 | | |
17740 | 17740 | | |
17741 | 17741 | | |
17742 | | - | |
| 17742 | + | |
17743 | 17743 | | |
17744 | 17744 | | |
17745 | | - | |
| 17745 | + | |
17746 | 17746 | | |
17747 | 17747 | | |
17748 | 17748 | | |
| |||
17849 | 17849 | | |
17850 | 17850 | | |
17851 | 17851 | | |
17852 | | - | |
| 17852 | + | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
19844 | 19844 | | |
19845 | 19845 | | |
19846 | 19846 | | |
19847 | | - | |
| 19847 | + | |
19848 | 19848 | | |
19849 | 19849 | | |
19850 | 19850 | | |
19851 | 19851 | | |
19852 | 19852 | | |
19853 | 19853 | | |
19854 | | - | |
| 19854 | + | |
19855 | 19855 | | |
19856 | 19856 | | |
19857 | 19857 | | |
| |||
19873 | 19873 | | |
19874 | 19874 | | |
19875 | 19875 | | |
19876 | | - | |
| 19876 | + | |
19877 | 19877 | | |
19878 | 19878 | | |
19879 | | - | |
| 19879 | + | |
19880 | 19880 | | |
19881 | 19881 | | |
19882 | 19882 | | |
| |||
19999 | 19999 | | |
20000 | 20000 | | |
20001 | 20001 | | |
20002 | | - | |
| 20002 | + | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
30329 | 30329 | | |
30330 | 30330 | | |
30331 | 30331 | | |
30332 | | - | |
| 30332 | + | |
30333 | 30333 | | |
30334 | 30334 | | |
30335 | 30335 | | |
30336 | | - | |
| 30336 | + | |
30337 | 30337 | | |
30338 | 30338 | | |
30339 | 30339 | | |
| |||
30370 | 30370 | | |
30371 | 30371 | | |
30372 | 30372 | | |
30373 | | - | |
| 30373 | + | |
30374 | 30374 | | |
30375 | 30375 | | |
30376 | | - | |
| 30376 | + | |
30377 | 30377 | | |
30378 | 30378 | | |
30379 | 30379 | | |
| |||
30839 | 30839 | | |
30840 | 30840 | | |
30841 | 30841 | | |
30842 | | - | |
| 30842 | + | |
30843 | 30843 | | |
30844 | 30844 | | |
30845 | 30845 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
17727 | 17727 | | |
17728 | 17728 | | |
17729 | 17729 | | |
17730 | | - | |
| 17730 | + | |
17731 | 17731 | | |
17732 | 17732 | | |
17733 | 17733 | | |
17734 | 17734 | | |
17735 | 17735 | | |
17736 | 17736 | | |
17737 | | - | |
| 17737 | + | |
17738 | 17738 | | |
17739 | 17739 | | |
17740 | 17740 | | |
| |||
17756 | 17756 | | |
17757 | 17757 | | |
17758 | 17758 | | |
17759 | | - | |
| 17759 | + | |
17760 | 17760 | | |
17761 | 17761 | | |
17762 | | - | |
| 17762 | + | |
17763 | 17763 | | |
17764 | 17764 | | |
17765 | 17765 | | |
| |||
18019 | 18019 | | |
18020 | 18020 | | |
18021 | 18021 | | |
18022 | | - | |
| 18022 | + | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
19865 | 19865 | | |
19866 | 19866 | | |
19867 | 19867 | | |
19868 | | - | |
| 19868 | + | |
19869 | 19869 | | |
19870 | 19870 | | |
19871 | 19871 | | |
19872 | 19872 | | |
19873 | 19873 | | |
19874 | 19874 | | |
19875 | | - | |
| 19875 | + | |
19876 | 19876 | | |
19877 | 19877 | | |
19878 | 19878 | | |
| |||
19894 | 19894 | | |
19895 | 19895 | | |
19896 | 19896 | | |
19897 | | - | |
| 19897 | + | |
19898 | 19898 | | |
19899 | 19899 | | |
19900 | | - | |
| 19900 | + | |
19901 | 19901 | | |
19902 | 19902 | | |
19903 | 19903 | | |
| |||
20173 | 20173 | | |
20174 | 20174 | | |
20175 | 20175 | | |
20176 | | - | |
| 20176 | + | |
20177 | 20177 | | |
20178 | 20178 | | |
20179 | 20179 | | |
| |||
0 commit comments