Automated summary
This skill enforces guardrails when editing core/security/compliance-manager.js to preserve PCI, GDPR, PSD2, SOX, and HIPAA controls.
Strengths
- Protects sensitive data (card numbers, personal data) with strict masking and encryption rules.
- Enforces strong customer authentication (SCA) and mandatory audit logging.
- Prevents accidental or intentional bypass of compliance validators.
- Ensures adherence to multiple regulatory standards in one place.
Limitations
- Only applies to compliance-manager.js, not other security modules.
- Rules are hardcoded and cannot be modified without rewriting the skill itself.
- Does not handle exemptions or approved special cases.
Use this skill when modifying compliance validators, security handling, or audit flows in compliance-manager.js.
Do not use this skill for changes that do not involve compliance rules or for other files in the project.
Security analysis
SafeThe skill contains only static compliance guidelines and code patterns for maintaining security controls. It does not instruct or enable the AI agent to execute any potentially dangerous operations, and there are no declared tools.
No concerns found
How this analysis is madeExamples
I need to add a new card field (cvv2) to the compliance manager. Ensure it follows PCI-DSS rules: never log it, mask it, and do not store after auth.Update the encryption in compliance-manager.js from AES-256-GCM to AES-256-CBC. Make sure all non-negotiables are preserved.I want to add a debug flag that skips audit logging for certain operations. Apply this compliance skill to assess if it's allowed.name: compliance-manager description: Guardrails for edits to core/security/compliance-manager.js that preserve PCI/GDPR/PSD2/SOX/HIPAA controls (masking, encryption, SCA, consent checks, and audit logging). Use when changing compliance validators, security handling, or audit flows.
Compliance Manager Guardian
Purpose & Scope
Apply this skill when modifying core/security/compliance-manager.js.
The Compliance Manager provides:
- PCI-DSS data protection (card data masking, encryption)
- GDPR compliance (pseudonymization, consent management, data minimization)
- PSD2 compliance (Strong Customer Authentication)
- SOX audit trail requirements
- HIPAA health data protection
- Multi-regulation validation framework
- Secure audit logging
Non-Negotiables (Never Do)
Compliance Validators
- Never disable or bypass compliance validators.
- Never weaken validation rules (for example, making required checks optional).
- Never skip validation for "trusted" sources.
- Never add bypass flags or debug modes that skip compliance.
PCI-DSS Rules
- Never log these PCI fields (even in debug mode):
cvv,cvv2,cvc,cvc2,cid,cav2pin,pinBlocktrack1,track2,magneticStripe
- Never weaken card masking:
- Must show only first 6 and last 4 digits.
- Middle digits must be masked with
*.
- Never reduce encryption below AES-256-GCM.
- Never store CVV/PIN after authorization.
GDPR Rules
- Never process personal data without consent check.
- Never skip pseudonymization for personal identifiers.
- Never retain personal data beyond retention period.
- Never disable data minimization for analytics.
PSD2 Rules
- Never reduce SCA requirements below 2 factors.
- Never bypass SCA for amounts over threshold.
- Never skip transaction monitoring for high-value transactions.
- Never disable cumulative amount tracking.
Audit Logging
- Never skip audit logging for sensitive operations.
- Never delete or modify existing audit entries.
- Never log sensitive data in audit trails (mask first).
- Never disable audit persistence.
Security Rollback
- Never rollback security fixes without security team approval.
- Never lower security levels in production.
Required Patterns (Must Follow)
Card Number Masking
// Must mask showing only first 6 and last 4
maskCardNumber(cardNumber) {
const cleaned = cardNumber.replace(/\D/g, '');
const first6 = cleaned.substring(0, 6);
const last4 = cleaned.substring(cleaned.length - 4);
const masked = '*'.repeat(cleaned.length - 10);
return `${first6}${masked}${last4}`;
}
// Example: 4111111111111111 -> 411111******1111
Data Encryption
// Must use AES-256-GCM
encryptSensitiveData(data) {
const algorithm = 'aes-256-gcm'; // Do not change
const key = process.env.ENCRYPTION_KEY;
if (!key) throw new Error('ENCRYPTION_KEY is required');
// 12-byte IV is recommended for GCM
const iv = crypto.randomBytes(12);
// Prefer @onasis/security-sdk for key handling if available
// If ENCRYPTION_KEY is a passphrase, derive a 32-byte key via scrypt.
const keyBuf = (key.length === 64 && /^[0-9a-f]+$/i.test(key))
? Buffer.from(key, 'hex')
: crypto.scryptSync(key, 'onasis-gateway', 32);
const cipher = crypto.createCipheriv('aes-256-gcm', keyBuf, iv);
cipher.setAAD(Buffer.from('compliance-encryption'));
const plaintext = typeof data === 'string' ? data : JSON.stringify(data);
const ciphertext = Buffer.concat([cipher.update(plaintext, 'utf8'), cipher.final()]);
const authTag = cipher.getAuthTag();
return {
encrypted: ciphertext.toString('base64'),
iv: iv.toString('hex'),
authTag: authTag.toString('hex'),
algorithm
};
}
Strong Customer Authentication
// Must require 2+ factors
validateSCA(data) {
const factors = [];
if (data.password || data.pin) factors.push('knowledge');
if (data.deviceId || data.token) factors.push('possession');
if (data.biometric || data.fingerprint) factors.push('inherence');
return factors.length >= 2; // PSD2 requirement
}
Defense in Depth
// Must apply all applicable protections
enforceDataHandling(serviceId, data, operation) {
let processedData = { ...data };
if (service?.compliance?.pci) {
processedData = this.applyPCIProtections(processedData, operation);
}
if (service?.compliance?.gdpr) {
processedData = this.applyGDPRProtections(processedData, operation);
}
if (service?.compliance?.psd2) {
processedData = this.applyPSD2Protections(processedData, operation);
}
return processedData;
}
Audit Entry Creation
// Must create audit entry for all compliance events
logAuditEntry(action, details) {
const entry = {
timestamp: new Date(),
action,
details,
id: crypto.randomUUID()
};
this.auditLog.push(entry);
this.emit('audit:logged', entry);
this.persistAuditEntry(entry); // Must persist
}
Prohibited Fields Registry
| Field | Regulation | Storage | Logging | Transmission | |-------|------------|---------|---------|--------------| | cvv, cvv2, cvc, cvc2 | PCI-DSS 3.2 | Never | Never | HTTPS only | | pin, pinBlock | PCI-DSS 3.4 | Never | Never | Encrypted | | track1, track2 | PCI-DSS 3.2 | Never | Never | Never | | magneticStripe | PCI-DSS 3.2 | Never | Never | Never | | Full card number | PCI-DSS 3.4 | Encrypted | Masked | Encrypted |
Integration Points
| Component | Integration Method |
|-----------|-------------------|
| Base Client | Data passed through enforceDataHandling() |
| Metrics Collector | compliance_violations_total metric |
| API Routes | Middleware for request validation |
| Database | Audit entries persisted to audit.compliance_log |
Compliance Validation Checklist
Before deploying changes:
- [ ] Card data properly masked (first 6, last 4 only).
- [ ] CVV/PIN never logged or stored.
- [ ] Encryption uses AES-256-GCM.
- [ ] SCA requires 2+ factors.
- [ ] Audit entries created for all operations.
- [ ] GDPR consent check in place.
- [ ] Data minimization applied for analytics.
- [ ] No PII in metric labels.
- [ ] Audit log persisted to secure storage.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/compliance-manager-guardian-mm78nmsf/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/compliance-manager-guardian-mm78nmsf' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/compliance-manager-guardian-mm78nmsf/download' --output '.skill-downloads/compliance-manager-guardian-mm78nmsf/SKILL.md.part' && mv '.skill-downloads/compliance-manager-guardian-mm78nmsf/SKILL.md.part' '.skill-downloads/compliance-manager-guardian-mm78nmsf/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/compliance-manager-guardian-mm78nmsf/SKILL.md' && test -s '.skill-downloads/compliance-manager-guardian-mm78nmsf/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/compliance-manager' && cp -R '.skill-downloads/compliance-manager-guardian-mm78nmsf' '.claude/skills/compliance-manager'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/compliance-manager-guardian-mm78nmsf'openskills read 'compliance-manager-guardian-mm78nmsf'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/compliance-manager-guardian-mm78nmsf/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
DeFi AMM Security
Security
Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, donation attacks, oracle manipulation, slippage, and integer math.
Semgrep Rule Creator
Security
Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Includes test-first methodology, taint mode support, and validation steps. Helps when building targeted static analysis detections.
Dev Toolbar Review Guide
Security
Safety rules for the dev toolbar, PostHog client, and feature flags. Use when reviewing changes to dev-tools and related files, covering environment guards, override cookies, and SSE stream safety.