Implements biometric authentication with WebAuthn/FIDO2: attestation, credential registration, assertion verification, and testing with libfido2.
Agentic Workflow: Read -> Reason -> Act (biometric)
You are Biometric (api/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — api context for biometric
- Domain: Implements biometric authentication with WebAuthn/FIDO2: attestation, credential registration, assertion verification, and testing with libfido2.
- webauthn-registration: Test WebAuthn registration flows at the hardware level. —
fido2-cred -M -r -i client.data /dev/hidraw0
- assertion: Perform biometric assertions for authentication. —
fido2-assert -G -r -i client.data /dev/hidraw0
- attestation: Inspect attestation and key metadata. —
openssl x509 -in attestation.der -inform DER -noout -text
- Check
knowledge and prerequisites: fido2-assert, fido2-cred, fido2-token, lsusb
2. Reason — think for biometric
- For
webauthn-registration: Test WebAuthn registration flows at the hardware level. — decide which checks to run
- For
assertion: Perform biometric assertions for authentication. — decide which checks to run
- For
attestation: Inspect attestation and key metadata. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with biometric tools
- Tools:
Glob, Grep, Read, Fido2-cred, Fido2-token (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
biometric:d8593901
Biometric
What this skill does
Implements biometric authentication using WebAuthn/FIDO2: registering authenticators with attestation, performing assertions, inspecting attestation certificates, and testing with libfido2 hardware tools.
When to use
- Adding passkey/fingerprint login to an app
- Testing FIDO2 flows with real hardware
- Verifying attestation certificates from authenticators
Real commands
# List tokens
fido2-token -L
# Make a credential (registration)
fido2-cred -M -r -i client.data -o cred /dev/hidraw0
# Verify the credential
fido2-cred -V -r -i client.data -o cred -c cred /dev/hidraw0
# Assert (login)
fido2-assert -G -r -i client.data -o assert /dev/hidraw0
# Inspect attestation cert
openssl x509 -in attestation.der -inform DER -noout -subject -issuer
Testing
- Verify attestation chains with openssl x509 against vendor roots
- Exercise reject paths: wrong user presence, revoked credential
Best practices
- Verify signature counters and origin in the RP
- Store only public keys and credential IDs, never biometric templates
- Offer fallback (password/TOTP) alongside biometrics
- Use a passkey provider SDK (e.g. WebAuthn lib) rather than raw hardware in production
Capabilities
webauthn-registration
Test WebAuthn registration flows at the hardware level.
Parameters:
device (string): HID device path, e.g. /dev/hidraw0
client_data (string): Client data JSON file
Commands:
fido2-cred -M -r -i client.data /dev/hidraw0
fido2-cred -M -r -i client.data -o cred /dev/hidraw0
fido2-token -L
fido2-token -I /dev/hidraw0
fido2-cred -V -r -i client.data -o cred -c cred /dev/hidraw0
Examples:
- fido2-token -L | grep -i yubikey
- fido2-cred -M -r -i client.data -o cred /dev/hidraw0
- fido2-cred -V -r -i client.data -o cred -c cred /dev/hidraw0
assertion
Perform biometric assertions for authentication.
Parameters:
device (string): HID device path
assertion_file (string): Output assertion file
Commands:
fido2-assert -G -r -i client.data /dev/hidraw0
fido2-assert -G -r -i client.data -o assert /dev/hidraw0
fido2-assert -V -r -i client.data -o assert -c cred /dev/hidraw0
fido2-token -R /dev/hidraw0
Examples:
- fido2-assert -G -r -i client.data -o assert /dev/hidraw0
- fido2-assert -V -r -i client.data -o assert -c cred /dev/hidraw0
- fido2-token -R /dev/hidraw0
attestation
Inspect attestation and key metadata.
Parameters:
cert_file (string): Attestation certificate file
format (string): DER or PEM
Commands:
openssl x509 -in attestation.der -inform DER -noout -text
openssl x509 -in attestation.der -inform DER -noout -subject -issuer
fido2-token -I /dev/hidraw0
fido2-cred -Q -r /dev/hidraw0
lsusb | grep -i -E 'fido|yubikey|feitian'
Examples:
- openssl x509 -in attestation.der -inform DER -noout -subject -issuer
- fido2-token -I /dev/hidraw0
- lsusb | grep -i fido
References
1---2name: "biometric"3description: "Implements biometric authentication with WebAuthn/FIDO2: attestation, credential registration, assertion verification, and testing with libfido2. Use when working with webauthn registration, assertion, attestation, api or when the user mentions webauthn registration, assertion, attestation, api."4license: "MIT"5compatibility: "Requires fido2-assert, fido2-cred, fido2-token, lsusb, openssl."6metadata:7 source: https://skillmd.com/skills/opknock/biometric8 author: Kdesk9 version: 2.0.010 category: api11allowed-tools: "Glob Grep Read Bash(fido2-assert:*) Bash(fido2-cred:*) Bash(fido2-token:*) Bash(lsusb:*) Bash(openssl:*)"12---1314Implements biometric authentication with WebAuthn/FIDO2: attestation, credential registration, assertion verification, and testing with libfido2.1516## Agentic Workflow: Read -> Reason -> Act (biometric)1718You are **Biometric** (api/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — api context for `biometric`21- Domain: Implements biometric authentication with WebAuthn/FIDO2: attestation, credential registration, assertion verification, and testing with libfido2.22- **webauthn-registration**: Test WebAuthn registration flows at the hardware level. — `fido2-cred -M -r -i client.data /dev/hidraw0`23- **assertion**: Perform biometric assertions for authentication. — `fido2-assert -G -r -i client.data /dev/hidraw0`24- **attestation**: Inspect attestation and key metadata. — `openssl x509 -in attestation.der -inform DER -noout -text`25- Check `knowledge` and `prerequisites: fido2-assert, fido2-cred, fido2-token, lsusb`2627### 2. Reason — think for `biometric`28- For `webauthn-registration`: Test WebAuthn registration flows at the hardware level. — decide which checks to run29- For `assertion`: Perform biometric assertions for authentication. — decide which checks to run30- For `attestation`: Inspect attestation and key metadata. — decide which checks to run31- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3233### 3. Act — execute with `biometric` tools34- Tools: `Glob`, `Grep`, `Read`, `Fido2-cred`, `Fido2-token` (see frontmatter `tools`/`allowed-tools`)35- Use `safe_path` for any write; record evidence (paths, checksums)36- Fingerprint: `biometric:d8593901`3738# Biometric3940## What this skill does4142Implements biometric authentication using WebAuthn/FIDO2: registering authenticators with attestation, performing assertions, inspecting attestation certificates, and testing with libfido2 hardware tools.4344## When to use4546- Adding passkey/fingerprint login to an app47- Testing FIDO2 flows with real hardware48- Verifying attestation certificates from authenticators4950## Real commands5152```bash53# List tokens54fido2-token -L5556# Make a credential (registration)57fido2-cred -M -r -i client.data -o cred /dev/hidraw05859# Verify the credential60fido2-cred -V -r -i client.data -o cred -c cred /dev/hidraw06162# Assert (login)63fido2-assert -G -r -i client.data -o assert /dev/hidraw06465# Inspect attestation cert66openssl x509 -in attestation.der -inform DER -noout -subject -issuer67```6869## Testing7071- Verify attestation chains with openssl x509 against vendor roots72- Exercise reject paths: wrong user presence, revoked credential7374## Best practices7576- Verify signature counters and origin in the RP77- Store only public keys and credential IDs, never biometric templates78- Offer fallback (password/TOTP) alongside biometrics79- Use a passkey provider SDK (e.g. WebAuthn lib) rather than raw hardware in production8081## Capabilities8283### webauthn-registration84Test WebAuthn registration flows at the hardware level.8586**Parameters:**87- `device` (string): HID device path, e.g. /dev/hidraw088- `client_data` (string): Client data JSON file8990**Commands:**91- `fido2-cred -M -r -i client.data /dev/hidraw0`92- `fido2-cred -M -r -i client.data -o cred /dev/hidraw0`93- `fido2-token -L`94- `fido2-token -I /dev/hidraw0`95- `fido2-cred -V -r -i client.data -o cred -c cred /dev/hidraw0`9697**Examples:**98- fido2-token -L | grep -i yubikey99- fido2-cred -M -r -i client.data -o cred /dev/hidraw0100- fido2-cred -V -r -i client.data -o cred -c cred /dev/hidraw0101102### assertion103Perform biometric assertions for authentication.104105**Parameters:**106- `device` (string): HID device path107- `assertion_file` (string): Output assertion file108109**Commands:**110- `fido2-assert -G -r -i client.data /dev/hidraw0`111- `fido2-assert -G -r -i client.data -o assert /dev/hidraw0`112- `fido2-assert -V -r -i client.data -o assert -c cred /dev/hidraw0`113- `fido2-token -R /dev/hidraw0`114115**Examples:**116- fido2-assert -G -r -i client.data -o assert /dev/hidraw0117- fido2-assert -V -r -i client.data -o assert -c cred /dev/hidraw0118- fido2-token -R /dev/hidraw0119120### attestation121Inspect attestation and key metadata.122123**Parameters:**124- `cert_file` (string): Attestation certificate file125- `format` (string): DER or PEM126127**Commands:**128- `openssl x509 -in attestation.der -inform DER -noout -text`129- `openssl x509 -in attestation.der -inform DER -noout -subject -issuer`130- `fido2-token -I /dev/hidraw0`131- `fido2-cred -Q -r /dev/hidraw0`132- `lsusb | grep -i -E 'fido|yubikey|feitian'`133134**Examples:**135- openssl x509 -in attestation.der -inform DER -noout -subject -issuer136- fido2-token -I /dev/hidraw0137- lsusb | grep -i fido138139## References140- [WebAuthn Spec](https://www.w3.org/TR/webauthn-2/)141- [libfido2](https://github.com/Yubico/libfido2)142- [OWASP Biometrics](https://owasp.org/www-community/controls/Biometric_Authentication)