context-task-classifier
Usar antes de compactar contexto para clasificar la tarea del turno actual.
by gonzalezpazmonica★ 52 GitHub stars
Install context-task-classifier in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
context-task-classifier
Clasificador determinístico de turnos para rate-distortion-aware compression
(SE-029). Cada clase tiene un ratio máximo de compresión y una marca
frozen que indica si el contenido queda exento de compactación.
Input
Un turno de conversación (texto, markdown, diff, o stack trace) pasado
por --stdin o --input FILE.
Output
Una sola línea con la clase (modo texto) o JSON con detalles (modo --json):
{
"class": "decision",
"max_ratio": 5,
"frozen": "true",
"words": 4,
"lines": 1,
"scores": {
"decision": 3,
"spec": 0,
"code": 0,
"review": 0,
"context": 0,
"chitchat": 0
}
}
6 clases de tarea
| Clase | max_ratio | frozen | Señales principales |
|---|---|---|---|
decision |
5:1 | true | APPROVED/merge/commit, yes/no verdicts |
spec |
3:1 | true | SPEC-NNN, SE-NNN, PBI-NNN, AC-MM, frontmatter |
code |
10:1 | partial | fences ```, diff markers, Traceback/Error |
review |
15:1 | false | PASS/FAIL/WARN, G\d+ gates, judge findings |
context |
25:1 | false | markdown largo, headings, bullets, >100 words |
chitchat |
80:1 | false | ≤8 words, thanks/ok/gracias/hi |
Ejemplos de uso
# Clasifica un mensaje de chat
echo "APPROVED — merge PR #624" | scripts/context-task-classify.sh --stdin
# → decision
# Clasifica un diff file en JSON
scripts/context-task-classify.sh --input /tmp/pr.diff --json
# Integración con context-budget (SE-029 Slice 4, futuro):
# foreach turn in session:
# class = classify(turn)
# apply max_ratio[class] when compacting
# skip if frozen[class]
Reglas de clasificación
- Scoring aditivo — cada patrón matched suma puntos a su clase.
- Tie-breaking por prioridad — empates se resuelven a favor de la clase más estricta (decision > spec > code > review > context > chitchat). Err del lado de preservar contenido.
- Fallback — sin señal: ≤15 words → chitchat, else context.
Integración con SE-029
Este clasificador es el input del operational point selector (SE-029-O, Slice 4) que elige R(D) óptimo por turn:
Turn → classify() → max_ratio_class
→ frozen? → compress-skip-frozen.sh hook
→ else: compress(ratio = min(budget_target, max_ratio_class))
Ref
scripts/context-task-classify.sh— implementacióntests/test-context-task-classify.bats— 34 tests (auditor score 98)docs/propuestas/SE-029-rate-distortion-context.md§2scripts/context-distortion-measure.sh— SE-029 Slice 1 (distortion metric)
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- DOMAIN.md
FAQ
What does the context-task-classifier skill do?
Usar antes de compactar contexto para clasificar la tarea del turno actual.
How do I install the context-task-classifier skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the context-task-classifier skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…