.claude/skills/research-unattended/SKILL.md
Start and babysit autonomous genealogy research sessions running in separate background processes. The runner script launches sequential `claude -p` sessions that each do 2-3 research cycles with fresh context, persisting state in GEDCOM + FINDINGS.md between sessions. This skill manages the full lifecycle: starting the runner, monitoring it, restarting on crashes, graceful stopping, and consolidating results. Use when: "start research", "run research for a while", "autonomous research", "babysit research", "unattended research", "/research-unattended", or any request to run research unattended. Also use when the user says "keep researching" or "do research until I stop you".
npx skillsauth add rdeknijf/ai-genealogy-kit research-unattendedInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run autonomous genealogy research sessions with a babysitter pattern: a background script does the research, and you (the Claude session) monitor it, restart on crashes, and consolidate when done.
Unlike /research (which runs cycles in the current session), this skill
launches separate background processes that survive context limits
and can run for hours unattended.
[You: babysitter session] ---monitors---> [research-runner.sh] ---spawns---> [claude -p sessions]
| |
| v
| GEDCOM + FINDINGS.md
v
runner.log
scripts/research-runner.sh loops, launching fresh claude -p sessionsprivate/tree.ged and private/research/FINDINGS.mdBefore starting, commit the current state of the private repo as a safety snapshot so the user can roll back if needed.
Then launch the runner in the background. The env -u flags are critical —
without them, claude -p refuses to start because it detects nesting.
nohup env -u CLAUDE_CODE_SESSION -u CLAUDE_CODE_CONVERSATION_ID \
./scripts/research-runner.sh \
--sessions 20 \
> private/research/logs/runner.log 2>&1 &
echo "PID: $!"
If the user has a usage tracking cache (e.g. ccstatusline), add budget ceilings:
nohup env -u CLAUDE_CODE_SESSION -u CLAUDE_CODE_CONVERSATION_ID \
./scripts/research-runner.sh \
--usage-cache ~/.cache/ccstatusline/usage.json \
--session-ceiling 80 --weekly-ceiling 90 \
> private/research/logs/runner.log 2>&1 &
echo "PID: $!"
Also inhibit system sleep if not handled by the script:
systemd-inhibit --what=sleep:idle --who="research-runner" \
--why="genealogy research" --mode=block sleep infinity &
Verify it started after a few seconds:
sleep 3 && tail -5 private/research/logs/runner.log
Arguments the user might specify:
--sessions 5 (default, the primary safety limit)--session-timeout 90m (default, kills hung sessions)--max-turns 50 (default)--usage-cache <path> (optional, enables budget ceilings)--session-ceiling 80 (requires --usage-cache)--weekly-ceiling 90 (requires --usage-cache)Create a recurring cron (every 15 minutes) that checks on the runner.
Replace PID with the actual PID from Phase 1.
The cron prompt should run these checks:
ps -p PID — is it still running?tail -8 .../runner.log — latest statusgit diff --stat — are files being modified?If the process died unexpectedly (no "Budget ceiling reached" message), restart it with the same command from Phase 1.
If it finished normally (budget ceiling or all sessions done), proceed to Phase 4 (consolidation).
Example cron prompt:
Check on the research runner (PID XXXX).
1. ps -p XXXX — still running?
2. tail -8 private/research/logs/runner.log
3. cat ~/.cache/ccstatusline/usage.json | jq '{sessionUsage, weeklyUsage}'
4. git diff --stat (in private repo)
If crashed, restart. If finished normally, consolidate and /ping.
When the user wants to stop after the current session finishes:
# Find the child claude -p process
CLAUDE_PID=$(pgrep -P RUNNER_PID -f claude | head -1)
# Background watcher: wait for session to finish, then kill runner
( while kill -0 $CLAUDE_PID 2>/dev/null; do sleep 5; done
sleep 2
kill RUNNER_PID 2>/dev/null
) &
This lets the current research session complete its work (including writing to GEDCOM and FINDINGS.md) before stopping the loop.
To stop immediately (not recommended — may leave partial edits):
kill RUNNER_PID
After the runner stops:
Check final stats:
python3 scripts/analyze_gedcom.py private/tree.ged | head -10
Generate fan chart:
python3 scripts/fan_chart.py 7
Prep commit (show to user, don't commit without approval):
feat(research): autonomous research — N sessions, +X people, +Y families
Notify the user via /ping if they asked for it.
claude -p detects it's inside another Claude session via environment
variables and refuses to run. The env -u CLAUDE_CODE_SESSION -u CLAUDE_CODE_CONVERSATION_ID wrapper is mandatory.
The ~/.cache/ccstatusline/usage.json file is updated by an external
process (ccstatusline) roughly every 3 minutes. It can go stale for
extended periods. If the cache stops updating, the budget check is
effectively disabled and the runner will keep going until something else
stops it.
The script uses set -euo pipefail. Any grep | wc -l pipeline where
grep finds 0 matches will exit with code 1, killing the script. The fix
is { grep ... || true; } | wc -l. This was a bug that was fixed in the
script, but be aware if modifying the script.
The claude -p sessions may commit their own changes to the private repo.
This is fine — it means work is saved incrementally. Check git log to
see what they committed.
claude -p --output-format text buffers all output until the session
completes. Session log files will be 0 bytes while a session is running.
This is normal — check the runner log and git diff instead.
tools
Search Dutch civil registry records (births, marriages, deaths) on WieWasWie.nl via direct JSON API calls, with Open Archives API as a secondary source and Playwright browser automation as fallback. Use this skill whenever you need to look up or verify a person in Dutch civil records, check a birth/marriage/death date against official archives, or find parents/spouses from indexed Burgerlijke Stand records. Triggers on: "look up on wiewaswie", "check the birth record", "find the marriage certificate", "verify this date in the civil registry", "/wiewaswie", or any request to search Dutch genealogical records for a specific person. Also use when comparing GEDCOM data against official sources or when a Tier B verification is needed.
development
Search the VOC Opvarenden database for Dutch East India Company crew records (1699-1794). Uses the Nationaal Archief HUB3 API — 853,785 indexed entries with rich detail: name, origin, rank, ship, fate (died/returned/deserted), service dates, VOC chamber, and links to original scans. Use this skill when: "search VOC records", "VOC crew", "VOC opvarenden", "sailed to Batavia", "Dutch East India Company", "VOC soldier", "VOC sailor", "/voc-opvarenden", or when looking for ancestors who may have sailed with the VOC. Also use when checking Daniel Pieterse Knijf (1704, Woerden) or any Knijf/Knijff VOC connections. No login required.
tools
Generate a scan verification page for the user to review AI-extracted genealogy findings against actual document scans. The user clicks through records, confirms or rejects each one, and confirmed records become Tier A evidence in FINDINGS.md. Use this skill when: "verify scans", "show me what needs verifying", "review pending scans", "scan verification", "/verify-scans", or when the user wants to upgrade research findings from Tier C/D to Tier A by visually confirming document scans. Also use after a research session that produced scan-backed findings that need human confirmation.
tools
Search indexed person records at Streekarchief Midden-Holland (samh.nl) via the Memorix Genealogy REST API. No browser automation needed — returns structured JSON in ~50ms per query. Based in Gouda, covers municipalities: Gouda, Haastrecht, Schoonhoven, Waddinxveen, Noord-Waddinxveen, Moerkapelle, Moordrecht, Ammerstol, Broek, Vlist, and surrounding areas in the Midden-Holland region of South Holland. 3M+ person records with DTB (doop/trouw/begraven), BS (geboorte/huwelijk/overlijden), and Inschrijvingaktes. 36 Knijf results found, including Gijsbert de Knijf records in Gouda and van der Knijf in Waddinxveen. Scans available for most records. Triggers on: "search Gouda archive", "Streekarchief Midden-Holland", "SAMH", "Haastrecht records", "Schoonhoven records", "/streekarchief-midden-holland", or any genealogy research in the Gouda/Midden-Holland area. No login required. Parallelizable — run multiple queries simultaneously.