---
name: tracking-pettracer-location
description: >-
  Retrieve and interpret an authorised owner's PetTracer collar inventory, latest known GPS fix, or bounded location history. Use for explicit PetTracer work, not generic pet questions or tracking a person. Distinguish measurement time, contact time, missing data, and stale fixes.
compatibility: Optional Python 3.10+ standard-library helper uses the unofficial PetTracer portal protocol. It requires authorised credentials for live reads; vendor API stability and current field semantics are not guaranteed.
metadata:
  version: "1.0.0"
  reviewed: "2026-09-13"
title: tracking-pettracer-location
canonical_url: https://skilld.dev/gh/tristanmanchester/agent-skills/tracking-pettracer-location
last_updated: 2026-10-06T19:32:36.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/PORTAL.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/tracking-pettracer-location/references/PORTAL.md), [scripts/pettracer.py](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/tracking-pettracer-location/scripts/pettracer.py), [tests/test_pettracer.py](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/tracking-pettracer-location/tests/test_pettracer.py), [tests/test_review_regressions.py](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/tracking-pettracer-location/tests/test_review_regressions.py).
>
> If the user asked to install this Skill, run `npx skilld install tristanmanchester/agent-skills/tracking-pettracer-location`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/tracking-pettracer-location`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/tristanmanchester/agent-skills/tracking-pettracer-location) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/tracking-pettracer-location`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/tracking-pettracer-location --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/tracking-pettracer-location --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# PetTracer location evidence

Keep this skill: it solves a specific owner's lookup task. No current official
public developer API or replacement CLI was established during this review. The
portal helper is therefore explicitly unofficial, not a vendor-supported client
or a guarantee of live tracking. Prefer the official app/portal when its behaviour
or the account contract differs.

## Establish the target and permission

Use only an account/collar the user owns or is authorised to inspect. Confirm the
actual device ID against the account inventory and official app before interpreting
coordinates as the pet's location. A HomeStation's configured position is not a
collar GPS fix. An absent device-type field remains unverified; do not infer type
from an arbitrary name or the first item in a response.

Resolve SKILL_DIR to this installed skill directory. Set PETTRACER_TOKEN privately,
or PETTRACER_USERNAME and PETTRACER_PASSWORD for an authorised login. Never ask for
credentials in chat or pass them in command arguments. The helper does not store
or print tokens and does not accept arbitrary API origins or credential redirects.

```bash
python "$SKILL_DIR/scripts/pettracer.py" list
python "$SKILL_DIR/scripts/pettracer.py" locate --device-id 12345 --max-age-seconds 900
```

Replace the sample ID with the verified collar ID. The 900-second default is a
local reporting threshold, not a manufacturer guarantee or the right threshold
for every tracking mode. `recent` means the supplied measurement timestamp passes
that chosen threshold; it does not mean the pet has stayed at those coordinates.

## Read timestamps literally

Use only `timeMeasure` to compute fix age. Keep `timeDb` and `lastContact` separate;
new database activity/contact cannot make an old position fresh. Reject timezone-
less dates rather than silently calling them UTC. Unknown times and future times
are explicit states, never fresh by default. Display the actual fix time/timezone
and age alongside retrieval time.

The helper validates finite latitude/longitude ranges and preserves zero values.
It does not estimate a battery percentage or convert raw signal/accuracy fields
without a verified calibration/units contract. `acc` and `horiPrec` remain separate
raw quality fields with unverified units; do not call either a metre-radius merely
because a community integration did. `home` is a device flag, not proof the pet is
inside a precise geofence.

## History

Use an explicit timezone-aware window, at most seven days per helper request:

```bash
python "$SKILL_DIR/scripts/pettracer.py" history --device-id 12345 \
  --from-time 2026-09-13T06:00:00+02:00 --to-time 2026-09-13T12:00:00+02:00
```

These are example times, not the current requested interval. The helper preserves
provider order and states completeness is unverified. Check returned timestamps
against the requested interval; unknown/out-of-window points remain labelled.
Sort or deduplicate deliberately for a route, preserving originals and gaps.
Straight lines between sparse GPS fixes are not the actual path travelled.

## Live updates and modes

For immediate owner search/live mode use the official app/portal. A subscription
to updates does not itself command the collar to obtain a new fix. Changing modes
can affect battery and device behaviour; do not change settings as a side effect
of a location read. The old unbounded watcher is removed; retained protocol notes
in [portal and streaming](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/tracking-pettracer-location/references/PORTAL.md) describe the evidence needed for
an explicitly scoped new integration, not a tested live client.

Do not promise continuous watching or future notification unless an authorised
running service/scheduler has actually been established. A failed stream or no GPS
fix is not evidence that the pet is safe, stationary, indoors, or at home.

## Return an honest location result

State the selected collar, latest valid measured coordinates, measurement time,
age/freshness state, and relevant missing/quality data. Report last contact separately.
A map link can disclose precise location to a third party; include it only as
appropriate to the user's request and keep raw history private. Do not overstate
accuracy, reverse-geocode a precise address without need, or infer human routines.

Exit zero means the read was processed, not that a recent GPS fix exists. Inspect
`last_fix.freshness` and `device_type_verified`. Missing/invalid fixes, schema errors,
auth failures, and empty history are different outcomes. Per-request socket timeout
and a 2 MiB response bound are not a total wall-clock SLA. There are no automatic
retries or re-login loops; verify an unexpected endpoint/schema before retrying.

Maintainers: `python -m unittest discover -s "$SKILL_DIR/tests" -v` tests parsing,
selection, request boundaries, and mocked transport. No live account or collar was
queried in this review. Vendor operational help: https://help.pettracer.com/.

History results retain each original record and label its measurement time as inside,
outside, or unknown relative to the requested inclusive window. This is separate
from fix age. A non-object `lastPos` is a schema error, not evidence of no GPS fix.
