MCPcopy Index your code
hub / github.com/microsoft/SkillOpt / skill_hash

Function skill_hash

skillopt/utils/scoring.py:26–28  ·  view source on GitHub ↗

Return a short deterministic hash of skill content (for caching).

(content: str)

Source from the content-addressed store, hash-verified

24
25
26def skill_hash(content: str) -> str:
27 """Return a short deterministic hash of skill content (for caching)."""
28 return hashlib.sha256(content.encode()).hexdigest()[:16]

Callers 8

trainMethod · 0.90
test_deterministicMethod · 0.90
test_empty_stringMethod · 0.90
test_output_lengthMethod · 0.90
test_hex_charactersMethod · 0.90
test_unicode_contentMethod · 0.90

Calls

no outgoing calls

Tested by 7

test_deterministicMethod · 0.72
test_empty_stringMethod · 0.72
test_output_lengthMethod · 0.72
test_hex_charactersMethod · 0.72
test_unicode_contentMethod · 0.72