/setec-voiceprint:corpus-acquisitionfrom setec-voiceprint
Help the user adapt SETEC's acquisition pipeline to a new source. Use when the user wants to add prose to the impostor pool from a source the framework doesn't already cover: a Slack export, an Obsidian vault, a Notion dump, an mbox file, a Discord export, a custom CMS, a JSON archive, an internal wiki, an academic-paper PDF library outside the standard format, etc. Also triggers on "add this to my corpus," "import these files into the impostor pool," "scrape my Substack" (when SETEC's Substack handling doesn't fit), "I want to use my notes as a baseline," "build a corpus from these messages," or "adapt acquire_blog.py for X."
Ships in setec-voiceprint. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill helps the user adapt SETEC's acquisition pipeline (the pattern shared by acquire_blog.py, acquire_blogger_takeout.py, acquire_magazine.py, pdf_inventory.py, pdf_extract.py) to a source the framework doesn't already cover. The architecture is stable: every acquisition script does the same six-step pipeline. What changes per source is three pure functions plus the CLI surface.
references/acquire-corpus-pattern.md, copying scripts/setec/surfaces/acquire_corpus_template.py to a new file, filling the four TODO(LLM) markers based on the source's specifics, helping the user run --dry-run against the source, and validating the emitted manifest.consent_status; if the user can't articulate it, neither should the new script run); auto-pushing the new script into the framework as a permanent addition (one-off scripts stay in the user's local checkout); silently updating existing acquisition scripts when "adapt" was the request.Every acquisition script in SETEC follows this pipeline:
discover items → extract one → preprocess → content-hash dedupe → write .txt + .meta.json → emit manifest entry
The first two steps are source-specific. The last four are shared in scripts/acquisition_core.py. A new acquisition script is mostly: implement the first two for your source, wire CLI args through parse_options, and let the shared infrastructure do the rest.
The full reference: ${CLAUDE_PLUGIN_ROOT}/references/acquire-corpus-pattern.md. Read it before doing anything else with the user's source — it captures all the conventions (CLI flag names, manifest field defaults, privacy posture, testing pattern) that a new script has to honor.
The starting-point template: ${CLAUDE_PLUGIN_ROOT}/scripts/setec/surfaces/acquire_corpus_template.py. Copy it, replace SOURCE_NAME and TOOL_NAME, fill the four TODO(LLM) markers, add source-specific CLI flags. The shared pipeline (preprocessing → dedupe → write → manifest emit) is already wired. (The flat scripts/acquire_corpus_template.py is only a compatibility launcher; copy the implementation above.)
Get the user to describe the source clearly. Ask:
Where does the content live?
What format is each piece in?
What metadata is available per piece?
What's the consent / legal posture?
public_record (public-domain or government source)
cc_licensed (Creative Commons / open license)
fair_use_research (third-party, used research-only, not redistributed)
author_consent (the original author has explicitly OK'd the use)
undocumented (the validator warns; future public-report harnesses refuse to name)Will there be enough text?
Open ${CLAUDE_PLUGIN_ROOT}/references/acquire-corpus-pattern.md and ${CLAUDE_PLUGIN_ROOT}/scripts/setec/surfaces/acquire_corpus_template.py. The reference doc is structured for LLM consumption — every section the new script needs has its own heading.
If you (Claude) are reading this skill, also load the worked examples (the implementations live under scripts/setec/surfaces/; the flat scripts/acquire_*.py files are compatibility launchers that still run the same commands):
${CLAUDE_PLUGIN_ROOT}/scripts/setec/surfaces/acquire_blogger_takeout.py — simplest local-source acquisition. Best example for archive / file-walking sources.${CLAUDE_PLUGIN_ROOT}/scripts/setec/surfaces/acquire_blog.py — most general live-network acquisition. Best example for URL / feed sources.${CLAUDE_PLUGIN_ROOT}/scripts/setec/surfaces/acquire_magazine.py — multiple per-source modules behind a uniform CLI. Best example when the user has several similar sources to handle (e.g. multiple Slack workspaces).Copy the template to a working file. Suggested naming: acquire_<source>.py if reusable, or acquire_<corpus_name>_oneoff.py if it's a one-off.
cp "${CLAUDE_PLUGIN_ROOT}/scripts/setec/surfaces/acquire_corpus_template.py" \
"${CLAUDE_PLUGIN_ROOT}/scripts/acquire_<source>.py"
Fill the four TODO(LLM) markers in order:
SOURCE_NAME and TOOL_NAME constants at the top. SOURCE_NAME becomes part of acquired_via (e.g. acquire_obsidian_2026-05-09); TOOL_NAME is the argparse program name.
discover_items(source, options, fetcher) — list the items. Yield ItemMeta objects with locator, title, author, date, and any source-specific extras. Apply early date-window filtering when discovery has dates cheaply; otherwise leave that for extract_one.
extract_one(item, source, options, fetcher) — given one item, return (body_text, title, author, date). The body MUST be plain text — convert HTML / Markdown / JSON / PDF here. Return empty strings + None for fields the source doesn't provide.
build_arg_parser additions — add source-specific flags (archive path, API token file, channel filter, custom selectors). Standard flags are already there.
parse_options — wire any source-specific flags into ProcessOptions.source_extras (a free dict so you don't have to fight the type system).
--dry-runpython3 "${CLAUDE_PLUGIN_ROOT}/scripts/acquire_<source>.py" \
"${USER_SOURCE_PATH_OR_URL}" \
--persona "<some_slug>" \
--impostor-for fiction \
--register blog_essay \
--consent-status fair_use_research \
--era pre_chatgpt \
--max-items 5 \
--dry-run
Expect to see "would write N files" output without actually writing. If discover_items finds zero items, the discovery logic is wrong. If extract_one produces empty bodies, the extraction logic is wrong. Iterate until dry-run reports the right count.
After dry-run looks right:
# Real run (small batch first):
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/acquire_<source>.py" \
"${USER_SOURCE}" \
--persona "<slug>" \
--impostor-for fiction \
--register blog_essay \
--consent-status fair_use_research \
--max-items 10
# Validate the draft manifest:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/manifest_validator.py" \
"<output-dir>/draft_manifest.jsonl"
If the validator reports errors, the impostor-required fields aren't getting set correctly. Check compose_manifest_entry is being called with corpus_role: impostor (default in acquisition_core.compose_manifest_entry).
After the user is happy with the output, ask: should this script live in the framework permanently?
User: "I have a Slack export I'd like to use. It's a zip with per-channel directories of JSON files."
You:
Survey: Single zip archive, per-channel JSON. Each message has text, user, ts. The user's own messages are what they want — they'd filter to messages where user == "U_THEIR_ID". Date is the ts Unix timestamp. They've been the sole author of those messages for years; consent is author_consent (their own writing).
Read the reference + template.
Adapt:
SOURCE_NAME = "slack", TOOL_NAME = "acquire_slack".discover_items: iterate channel directories, glob *.json, parse each, yield one ItemMeta per long-enough message from the user's user_id. The extra dict carries channel_name for the manifest's notes field.extract_one: read the message's text field, optionally strip Slack mention markers (<@USERID> → empty, <#CHANNELID> → channel name). Return (body_text, title="", author=user_display_name, date=datetime.fromtimestamp(float(ts)).date()).--filter-channel and --user-id flags via build_arg_parser.Dry-run: python3 acquire_slack.py path/to/slack_export.zip --user-id U123 --persona <slug> --impostor-for self --register personal --consent-status author_consent --max-items 5 --dry-run. Verify discovery finds messages, that they're long enough, that extraction produces clean text.
Real run with a higher --max-items. Validate the manifest. Spot-check a few .txt files for cleanliness (no leftover Slack markup, no emoji codes).
Probably one-off — Slack exports are private; the script lives in the user's local checkout, not the framework.
extract_one.[[link]]).mailbox.mbox(path); pull body, drop quoted reply text, only keep outgoing.acquisition_core.Fetcher with auth headers; paginate the index; fetch posts by ID.Each of these is a one-day adaptation if the user has a clean export and can articulate consent posture.
The standard SETEC privacy guard applies to every adaptation:
ai-prose-baselines-private/. The marker-based check refuses non-private paths unless --allow-public-output is set.consent_status: undocumented are validator-warned; future public-report harnesses must refuse to name them.python3 "${CLAUDE_PLUGIN_ROOT}/scripts/acquire_corpus_template.py" --help
The template's --help output lists the standard CLI surface. If it errors with NotImplementedError, that's expected — the template's stubs raise on call. Filled-in copies of the template (acquire_<source>.py) should run cleanly.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/setecDiscoverability entry point for the SETEC Voiceprint framework. Use when the user asks "what can SETEC do," "which audit should I run for X," "what's available given my dependencies," "how do I detect / measure / diagnose / audit Y in this prose," or otherwise needs help routing among the framework's many task surfaces and scripts. Also triggers on "show me everything SETEC can do," "recommend a pipeline for this situation," "what runs on stdlib," "what handles essays / fiction / ESL," and any question framed as "I have X, what should I run?" Do NOT use for actual execution of audits — this skill recommends; the user runs the recommended commands.
/setupFirst-run dependency check for the SETEC framework. Use when the user has just installed the plugin, asks about "setting up SETEC," reports a "module not found" error from a SETEC script, asks "what does this plugin need to run," asks how to install spaCy / pypdf / ocrmypdf / transformers / torch for SETEC, asks why a feature isn't working, or asks for install commands. Also triggers on "missing dependency," "ImportError" from a setec-voiceprint script, "first-time setup," "is everything installed," "do I need anything else for SETEC," "Tier 4 surprisal," "Binoculars," "external mirror," or any question about installing dependencies for Surface 5 (discrimination evidence).
npx claudepluginhub anotherpanacea-eng/setec-voiceprint --plugin setec-voiceprint