| name | read-tag |
| description | Use when you need to read and decode the payload from a presented NFC tag — emits the tag content (URLs, text, etc.) and caches the last read. |
Read Tag
Read and decode the payload(s) from an NFC tag. Detects NDEF record types (URI, text, etc.), decodes them, and displays the result. Saves the last read to the cache for quick reference.
When to use
- You need to verify what is stored on a tag.
- You want to extract a URL or text from an existing tag.
- Diagnosing tag content as part of troubleshooting.
Inputs to gather
- None required — user simply presents the tag to the reader.
Procedure
- Verify
nfc-list is available.
- Prompt user to present the tag.
- Run
nfc-list to detect the tag and capture its UID and tag type. Fail if no tag is detected.
- Read the tag using
nfc-mfclassic read (MIFARE Classic) or nfc-mfultralight read (NTAG21x), capturing the full memory dump.
- Parse the NDEF records in the memory dump:
- Identify record type (URI, text, raw binary, etc.).
- Decode each record and display in human-readable form.
- For URI: display the full URL.
- For text: display the UTF-8 decoded text and language tag (if present).
- For unknown types: display record type ID and hex dump.
- Display tag metadata:
- UID (hex).
- Tag type (NTAG213, MIFARE Classic 1K, etc.).
- Total capacity (bytes).
- User data area size.
- Save the full read to
${CLAUDE_USER_DATA:-${XDG_DATA_HOME:-$HOME/.local/share}/claude-plugins}/nfc-ops/cache/last-read.json:
- Timestamp.
- UID.
- Tag type.
- Parsed NDEF records (JSON).
- Raw memory dump (hex).
Output / side effects
- Terminal displays decoded payload(s) and tag metadata.
cache/last-read.json is updated.
- User can pipe the output or copy the URLs/text as needed.
Safety / constraints
- No write operations — this skill only reads.
- Memory dump size: For MIFARE Classic 4K, the dump may be large. Truncate the hex display in the terminal output; full dump is available in the cache file.