domain-reid

domain-reid is a skill for Claude Code from AxGord/claude-workflow. It costs 11 tokens per session (1,174 once invoked), scanned A, original, MIT.

A reference guide to common implementation mistakes in person re-identification, a machine-learning task that matches the same person across different images or cameras. It covers feature distances, losses, CLIP-ReID, and benchmark results.

In plain words
What is it for?
Use it when training or reviewing person re-identification models, choosing loss functions, checking CLIP-ReID setups, or interpreting Market-1501 and MSMT17 results.
Why use it?
It helps prevent subtle training and evaluation mistakes, such as using the wrong feature stage or quoting results from a special setup as if they were standard results.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the workflow plugin — 28 skills, 2 hooks, 1 MCP server shipped together

Good fit Use it when training or reviewing person re-identification models, choosing loss functions, checking CLIP-ReID setups, or interpreting Market-1501 and MSMT17 results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/axgord/claude-workflow/domain-reid
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AxGord/claude-workflow --skill domain-reid
Clone the repo
git clone --depth 1 https://github.com/AxGord/claude-workflow

Made for: Claude Code.

Or install workflow, the plugin that ships this one along with the rest of its 28 skills, 2 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for domain-reid

README.md
[![agentmods](https://agentmods.dev/badge/skills/axgord/claude-workflow/domain-reid/github.svg)](https://agentmods.dev/skills/axgord/claude-workflow/domain-reid)
Your own site
<a href="https://agentmods.dev/skills/axgord/claude-workflow/domain-reid"><img src="https://agentmods.dev/badge/skills/axgord/claude-workflow/domain-reid/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for domain-reid

Your own site · 80×15
<a href="https://agentmods.dev/skills/axgord/claude-workflow/domain-reid"><img src="https://agentmods.dev/badge/skills/axgord/claude-workflow/domain-reid.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,174 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00011 $0.01174
Opus 5 $0.00005 $0.00587
Sonnet 5 $0.00002 $0.00235
Haiku 4.5 $0.00001 $0.00117

Measured 10d ago against content hash 1867e69a2d86, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

domain-reid scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/skills/domain-reid/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Re-ID — Verified Gotchas

BNNeck Trick (distance metric direction)

BNNeck = BatchNorm before classifier. The trick:

  • Training: Euclidean distance in triplet loss (features BEFORE BNNeck)
  • Inference: Cosine similarity (features AFTER BNNeck)

This direction is commonly reversed — getting it wrong silently degrades results.

Loss Recipe

Typical: loss = CE_label_smoothing + triplet_hard_mining + 0.0005 * center_loss

The center loss weight (lambda=0.0005) is critical — too high destabilizes training.

CLIP-ReID

Two-stage approach (NOT generic CLIP fine-tuning):

  1. Learn text tokens per identity — BOTH encoders frozen; only the id-specific text tokens train
  2. Fine-tune visual encoder with learned text supervision (text side stays fixed)

MSMT17 ~86.7% mAP is the SIE+OLP + re-ranking configuration — plain ViT-B CLIP-ReID lands in the low-to-mid 70s mAP. Don't quote 86.7 as the vanilla-model number.

SOTA Performance Reference

Method Market-1501 R1/mAP MSMT17 R1/mAP
CLIP-ReID (ViT-B, SIE+OLP, +re-rank) 96.4 / 93.3 91.1 / 86.7
TransReID (ViT-B) 95.2 / 89.5 86.2 / 69.4
BoT (ResNet-50) 94.5 / 85.9 77.5 / 47.5

The CLIP-ReID row already includes k-reciprocal re-ranking — do NOT add the re-ranking boost from the section below on top of these numbers (double-count).

Key Datasets

Dataset IDs Images Notes
Market-1501 1,501 32,668 Most widely used
MSMT17 4,101 126,441 Largest, preferred for SOTA
CUHK03 1,467 14,096 Use "new protocol" (767/700 split)
MARS 1,261 1,191,003 Video-based (tracklets)

Note: DukeMTMC-reID was retracted due to privacy concerns — avoid citing it.

k-Reciprocal Re-Ranking

Parameters: k1=20, k2=6, lambda=0.3. Boosts mAP by 5-10%. Use for offline, skip for real-time.

torchreid install — from git, NOT PyPI

pip install torchreid fetches a stale 0.2.5 (2019) with a different API — import torchreid often outright fails on a modern torch/numpy. The real KaiyangZhou/deep-person-reid is 1.4.x, git-only. Its setup.py imports numpy/Cython at build time, so a plain pip install git+... fails under PEP-517 build isolation (error: getting requirements to build wheelModuleNotFoundError: No module named 'torchreid' / numpy). Two working installs (both need numpy+Cython in the env): pip install --no-build-isolation git+https://github.com/KaiyangZhou/deep-person-reid.git, or the official git clone … && cd deep-person-reid && pip install -r requirements.txt && python setup.py develop (its requirements.txt does NOT pin torch, so a preinstalled CUDA torch survives). So a "package is installed but import raises" state ≠ missing — detect it with importlib.util.find_spec(m) is not None + a real import attempt, and surface the actual exception (don't report "missing" and re-suggest the PyPI name that caused it).

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 86 lines · 11 tokens per session scan A 1867e69a2d86

Subscribe to this mod's changes

domain-reid is a skill published in the GitHub repository AxGord/claude-workflow (5 stars, last pushed 1mo ago), licensed MIT. It adds 11 tokens to every session and 1,174 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

google-cloud-solution-agentic-analytics-spark-knowledge-catalog

Discovers requirements and generates guidance to design and deploy a governed, secure agentic-analytics solution for data that's distributed across Google Cloud, other cloud providers, or on-premises. Data that's outside Google Cloud (such as data from Databricks, Snowflake, Salesforce, SAP, or Oracle systems) is…

google/skills · 138 tokens

training-check

Interactively monitor training metrics from the current Codex session, periodically checking WandB or fallback logs for NaN, divergence, plateaus, and broken runs.

wanshuiyin/Auto-claude-code-research-in-sleep · 35 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 tokens