Skill: content-fingerprint
SkillFiles & storageUse when you need a short, deterministic, reproducible identifier derived from the content of a string or file — cache keys, pattern ids, doc fingerprints.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Skill: content-fingerprint skill
What this skill tells your AI
The instructions your AI receives, as published by gonzalezpazmonica/pm-workspace in .claude/skills/content-fingerprint/SKILL.md and read by ahel’s review.
Cuando usar
Cuando un script necesita derivar un identificador corto, reproducible y resistente a colisiones a partir de un contenido (cadena, fichero, agregado). Casos tipicos:
- Cache keys (
ado-bridge.sh) - Pattern signatures (
failure-pattern-memory.sh) - Doc fingerprints de auditoria (
semantic-map.sh) - Test attempt hashes (
test-auditor.sh)
Cuando NO usar
- Si necesitas hash criptografico para integridad fuerte: usa
sha256sumdirecto (ya disponible). - Si necesitas detectar near-duplicates con tolerancia a 1 byte: SHA truncado NO sirve. Considera SimHash/MinHash o embeddings (
memory-vector.py). - Si necesitas buscar por similitud semantica: usa
memory-vector.py(HNSW + MiniLM).
Como usar
# Identificador corto
ID=$(echo "agente:tarea:contexto" | scripts/content-fingerprint.sh 8)
# Output: 8 chars hex deterministicos
# Cache key 16 chars
KEY=$(printf '%s|%s' "$query" "$context" | scripts/content-fingerprint.sh 16)
# Fichero completo
FP=$(scripts/content-fingerprint.sh 16 < my-doc.md)
# Self-test
scripts/content-fingerprint.sh --self-test
Acceptance criteria validados (SE-151)
- AC-1: longitudes 8/16/32/64 producen hex de tamaño exacto.
- AC-1: avalanche — 1 byte de diferencia → fingerprint distinto.
- AC-1: determinismo — mismo input → mismo output.
- AC-4: dataset etiquetado de 30 fixtures (15 pares) verifica precision/recall.
- AC-5: 100 invocaciones <5s total (sanity check de latencia).
Tests: bats tests/scripts/content-fingerprint.bats (14/14 verde).
Limitaciones honestas
- No detecta near-duplicates: 1 char de cambio cambia el fingerprint entero (avalanche). Esto es una propiedad deseable para identificadores, una limitacion para clustering.
- No es LSH biologico: Dasgupta 2017 requiere vectorizacion previa + sparse expansion, no implementado aqui.
- Coliciones a 8 chars: para corpus muy grandes (>10^6 docs), considerar 16 chars o mas (paradoja del cumpleanos).
Referencias
- Spec:
docs/specs/SE-151-content-fingerprint-consolidation.spec.md - Tests:
tests/scripts/content-fingerprint.bats - Fixtures:
tests/fixtures/fingerprint/ - Sesion previa archivada:
experiments/brainless/RESEARCH-LOG.md
Signals
- GitHub stars
- 50
- Forks
- 12
- Last commit
- Sep 2026
Others that do the same job
Advanced
- Catalog kind
- skill
- Gateway key
content-fingerprint- Source
- github.com/gonzalezpazmonica/pm-workspace