Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
/usr/bin/env bash << 'YAKE_EOF'
INPUT_FILE="${1:?}"echo"=== Auto-discovered Keywords (YAKE) ==="
uv run --with yake python3 -c "
import yake
kw = yake.KeywordExtractor(
lan='en',
n=2, # bi-grams
dedupLim=0.9, # dedup threshold
top=20 # top keywords
)
with open('$INPUT_FILE') as f:
text = f.read()
keywords = kw.extract_keywords(text)
for score, keyword in keywords:
print(f'{score:.4f} {keyword}')
"
YAKE_EOF
Phase 6: Density Analysis (if selected)
Purpose: Find sections with highest keyword concentration.
/usr/bin/env bash << 'DENSITY_EOF'
INPUT_FILE="${1:?}"
KEYWORD="${2:-sharpe}"
WINDOW_SIZE=100 # linesecho"=== Density Analysis: '$KEYWORD' ==="echo"Window size: $WINDOW_SIZE lines"echo""
TOTAL_LINES=$(wc -l < "$INPUT_FILE" | tr -d ' ')
TOTAL_MATCHES=$(rg -c -i "$KEYWORD""$INPUT_FILE" 2>/dev/null || echo"0")
echo"Total matches: $TOTAL_MATCHES in $TOTAL_LINES lines"echo"Overall density: $(echo "scale=4; $TOTAL_MATCHES / $TOTAL_LINES * 1000" | bc) per 1000 lines"echo""# Find peak windowsecho"Top 5 densest windows:"
awk -v ws="$WINDOW_SIZE" -v kw="$KEYWORD"'
BEGIN { IGNORECASE=1 }
{
lines[NR] = $0
if (tolower($0) ~ tolower(kw)) matches[NR] = 1
}
END {
for (start = 1; start <= NR - ws; start += ws/2) {
count = 0
for (i = start; i < start + ws && i <= NR; i++) {
if (matches[i]) count++
}
if (count > 0) {
printf "Lines %d-%d: %d matches (%.1f per 100)\n", start, start+ws-1, count, count*100/ws
}
}
}
'"$INPUT_FILE" | -t: -k2 -rn | -5
DENSITY_EOF
Phase 7: Report Format (MANDATORY)
Purpose: Let user choose output format.
Question: "How should results be presented?"
Header: "Output"
Options:
- Label: "Summary table (Recommended)"
Description: "Keyword counts + top 5 peak sections"
- Label: "Detailed report"
Description: "Full analysis with timestamps and surrounding context"
- Label: "JSON export"
Description: "Machine-readable output for further processing"
- Label: "Markdown report"
Description: "Save formatted report to file"
Phase 8: Follow-up Actions (MANDATORY)
Purpose: Guide user to next action.
Question: "Analysis complete. What's next?"
Header: "Next"
Options:
- Label: "Jump to peak section"
Description: "Read the highest-density section in the file"
- Label: "Search for specific keyword"
Description: "Grep for a custom term with context"
- Label: "Cross-reference with .cast"
Description: "Map findings back to original timestamps"
- Label: "Done"
Description: "Exit - no further action needed"
TodoWrite Task Template
1. [Preflight] Check input file exists and is .txt format
2. [Preflight] Suggest /convert if .cast file provided
3. [Discovery] Find .txt files with line counts
4. [Selection] AskUserQuestion: file to analyze
5. [Type] AskUserQuestion: analysis type (curated/auto/full/density)
6. [Domain] AskUserQuestion: keyword domains (multi-select)
7. [Curated] Run Grep searches for selected domains
8. [Auto] Run YAKE if auto-discovery selected
9. [Density] Calculate density windows if requested
10. [Format] AskUserQuestion: report format
11. [Next] AskUserQuestion: follow-up actions
Post-Change Checklist
After modifying this skill:
All bash blocks use heredoc wrapper
Curated keywords match references/domain-keywords.md