AGENT SKILL

tokenise-card-data-to-shrink-scope

Use when a system touches card numbers, CVV, or cardholder data and the compliance scope is too wide. Replace the PAN with a token at the boundary and prove no PAN is stored.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 81
Forks
17

01 前言 Front Matter

name
tokenise-card-data-to-shrink-scope
description
Use when a system touches card numbers, CVV, or cardholder data and the compliance scope is too wide. Replace the PAN with a token at the boundary and prove no PAN is stored.

02 资源文件 3

03 SKILL.md 正文

Tokenise card data to shrink scope

Storing a card number drags the whole system into card-data rules. This skill replaces the PAN with a token at the boundary so your systems never hold it.

Procedure

  1. Draw the trust boundary: any component that reads, transmits, or stores the PAN is in scope. Move the boundary to the provider's hosted fields or element.

  2. Use provider-hosted fields so the PAN never becomes a value in your JavaScript: an iframe or element that posts directly to the processor.

  3. For server-side flows, exchange the PAN for a token immediately and never persist the PAN or the CVV. The CVV must never be stored, even encrypted.

  4. Store only the token plus the display metadata the processor allows: card_brand, last4, exp_month, exp_year.

  5. Confirm what you store against the card-data rules: full track data, CVV, and PIN block are never storable; a stored PAN requires encryption and heavy scope.

  6. Log nothing sensitive; mask to the last four in every log line and error message.

  7. Attribute retention: the token lives as long as the customer relationship while the provider holds the PAN under its own scope.

  8. Run the provider's scope-assessment wizard and record the resulting SAQ level; re-run it after any flow change.

  9. Verify no PAN remains anywhere: scan a sample dump for Luhn-valid 13-19 digit runs that are not order or invoice ids.

Pitfalls

  • A "masked" PAN stored in a notes field is still a PAN if the mask keeps more than the last four digits.
  • Reintroducing the PAN for a refund by asking the user to re-enter it is fine; storing it again is not.
  • Copy-pasting a card into a support ticket is a common leak path; train agents and scrub tickets.
  • A provider token migration changes the token format; a botched migration can force re-collection of every card.
  • Client-side "just check Luhn" validation runs on the PAN inside your page and pulls it into scope.

Verification

rg -n "\b[0-9][0-9 -]{11,}[0-9]\b" /var/dumps/sample.sql | grep -vE "last4|order_id|invoice" || echo "no PAN-like sequences"

Report the in-scope components, the SAQ level, and the result of the PAN scan.

04 同仓库更多 Skills

jiayaoqijia
jiayaoqijia/cryptoskill

troves

Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

trade

Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

staking

Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

send

Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

portfolio

View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

multi-swap

Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.

★ 81