[{"data":1,"prerenderedAt":1549,"buildId":1550},["ShallowReactive",2],{"docs:\u002Fguide\u002Fdefinitions":3},{"page":4,"section":16,"document":17,"credits":10,"prev":1542,"next":1546},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":8,"description":9,"tagline":9,"eyebrow":10,"credits":10,"keywords":11,"icon":12,"layout":13,"sidebar":14,"toc":14,"kind":10,"group":10,"navigation":14,"order":15},"definitions","\u002Fguide\u002Fdefinitions","guide\u002Fdefinitions.md","Definitions","Write MCP servers once and get each agent's own config entry, and check hook files against the format each agent reads.",null,[],"i-lucide-plug","article",true,5,"guide",{"nodes":18,"toc":1530},[19,33,134,142,149,307,348,364,371,378,408,419,435,450,456,465,747,754,821,841,847,861,870,882,888,902,954,960,971,1016,1025,1032,1119,1246,1249,1255,1258,1344,1366,1372,1386,1511,1524],[20,21,22,26,27,32],"p",{},[23,24,25],"code",{},"skillrc\u002Fdefinitions"," turns one MCP file into the entry each agent expects, and checks hook files before an agent sees them. It reads text and returns objects. It writes nothing: ",[28,29,31],"a",{"href":30},"\u002Fguide\u002Fsync","sync"," or your program does.",[34,35,38],"pre",{"language":36,"class":37,"wrap":14},"ts","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[23,39,41,64,65,64,67,64,104],{"class":40},"language-ts",[42,43,46,50,54,57,61],"span",{"class":44,"style":45},"line","display: inline",[42,47,49],{"style":48},"color:#CF222E;--shiki-dark:#FF7B72","import",[42,51,53],{"style":52},"color:#1F2328;--shiki-dark:#E6EDF3"," { mcpEntries, parseMcpFile } ",[42,55,56],{"style":48},"from",[42,58,60],{"style":59},"color:#0A3069;--shiki-dark:#A5D6FF"," \"skillrc\u002Fdefinitions\"",[42,62,63],{"style":52},";","\n",[42,66],{"class":44,"style":45},[42,68,69,72,75,79,82,85,88,91,95,98,101],{"class":44,"style":45},[42,70,71],{"style":48},"const",[42,73,74],{"style":52}," { ",[42,76,78],{"style":77},"color:#0550AE;--shiki-dark:#79C0FF","servers",[42,80,81],{"style":52},", ",[42,83,84],{"style":77},"problems",[42,86,87],{"style":52}," } ",[42,89,90],{"style":48},"=",[42,92,94],{"style":93},"color:#8250DF;--shiki-dark:#D2A8FF"," parseMcpFile",[42,96,97],{"style":52},"(places, text, ",[42,99,100],{"style":59},"\"mcp.json\"",[42,102,103],{"style":52},");",[42,105,106,108,110,113,115,118,120,122,125,128,131],{"class":44,"style":45},[42,107,71],{"style":48},[42,109,74],{"style":52},[42,111,112],{"style":77},"entries",[42,114,81],{"style":52},[42,116,117],{"style":77},"skipped",[42,119,87],{"style":52},[42,121,90],{"style":48},[42,123,124],{"style":93}," mcpEntries",[42,126,127],{"style":52},"(",[42,129,130],{"style":59},"\"codex\"",[42,132,133],{"style":52},", servers);",[135,136,141],"h2",{"id":137,"anchor":138},"mcp-servers",{"label":139,"icon":140},"Section titled \"MCP servers\"","#","MCP servers",[20,143,144,145,148],{},"An MCP file holds an ",[23,146,147],{},"mcpServers"," object, the shape most agents already use:",[34,150,153],{"language":151,"filename":152,"class":37,"wrap":14},"json","mcp.json",[23,154,156,64,161,64,170,64,177,64,191,64,210,64,239,64,244,64,251,64,263,64,275,64,292,64,297,64,302],{"class":155},"language-json",[42,157,158],{"class":44,"style":45},[42,159,160],{"style":52},"{",[42,162,163,167],{"class":44,"style":45},[42,164,166],{"style":165},"color:#116329;--shiki-dark:#7EE787","  \"mcpServers\"",[42,168,169],{"style":52},": {",[42,171,172,175],{"class":44,"style":45},[42,173,174],{"style":165},"    \"github\"",[42,176,169],{"style":52},[42,178,179,182,185,188],{"class":44,"style":45},[42,180,181],{"style":165},"      \"command\"",[42,183,184],{"style":52},": ",[42,186,187],{"style":59},"\"npx\"",[42,189,190],{"style":52},",",[42,192,193,196,199,202,204,207],{"class":44,"style":45},[42,194,195],{"style":165},"      \"args\"",[42,197,198],{"style":52},": [",[42,200,201],{"style":59},"\"-y\"",[42,203,81],{"style":52},[42,205,206],{"style":59},"\"@modelcontextprotocol\u002Fserver-github\"",[42,208,209],{"style":52},"],",[42,211,212,215,218,221,223,226,228,231,233,236],{"class":44,"style":45},[42,213,214],{"style":165},"      \"env\"",[42,216,217],{"style":52},": { ",[42,219,220],{"style":165},"\"GITHUB_TOKEN\"",[42,222,184],{"style":52},[42,224,225],{"style":59},"\"${GITHUB_TOKEN}\"",[42,227,81],{"style":52},[42,229,230],{"style":165},"\"LOG_LEVEL\"",[42,232,184],{"style":52},[42,234,235],{"style":59},"\"info\"",[42,237,238],{"style":52}," }",[42,240,241],{"class":44,"style":45},[42,242,243],{"style":52},"    },",[42,245,246,249],{"class":44,"style":45},[42,247,248],{"style":165},"    \"linear\"",[42,250,169],{"style":52},[42,252,253,256,258,261],{"class":44,"style":45},[42,254,255],{"style":165},"      \"type\"",[42,257,184],{"style":52},[42,259,260],{"style":59},"\"http\"",[42,262,190],{"style":52},[42,264,265,268,270,273],{"class":44,"style":45},[42,266,267],{"style":165},"      \"url\"",[42,269,184],{"style":52},[42,271,272],{"style":59},"\"https:\u002F\u002Fmcp.linear.app\u002Fmcp\"",[42,274,190],{"style":52},[42,276,277,280,282,285,287,290],{"class":44,"style":45},[42,278,279],{"style":165},"      \"headers\"",[42,281,217],{"style":52},[42,283,284],{"style":165},"\"Authorization\"",[42,286,184],{"style":52},[42,288,289],{"style":59},"\"Bearer ${LINEAR_TOKEN}\"",[42,291,238],{"style":52},[42,293,294],{"class":44,"style":45},[42,295,296],{"style":52},"    }",[42,298,299],{"class":44,"style":45},[42,300,301],{"style":52},"  }",[42,303,304],{"class":44,"style":45},[42,305,306],{"style":52},"}",[20,308,309,310,313,314,81,317,320,321,324,325,328,329,332,333,335,336,339,340,343,344,347],{},"A server with ",[23,311,312],{},"command"," is a local server: ",[23,315,316],{},"args",[23,318,319],{},"env"," and ",[23,322,323],{},"cwd"," are optional. A server with ",[23,326,327],{},"url"," is remote: ",[23,330,331],{},"type"," is ",[23,334,260],{},", the default, or ",[23,337,338],{},"\"sse\"",", and ",[23,341,342],{},"headers"," is optional. ",[23,345,346],{},"agents"," limits a server to some agents; without it, every agent gets it.",[20,349,350,353,354,356,357,359,360,363],{},[23,351,352],{},"parseMcpFile(places, text, file?)"," returns the servers that passed, by name in file order, and ",[23,355,84],{}," for the rest. A server with a mistake is left out and the others still sync. A file that isn't JSON, or has no ",[23,358,147],{}," object, throws ",[23,361,362],{},"McpFileError",".",[365,366,370],"h3",{"id":367,"anchor":368},"secrets",{"label":369,"icon":140},"Section titled \"Secrets\"","Secrets",[20,372,373,374,377],{},"A value that may hold a secret must be a ",[23,375,376],{},"${VAR}"," reference, set on each machine, never written in the file:",[379,380,381,405],"ul",{},[382,383,384,385,387,388,81,391,81,394,81,397,400,401,404],"li",{},"an ",[23,386,319],{}," key whose name contains ",[23,389,390],{},"TOKEN",[23,392,393],{},"KEY",[23,395,396],{},"SECRET",[23,398,399],{},"PASSWORD"," or ",[23,402,403],{},"AUTH",", in any case",[382,406,407],{},"every header",[34,409,411],{"language":410,"class":37,"wrap":14},"text",[23,412,414],{"class":413},"language-text",[42,415,416],{"class":44,"style":45},[42,417,418],{},"mcp.json: server \"linear\" header \"Authorization\" is a literal; headers may carry secrets, so write the value with a ${VAR} reference",[20,420,421,422,425,426,81,428,81,430,320,432,434],{},"The rule matches part of a name, so ",[23,423,424],{},"AUTHOR"," counts too. ",[23,427,312],{},[23,429,316],{},[23,431,327],{},[23,433,323],{}," are not checked: don't put a token there. Messages name the field, never its value.",[20,436,437,438,441,442,445,446,449],{},"A reference is ",[23,439,440],{},"${NAME}"," with no default. ",[23,443,444],{},"$HOME"," without braces is plain text. ",[23,447,448],{},"${HOME:-\u002Froot}"," is refused.",[365,451,455],{"id":452,"anchor":453},"each-agents-entry",{"label":454,"icon":140},"Section titled \"Each agent's entry\"","Each agent's entry",[20,457,458,461,462,464],{},[23,459,460],{},"mcpEntries(agent, servers)"," returns the entries one agent gets, in its own shape, and writes each ",[23,463,376],{}," the way that agent reads it:",[466,467,468,490],"table",{},[469,470,471],"thead",{},[472,473,474,478,481,484,487],"tr",{},[475,476,477],"th",{},"Agent",[475,479,480],{},"Config",[475,482,483],{},"Local server",[475,485,486],{},"Remote server",[475,488,489],{},"Reference",[491,492,493,529,567,600,636,672,707],"tbody",{},[472,494,495,501,506,517,525],{},[496,497,498],"td",{},[23,499,500],{},"claude-code",[496,502,503],{},[23,504,505],{},"~\u002F.claude.json",[496,507,508,81,511,81,513,81,515],{},[23,509,510],{},"type: \"stdio\"",[23,512,312],{},[23,514,316],{},[23,516,319],{},[496,518,519,81,521,81,523],{},[23,520,331],{},[23,522,327],{},[23,524,342],{},[496,526,527],{},[23,528,440],{},[472,530,531,536,541,554,564],{},[496,532,533],{},[23,534,535],{},"codex",[496,537,538],{},[23,539,540],{},"~\u002F.codex\u002Fconfig.toml",[496,542,543,81,545,81,547,81,549,81,552],{},[23,544,312],{},[23,546,316],{},[23,548,319],{},[23,550,551],{},"env_vars",[23,553,323],{},[496,555,556,81,558,81,561],{},[23,557,327],{},[23,559,560],{},"bearer_token_env_var",[23,562,563],{},"env_http_headers",[496,565,566],{},"none",[472,568,569,574,579,589,595],{},[496,570,571],{},[23,572,573],{},"cursor",[496,575,576],{},[23,577,578],{},"~\u002F.cursor\u002Fmcp.json",[496,580,581,81,583,81,585,81,587],{},[23,582,510],{},[23,584,312],{},[23,586,316],{},[23,588,319],{},[496,590,591,81,593],{},[23,592,327],{},[23,594,342],{},[496,596,597],{},[23,598,599],{},"${env:NAME}",[472,601,602,607,612,622,631],{},[496,603,604],{},[23,605,606],{},"gemini-cli",[496,608,609],{},[23,610,611],{},"~\u002F.gemini\u002Fsettings.json",[496,613,614,81,616,81,618,81,620],{},[23,615,312],{},[23,617,316],{},[23,619,319],{},[23,621,323],{},[496,623,624,400,627,81,629],{},[23,625,626],{},"httpUrl",[23,628,327],{},[23,630,342],{},[496,632,633],{},[23,634,635],{},"$NAME",[472,637,638,643,648,657,668],{},[496,639,640],{},[23,641,642],{},"github-copilot",[496,644,645],{},[23,646,647],{},"~\u002F.copilot\u002Fmcp-config.json",[496,649,650,653,654],{},[23,651,652],{},"type: \"local\"",", …, ",[23,655,656],{},"tools: [\"*\"]",[496,658,659,81,661,81,663,81,665],{},[23,660,331],{},[23,662,327],{},[23,664,342],{},[23,666,667],{},"tools",[496,669,670],{},[23,671,440],{},[472,673,674,679,684,694,703],{},[496,675,676],{},[23,677,678],{},"grok",[496,680,681],{},[23,682,683],{},"~\u002F.grok\u002Fconfig.toml",[496,685,686,81,688,81,690,81,692],{},[23,687,312],{},[23,689,316],{},[23,691,319],{},[23,693,323],{},[496,695,696,81,698,81,701],{},[23,697,327],{},[23,699,700],{},"type: \"sse\"",[23,702,342],{},[496,704,705],{},[23,706,440],{},[472,708,709,714,723,733,742],{},[496,710,711],{},[23,712,713],{},"opencode",[496,715,716,719,720],{},[23,717,718],{},"opencode.json"," under ",[23,721,722],{},"mcp",[496,724,725,81,727,81,730],{},[23,726,652],{},[23,728,729],{},"command: [command, ...args]",[23,731,732],{},"environment",[496,734,735,81,738,81,740],{},[23,736,737],{},"type: \"remote\"",[23,739,327],{},[23,741,342],{},[496,743,744],{},[23,745,746],{},"{env:NAME}",[20,748,749,750,753],{},"The ",[23,751,752],{},"github"," server above becomes, for Codex:",[34,755,756],{"language":36,"class":37,"wrap":14},[23,757,758,64,762,64,774,64,789,64,806,64,817],{"class":40},[42,759,760],{"class":44,"style":45},[42,761,160],{"style":52},[42,763,764,768,770,772],{"class":44,"style":45},[42,765,767],{"style":766},"color:#953800;--shiki-dark:#FFA657","  command",[42,769,184],{"style":52},[42,771,187],{"style":59},[42,773,190],{"style":52},[42,775,776,779,781,783,785,787],{"class":44,"style":45},[42,777,778],{"style":766},"  args",[42,780,198],{"style":52},[42,782,201],{"style":59},[42,784,81],{"style":52},[42,786,206],{"style":59},[42,788,209],{"style":52},[42,790,791,794,796,799,801,803],{"class":44,"style":45},[42,792,793],{"style":766},"  env",[42,795,217],{"style":52},[42,797,798],{"style":766},"LOG_LEVEL",[42,800,184],{"style":52},[42,802,235],{"style":59},[42,804,805],{"style":52}," },",[42,807,808,811,813,815],{"class":44,"style":45},[42,809,810],{"style":766},"  env_vars",[42,812,198],{"style":52},[42,814,220],{"style":59},[42,816,209],{"style":52},[42,818,819],{"class":44,"style":45},[42,820,306],{"style":52},[20,822,823,824,827,828,339,830,827,833,835,836,838,839,363],{},"Codex expands no variables. It passes one on only under its own name, so ",[23,825,826],{},"GITHUB_TOKEN: \"${GITHUB_TOKEN}\""," becomes ",[23,829,551],{},[23,831,832],{},"Authorization: \"Bearer ${LINEAR_TOKEN}\"",[23,834,560],{},". Grok expands ",[23,837,376],{}," in every value but ",[23,840,323],{},[20,842,843,844,846],{},"A server an agent can't take as written is skipped for that agent only, with the reason in ",[23,845,117],{},":",[379,848,849,855,858],{},[382,850,851,852,854],{},"Claude Code and Cursor have no ",[23,853,323],{}," setting.",[382,856,857],{},"Codex and OpenCode don't support SSE.",[382,859,860],{},"Codex refuses a variable inside a URL or argument, mixed with text in a header, or passed under another name.",[34,862,863],{"language":410,"class":37,"wrap":14},[23,864,865],{"class":413},[42,866,867],{"class":44,"style":45},[42,868,869],{},"codex: server \"api\" has a variable in its url, and Codex reads variables only as whole values; skipped",[20,871,872,875,876,363],{},[23,873,874],{},"mcpEntries"," returns plain objects. For Codex and Grok, write them as TOML tables with ",[28,877,879],{"href":878},"\u002Fguide\u002Fconfig-files#toml",[23,880,881],{},"setTomlTable",[365,883,887],{"id":884,"anchor":885},"templates",{"label":886,"icon":140},"Section titled \"Templates\"","Templates",[20,889,890,893,894,897,898,901],{},[23,891,892],{},"parseTemplate(text, where?)"," splits a string into text and references. ",[23,895,896],{},"templateText"," writes one back, and ",[23,899,900],{},"wholeReference"," returns the variable when a template is one reference and nothing else.",[34,903,904],{"language":36,"class":37,"wrap":14},[23,905,906,64,919,64,921,64,938],{"class":40},[42,907,908,910,913,915,917],{"class":44,"style":45},[42,909,49],{"style":48},[42,911,912],{"style":52}," { parseTemplate, templateText } ",[42,914,56],{"style":48},[42,916,60],{"style":59},[42,918,63],{"style":52},[42,920],{"class":44,"style":45},[42,922,923,926,928,931,934],{"class":44,"style":45},[42,924,925],{"style":93},"parseTemplate",[42,927,127],{"style":52},[42,929,930],{"style":59},"\"Bearer ${A}\u002F${B_2}x\"",[42,932,933],{"style":52},"); ",[42,935,937],{"style":936},"color:#6E7781;--shiki-dark:#8B949E","\u002F\u002F [\"Bearer \", { env: \"A\" }, \"\u002F\", { env: \"B_2\" }, \"x\"]",[42,939,940,942,945,948,951],{"class":44,"style":45},[42,941,896],{"style":93},[42,943,944],{"style":52},"([{ env: ",[42,946,947],{"style":59},"\"TOKEN\"",[42,949,950],{"style":52}," }]); ",[42,952,953],{"style":936},"\u002F\u002F \"${TOKEN}\"",[135,955,959],{"id":956,"anchor":957},"hooks",{"label":958,"icon":140},"Section titled \"Hooks\"","Hooks",[20,961,962,963,966,967,970],{},"Hooks are not translated. Each agent fires its own events with its own fields, so a hook file is written in one agent's format and goes to that agent only. ",[23,964,965],{},"parseHookFile(agent, text, file?)"," checks it the way the agent would, and throws ",[23,968,969],{},"HookFileError"," naming the first mistake:",[34,972,973],{"language":36,"class":37,"wrap":14},[23,974,975,64,988,64,990],{"class":40},[42,976,977,979,982,984,986],{"class":44,"style":45},[42,978,49],{"style":48},[42,980,981],{"style":52}," { parseHookFile } ",[42,983,56],{"style":48},[42,985,60],{"style":59},[42,987,63],{"style":52},[42,989],{"class":44,"style":45},[42,991,992,994,997,1000,1003,1005,1008,1011,1014],{"class":44,"style":45},[42,993,71],{"style":48},[42,995,996],{"style":77}," events",[42,998,999],{"style":48}," =",[42,1001,1002],{"style":93}," parseHookFile",[42,1004,127],{"style":52},[42,1006,1007],{"style":59},"\"claude-code\"",[42,1009,1010],{"style":52},", text, ",[42,1012,1013],{"style":59},"\"hooks.json\"",[42,1015,103],{"style":52},[34,1017,1018],{"language":410,"class":37,"wrap":14},[23,1019,1020],{"class":413},[42,1021,1022],{"class":44,"style":45},[42,1023,1024],{},"hooks.json has event \"PreTooluse\", which claude-code doesn't fire",[20,1026,1027,1028,1031],{},"Five agents take hooks, listed in ",[23,1029,1030],{},"HOOK_DEF_AGENTS",". All but Cursor use matcher groups:",[34,1033,1035],{"language":151,"filename":1034,"class":37,"wrap":14},"hooks.json",[23,1036,1037,64,1041,64,1048,64,1055,64,1106,64,1111,64,1115],{"class":155},[42,1038,1039],{"class":44,"style":45},[42,1040,160],{"style":52},[42,1042,1043,1046],{"class":44,"style":45},[42,1044,1045],{"style":165},"  \"hooks\"",[42,1047,169],{"style":52},[42,1049,1050,1053],{"class":44,"style":45},[42,1051,1052],{"style":165},"    \"PostToolUse\"",[42,1054,198],{"style":52},[42,1056,1057,1060,1063,1065,1068,1070,1073,1076,1079,1081,1084,1086,1088,1090,1093,1095,1098,1100,1103],{"class":44,"style":45},[42,1058,1059],{"style":52},"      { ",[42,1061,1062],{"style":165},"\"matcher\"",[42,1064,184],{"style":52},[42,1066,1067],{"style":59},"\"Edit|Write\"",[42,1069,81],{"style":52},[42,1071,1072],{"style":165},"\"hooks\"",[42,1074,1075],{"style":52},": [{ ",[42,1077,1078],{"style":165},"\"type\"",[42,1080,184],{"style":52},[42,1082,1083],{"style":59},"\"command\"",[42,1085,81],{"style":52},[42,1087,1083],{"style":165},[42,1089,184],{"style":52},[42,1091,1092],{"style":59},"\"fmt\"",[42,1094,81],{"style":52},[42,1096,1097],{"style":165},"\"timeout\"",[42,1099,184],{"style":52},[42,1101,1102],{"style":77},"30",[42,1104,1105],{"style":52}," }] }",[42,1107,1108],{"class":44,"style":45},[42,1109,1110],{"style":52},"    ]",[42,1112,1113],{"class":44,"style":45},[42,1114,301],{"style":52},[42,1116,1117],{"class":44,"style":45},[42,1118,306],{"style":52},[466,1120,1121,1138],{},[469,1122,1123],{},[472,1124,1125,1127,1130,1135],{},[475,1126,477],{},[475,1128,1129],{},"Handler types",[475,1131,1132],{},[23,1133,1134],{},"timeout",[475,1136,1137],{},"Notes",[491,1139,1140,1167,1184,1205,1224],{},[472,1141,1142,1146,1162,1165],{},[496,1143,1144],{},[23,1145,500],{},[496,1147,1148,81,1150,81,1153,81,1156,81,1159],{},[23,1149,312],{},[23,1151,1152],{},"http",[23,1154,1155],{},"mcp_tool",[23,1157,1158],{},"prompt",[23,1160,1161],{},"agent",[496,1163,1164],{},"seconds",[496,1166],{},[472,1168,1169,1173,1179,1182],{},[496,1170,1171],{},[23,1172,535],{},[496,1174,1175,81,1177],{},[23,1176,312],{},[23,1178,1155],{},[496,1180,1181],{},"whole seconds",[496,1183],{},[472,1185,1186,1190,1196,1199],{},[496,1187,1188],{},[23,1189,678],{},[496,1191,1192,81,1194],{},[23,1193,312],{},[23,1195,1152],{},[496,1197,1198],{},"seconds, 0 allowed",[496,1200,1201,1204],{},[23,1202,1203],{},"matcher"," may be a list",[472,1206,1207,1211,1215,1218],{},[496,1208,1209],{},[23,1210,606],{},[496,1212,1213],{},[23,1214,312],{},[496,1216,1217],{},"milliseconds",[496,1219,1220,1221],{},"groups take ",[23,1222,1223],{},"sequential",[472,1225,1226,1230,1236,1238],{},[496,1227,1228],{},[23,1229,573],{},[496,1231,1232,81,1234],{},[23,1233,312],{},[23,1235,1158],{},[496,1237,1164],{},[496,1239,1240,1241,1243,1244],{},"no groups: each event lists scripts, ",[23,1242,331],{}," defaults to ",[23,1245,312],{},[20,1247,1248],{},"A field the handler type doesn't take is refused, as is an event the agent doesn't fire. A typo fails here, where the agent would skip it without a word.",[365,1250,1254],{"id":1251,"anchor":1252},"where-each-agents-hooks-go",{"label":1253,"icon":140},"Section titled \"Where each agent's hooks go\"","Where each agent's hooks go",[20,1256,1257],{},"A sync writes each agent's hooks its own way, and marks what it wrote so it never touches a hook the user added:",[466,1259,1260,1269],{},[469,1261,1262],{},[472,1263,1264,1266],{},[475,1265,477],{},[475,1267,1268],{},"Written to",[491,1270,1271,1291,1306,1318,1332],{},[472,1272,1273,1277],{},[496,1274,1275],{},[23,1276,500],{},[496,1278,1279,1280,1283,1284,320,1287,1290],{},"A plugin folder, ",[23,1281,1282],{},"~\u002F.claude\u002Fskills\u002F\u003Cprogram>\u002F",", with ",[23,1285,1286],{},".claude-plugin\u002Fplugin.json",[23,1288,1289],{},"hooks\u002Fhooks.json"," holding every definition",[472,1292,1293,1297],{},[496,1294,1295],{},[23,1296,535],{},[496,1298,1299,1302,1303],{},[23,1300,1301],{},"~\u002F.codex\u002Fhooks.json",", each group marked with ",[23,1304,1305],{},"x-hook-owner:\u003Cprogram>",[472,1307,1308,1312],{},[496,1309,1310],{},[23,1311,678],{},[496,1313,1314,1315],{},"One file per definition, ",[23,1316,1317],{},"~\u002F.grok\u002Fhooks\u002F\u003Cprogram>-\u003Cname>.json",[472,1319,1320,1324],{},[496,1321,1322],{},[23,1323,606],{},[496,1325,1326,1327,1329,1330],{},"Marked groups under ",[23,1328,956],{}," in ",[23,1331,611],{},[472,1333,1334,1338],{},[496,1335,1336],{},[23,1337,573],{},[496,1339,1340,1341],{},"Marked scripts in ",[23,1342,1343],{},"~\u002F.cursor\u002Fhooks.json",[20,1345,1346,81,1349,320,1352,1355,1356,1358,1359,1362,1363,363],{},[23,1347,1348],{},"claudePluginFiles",[23,1350,1351],{},"codexHooksWith",[23,1353,1354],{},"grokHookFiles"," build those files, if your program writes hooks without the sync engine. Codex keys each hook's approval by its position in the file, so ",[23,1357,1351],{}," never moves a group that isn't yours. A group no longer wanted becomes an empty placeholder until a new one takes its slot. It returns the groups written new or changed under ",[23,1360,1361],{},"review",": Codex skips them until the user approves them in ",[23,1364,1365],{},"\u002Fhooks",[135,1367,1371],{"id":1368,"anchor":1369},"in-a-sync",{"label":1370,"icon":140},"Section titled \"In a sync\"","In a sync",[20,1373,1374,1375,1378,1379,1381,1382,1385],{},"A source gives definitions through its ",[23,1376,1377],{},"files",". An ",[23,1380,722],{}," file goes to every agent, under the id ",[23,1383,1384],{},"*",". A hook file names its agent:",[34,1387,1388],{"language":36,"class":37,"wrap":14},[23,1389,1390,64,1407,64,1417,64,1427,64,1437,64,1447,64,1457,64,1462,64,1467,64,1481,64,1501,64,1506],{"class":40},[42,1391,1392,1394,1397,1399,1402,1404],{"class":44,"style":45},[42,1393,71],{"style":48},[42,1395,1396],{"style":77}," defs",[42,1398,846],{"style":48},[42,1400,1401],{"style":766}," LocalSource",[42,1403,999],{"style":48},[42,1405,1406],{"style":52}," {",[42,1408,1409,1412,1415],{"class":44,"style":45},[42,1410,1411],{"style":52},"  kind: ",[42,1413,1414],{"style":59},"\"local\"",[42,1416,190],{"style":52},[42,1418,1419,1422,1425],{"class":44,"style":45},[42,1420,1421],{"style":52},"  id: ",[42,1423,1424],{"style":59},"\"defs\"",[42,1426,190],{"style":52},[42,1428,1429,1432,1435],{"class":44,"style":45},[42,1430,1431],{"style":52},"  local: ",[42,1433,1434],{"style":59},"\"\u002Fhome\u002Fme\u002Fagent-config\"",[42,1436,190],{"style":52},[42,1438,1439,1442,1445],{"class":44,"style":45},[42,1440,1441],{"style":52},"  adopt: ",[42,1443,1444],{"style":77},"false",[42,1446,190],{"style":52},[42,1448,1449,1452,1455],{"class":44,"style":45},[42,1450,1451],{"style":52},"  update: ",[42,1453,1454],{"style":59},"\"auto\"",[42,1456,190],{"style":52},[42,1458,1459],{"class":44,"style":45},[42,1460,1461],{"style":52},"  origin: file,",[42,1463,1464],{"class":44,"style":45},[42,1465,1466],{"style":52},"  files: {",[42,1468,1469,1472,1475,1477,1479],{"class":44,"style":45},[42,1470,1471],{"style":52},"    mcp: { ",[42,1473,1474],{"style":59},"\"*\"",[42,1476,184],{"style":52},[42,1478,100],{"style":59},[42,1480,805],{"style":52},[42,1482,1483,1486,1488,1490,1493,1496,1499],{"class":44,"style":45},[42,1484,1485],{"style":52},"    agentHooks: { ",[42,1487,1007],{"style":59},[42,1489,184],{"style":52},[42,1491,1492],{"style":59},"\"claude-hooks.json\"",[42,1494,1495],{"style":52},", codex: ",[42,1497,1498],{"style":59},"\"codex-hooks.json\"",[42,1500,805],{"style":52},[42,1502,1503],{"class":44,"style":45},[42,1504,1505],{"style":52},"  },",[42,1507,1508],{"class":44,"style":45},[42,1509,1510],{"style":52},"};",[20,1512,1513,1514,1517,1518,400,1520,1523],{},"Only the root plan's sources may give them, since both run commands. An agent gets them only when the host's ",[23,1515,1516],{},"kinds"," has an ",[23,1519,722],{},[23,1521,1522],{},"agentHooks"," cell for it.",[20,1525,1526,1527,1529],{},"The sync records a hash of each entry it writes. An entry someone edited by hand is held: neither overwritten nor removed, and listed under ",[23,1528,112],{}," in the report. Delete it and the next sync writes the file's value again.",[1531,1538,1541],{"id":137,"depth":1532,"text":141,"children":1533},2,[1534,1536,1537],{"id":367,"depth":1535,"text":370},3,{"id":452,"depth":1535,"text":455},{"id":884,"depth":1535,"text":887},{"id":956,"depth":1532,"text":959,"children":1539},[1540],{"id":1251,"depth":1535,"text":1254},{"id":1368,"depth":1532,"text":1371},{"path":1543,"title":1544,"description":1545},"\u002Fguide\u002Ffetching","Fetching","Fetch git repositories through a cache that works offline, download npm packages with checked integrity and size limits, and hold the sync lock.",{"path":30,"title":1547,"description":1548},"Sync","Run the sync engine with a plan and a SyncHost, preview it with a dry run, and read the report and the state it keeps.",1796390516394,"74c0e290-bf28-4a8a-b311-db0be1c3af18"]