Integrazioni
SmartSpec è una CLI: tutto quello che può fare uno script bash, può farlo SmartSpec. Questi sono i workflow che usiamo internamente.
Claude Code
SmartSpec si installa con una skill ufficiale audit-website
quando installi il package via npm. Dopo:
npm install -g smartspec
# Apri Claude Code in qualsiasi progetto
/audit-website https://example.com
Claude lancia smartspec audit ... -f llm internamente,
parsea i finding, e ti propone i fix prioritizzati. Funziona anche su siti che hai aperti localmente in dev.
Cursor, Windsurf, Zed
Negli editor con AI integrata, lancia da terminale e copia il file LLM-formatted nella chat:
smartspec audit https://mio-sito.dev -f llm -o /tmp/audit.txt
# poi in Cursor:
# @file /tmp/audit.txt
# > Sistema i critical findings in questo audit L'AI ha già il contesto strutturato + le istruzioni di task → meno round-trip, fix più pertinenti.
jq recipes
Una manciata di estrazioni jq utili per script bash.
Solo lo score:
smartspec audit $URL -f json -q | jq '.score' Solo finding critical:
smartspec audit $URL -f json -q | jq '.findings[] | select(.severity == "critical")' Conta finding per categoria:
smartspec audit $URL -f json -q | jq '[.findings[] | .category] | group_by(.) | map({cat: .[0], count: length})' Fail in CI se ci sono critical:
smartspec audit $URL -f json -q | jq -e '[.findings[] | select(.severity == "critical")] | length == 0' Cron / scheduled monitoring
Audit settimanale automatico salvato su S3 + alert Slack se lo score scende.
# /etc/cron.weekly/seo-audit
#!/usr/bin/env bash
set -e
DATE=$(date +%Y-%m-%d)
URL="https://mio-sito.com"
smartspec audit $URL -f html -o /tmp/audit-$DATE.html
smartspec audit $URL -f json -o /tmp/audit-$DATE.json
aws s3 cp /tmp/audit-$DATE.html s3://my-audits/
SCORE=$(jq '.score' /tmp/audit-$DATE.json)
PREV=$(jq '.score' /tmp/audit-previous.json 2>/dev/null || echo "$SCORE")
if [ "$SCORE" -lt "$PREV" ]; then
curl -X POST $SLACK_WEBHOOK -d "{
\"text\": \"SEO score dropped: $PREV → $SCORE on $URL\"
}"
fi
mv /tmp/audit-$DATE.json /tmp/audit-previous.json