# Verify Translator

> Verify 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.

- Skill name: `verify-translator`
- Category: [Testing & Quality](https://www.openparable.com/skill/testing-quality/1)
- Source: https://github.com/zotero/translators/blob/HEAD/.agent/skills/verify-translator/SKILL.md
- Repository: zotero/translators (1,650 GitHub stars when collected)

## SKILL.md

## 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:
1. Read the failure output carefully.
2. Check whether the target site has changed.
3. Fix the translator code or update the test case (using `create-test` skill).
4. 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.

---

Source: https://www.openparable.com/skill/testing-quality/verify-translator (OpenParable). Cite the canonical URL above.
