E1 · rotina.sh semana
20 minCopy rotina.sh, adjust the four variables and run the weekly part (with your own CSVs or the sample ones).
Done when: the rotina/ folder exists with today's date and, inside it, gsc/relatorio.json.
Lesson 7 · 18 min
Five separate tools turn into forgotten work. One script runs each week's tools and each month's tools and saves the output with a date. An agent on your subscription (Claude Code or Codex) reads the report and proposes three actions, with the number that justifies each. You decide, and you are the one who changes the site: that is the human gate.
Start the lesson
Goal: set up the weekly and monthly routine for the 5 tools, with an agent that only reads and proposes and a human gate before the site changes.
The machine measures and proposes; a human decides. Tap each step.
Nothing changes on the site without passing through the gate.
Tap each step.
Copy rotina.sh from the block below into a working folder and adjust the four variables: where inemaseo-sistemas lives, the Search Console property, the home page, and the folder with the CSVs.
Run bash rotina.sh semana and check the dated folder.
The weekly part can go in cron, right after gsc_semanal.py. The monthly one has two manual steps (the Bing export and copying the log): a calendar reminder works better than a cron job that fails silently.
Send the request and the relatorio.json to the agent, with no tools: it can't change anything.
The request tells it to use only the numbers in the report and reminds it that the content backlog is a heuristic.
claude -p and codex exec run through your subscription. Calling a model with an API key is a different thing, with per-use cost.
For each proposal: accept, postpone or decline, with a one-line reason. The question "for the human to decide" is yours; the agent doesn't have the business context.
In the next rounds, add decisoes.md to the request (one more cat before the report) so the agent doesn't repeat what you declined.
Templates to copy. Every command inside them comes from the tools' READMEs.
#!/bin/bash
# rotina.sh — semana | mes. Runs the inemaseo-sistemas tools and saves the dated output.
set -e
SIS=~/inemaseo-sistemas/ferramentas # where you cloned it
SITE=yoursite.com # Search Console property
URL=https://yoursite.com # site home page
CSV=~/path/to/gsc-folder # gsc_semanal.py folder
D=rotina/$(date +%F); mkdir -p $D dados
case "$1" in
semana)
python3 $SIS/gsc-historico/gsc_historico.py importar $CSV --db dados/gsc.sqlite
python3 $SIS/gsc-historico/gsc_historico.py relatorio --db dados/gsc.sqlite --site $SITE --saida $D/gsc
;;
mes)
python3 $SIS/auditor/auditor.py $URL --max 50 -q --saida $D/auditor
python3 $SIS/agente-ready/agente-ready.py $URL --saida $D/agente-ready
# bing-ia: only after exporting the CSV from the Bing panel (there is no API)
ls bing/*.csv >/dev/null 2>&1 && python3 $SIS/bing-ia/bing_ia.py importar bing/*.csv --db dados/bing.sqlite \
&& python3 $SIS/bing-ia/bing_ia.py relatorio --db dados/bing.sqlite --gsc-db dados/gsc.sqlite --site $SITE --saida $D/bing-ia
# botlog: only after copying the log (filter it before saving)
ls logs/* >/dev/null 2>&1 && python3 $SIS/botlog/botlog.py analisar logs/* --saida $D/botlog
;;
*) echo "usage: bash rotina.sh semana|mes"; exit 1 ;;
esac
echo "output in $D"You are the site's weekly SEO observer. Below is the relatorio.json from gsc-historico (this week's Search Console, non-branded queries only). Rules: - Read-only. Do not change any file, do not publish anything, do not run commands. - Use only the numbers in the report; do not invent data. - The "owner page" rule is a heuristic: check the column of the pages that appear today before proposing a new page. Answer in English, in at most 12 lines: 1. One sentence with the week's number (non-branded clicks and impressions, compared with the previous week). 2. Exactly 3 proposals, each with: action (write new page / improve existing page / rewrite title), URL or query, and the number from the report that justifies it. 3. One line "For the human to decide:" with the question only the site owner can answer.
bash rotina.sh semana (cat pedido-semana.md; echo; cat rotina/$(date +%F)/gsc/relatorio.json) | claude -p --tools "" > rotina/$(date +%F)/leitura-agente.md
# Decisions — week of <dd/mm/yyyy> | agent proposal | decision | reason | who | when | |---|---|---|---|---| | <improve /es/aprender-…/> | accept | <the page already shows up; strengthen the opening> | <name> | <dd/mm> | | <rewrite title of /cursos/…> | postpone | <only 5 impressions; wait 2 more weeks> | <name> | <dd/mm> | | <…> | decline | <…> | <name> | <dd/mm> |
bash rotina.sh semana with the sample CSVs from inema.club:
importado: 10 linha(s) de resumo, 244 linha(s) de consulta → dados/gsc.sqlite inema.club semana 2026-10-11 (comparada com 2026-10-04): sem marca 0 cliques / 157 impr.; subiram 15, caíram 15, pauta 18, páginas sem clique 5 → rotina/2026-10-19/gsc/relatorio.html output in rotina/2026-10-19
Real response from claude -p (Claude Code via subscription, no tools) to the request above, shortened:
1. Semana 05–11/10: 0 cliques e 157 impressões sem marca, contra 0 cliques
e 47 impressões em 28/09–04/10.
2. Propostas (todas já têm página respondendo, então nenhuma página nova):
- Melhorar /es/aprender-inteligencia-artificial/: 106 impressões,
22 consultas, posição média 39,1 e 0 cliques. A pauta indicava página
nova para algumas dessas consultas, mas é esta página que já aparece.
- Reescrever o título de /cursos/278-laya-jev-decisoes-estruturadas-na-pratica/:
posição média 7,4, 5 impressões e 0 cliques.
- Melhorar /agentes-de-inteligencia-artificial/ para "curso de agentes
de ia": 4 impressões, posição 34,8.
3. Para o humano decidir: vale investir no público em espanhol, que trouxe
quase todo o crescimento da semana, ou o foco continua no português?The agent also set aside, on its own, a query that looked like an internal test and did not use it. The decision about Spanish is up to the owner.
Start with the weekly part; the monthly part comes in when the Bing export and the log are at hand.
Copy rotina.sh, adjust the four variables and run the weekly part (with your own CSVs or the sample ones).
Done when: the rotina/ folder exists with today's date and, inside it, gsc/relatorio.json.
Send the request and the report to the agent with no tools and record your decision on each proposal.
Done when: leitura-agente.md has 3 proposals with a number, and decisoes.md has one line per proposal with accept, postpone or decline and the reason.
The explanation shows up after your answer.
Question 1 of 4
Why does the agent run with no tools (empty --tools)?skill
Question 2 of 4
Which part of the monthly routine can't be fully automated?
Question 3 of 4
The content backlog called for a new page, and the agent proposed improving an existing page. Who was right?
Question 4 of 4
What is decisoes.md for?
Pick an option. The explanation appears after you try.