Verify Translator
Testing & Qualityverify-translatorVerify Translator is an Agent Skill for testing & quality published in the zotero/translators repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Verify a Zotero translator after every addition or modification, and before submitting a PR. Runs linting, tests, and metadata updates.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/zotero/translators/blob/HEAD/.agent/skills/verify-translator/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/verify-translator, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Fetch documentation
Fetch and read:
- https://www.zotero.org/support/_export/raw/dev/translators
- https://www.zotero.org/support/_export/raw/dev/translators/coding
Update lastUpdated
This must be done every time translator code is modified. Zotero uses lastUpdated to determine when to push updates to users.
node .bin/update-metadata.mjs "<translator filename>"
Lint
npm run lint -- "<translator filename>"
Use --fix for auto-fixable errors. Fix any remaining errors manually.
Run tests
node .bin/run-tests.mjs "<translator filename>"
This launches headless Chromium with the Zotero Connector extension and runs the translator's test cases against live sites.
All tests must pass. If a test fails:
- Read the failure output carefully.
- Check whether the target site has changed.
- Fix the translator code or update the test case (using
create-testskill). - Re-run tests until all pass.
Ensure user is working in a Git branch
git branch --show-current
If on master, create a new branch.
Create a PR
Guide the user through creating a PR on https://github.com/zotero/translators. Keep the description concise. Encourage the user to write/review the description.