MCPcopy Create free account
hub / github.com/codeaashu/claude-code / registerUpdateConfigSkill

Function registerUpdateConfigSkill

src/skills/bundled/updateConfig.ts:445–475  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

443`
444
445export function registerUpdateConfigSkill(): void {
446 registerBundledSkill({
447 name: 'update-config',
448 description:
449 'Use this skill to configure the Claude Code harness via settings.json. Automated behaviors ("from now on when X", "each time X", "whenever X", "before/after X") require hooks configured in settings.json - the harness executes these, not Claude, so memory/preferences cannot fulfill them. Also use for: permissions ("allow X", "add permission", "move permission to"), env vars ("set X=Y"), hook troubleshooting, or any changes to settings.json/settings.local.json files. Examples: "allow npm commands", "add bq permission to global settings", "move permission to user settings", "set DEBUG=true", "when claude stops show X". For simple settings like theme/model, use Config tool.',
450 allowedTools: ['Read'],
451 userInvocable: true,
452 async getPromptForCommand(args) {
453 if (args.startsWith('[hooks-only]')) {
454 const req = args.slice('[hooks-only]'.length).trim()
455 let prompt = HOOKS_DOCS + '\n\n' + HOOK_VERIFICATION_FLOW
456 if (req) {
457 prompt += `\n\n## Task\n\n${req}`
458 }
459 return [{ type: 'text', text: prompt }]
460 }
461
462 // Generate schema dynamically to stay in sync with types
463 const jsonSchema = generateSettingsSchema()
464
465 let prompt = UPDATE_CONFIG_PROMPT
466 prompt += `\n\n## Full Settings JSON Schema\n\n\`\`\`json\n${jsonSchema}\n\`\`\``
467
468 if (args) {
469 prompt += `\n\n## User Request\n\n${args}`
470 }
471
472 return [{ type: 'text', text: prompt }]
473 },
474 })
475}
476

Callers 1

initBundledSkillsFunction · 0.85

Calls 1

registerBundledSkillFunction · 0.85

Tested by

no test coverage detected