MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / skillContentHash

Function skillContentHash

src/skills/learning/eval-record.ts:42–45  ·  view source on GitHub ↗
(md: string)

Source from the content-addressed store, hash-verified

40/** Hash of the skill's CONTENT, excluding the auto-eval section — so writing an eval
41 * result doesn't change the hash, but editing the skill body does. */
42export function skillContentHash(md: string): string {
43 const withoutEval = stripEvalSection(md);
44 return createHash('sha1').update(withoutEval.trim()).digest('hex').slice(0, 12);
45}
46
47function stripEvalSection(md: string): string {
48 // Remove from "## Auto-evaluation" up to the next "## " heading or EOF.

Callers 4

skill-eval.test.tsFile · 0.85
buildSkillCommandFunction · 0.85
shouldSkipEvalFunction · 0.85
runSandboxedMethod · 0.85

Calls 2

stripEvalSectionFunction · 0.85
updateMethod · 0.80

Tested by

no test coverage detected