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

Function shouldRun

src/utils/hooks/skillImprovement.ts:75–92  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

73 name: 'skill_improvement',
74
75 async shouldRun(context) {
76 if (context.querySource !== 'repl_main_thread') {
77 return false
78 }
79
80 if (!findProjectSkill()) {
81 return false
82 }
83
84 // Only run every TURN_BATCH_SIZE user messages
85 const userCount = count(context.messages, m => m.type === 'user')
86 if (userCount - lastAnalyzedCount < TURN_BATCH_SIZE) {
87 return false
88 }
89
90 lastAnalyzedCount = userCount
91 return true
92 },
93
94 buildMessages(context) {
95 const projectSkill = findProjectSkill()!

Callers

nothing calls this directly

Calls 2

findProjectSkillFunction · 0.85
countFunction · 0.85

Tested by

no test coverage detected