{
  "markdown": "<p align=\"center\">\n  <img src=\"https://img.shields.io/badge/claude--code-plugin-8A2BE2\" alt=\"Claude Code Plugin\" />\n  <img src=\"https://img.shields.io/badge/skills-1-blue\" alt=\"1 Skill\" />\n  <img src=\"https://img.shields.io/badge/agents-1-green\" alt=\"1 Agent\" />\n  <img src=\"https://img.shields.io/badge/license-MIT-green\" alt=\"MIT License\" />\n</p>\n\n# Memoriant LLM Gateway Skill\n\nA Claude Code plugin for designing, auditing, and generating compliance evidence for a governed LLM gateway. Write policy-as-code rules, verify tamper-evident audit trails, configure PII detection, and produce SOC2/HIPAA/CMMC evidence packages.\n\nThe LLM gateway space has mature routing tools. None of them answer the question a CISO asks before approving LLM usage in a regulated environment: **\"How do we prove to auditors that every LLM interaction was authorized, logged immutably, and compliant with our policies?\"** This plugin answers that question.\n\n**No servers. No Docker. Just install and use.**\n\n## Install\n\n```bash\n/install NathanMaine/memoriant-llm-gateway-skill\n```\n\n## Cross-Platform Support\n\n### Claude Code (Primary)\n```bash\n/install NathanMaine/memoriant-llm-gateway-skill\n```\n\n### OpenAI Codex CLI\n```bash\ngit clone https://github.com/NathanMaine/memoriant-llm-gateway-skill.git ~/.codex/skills/llm-gateway\ncodex --enable skills\n```\n\n### Gemini CLI\n```bash\ngemini extensions install https://github.com/NathanMaine/memoriant-llm-gateway-skill.git --consent\n```\n\n## Skills\n\n| Skill | Command | What It Does |\n|-------|---------|-------------|\n| **LLM Gateway** | `/llm-gateway` | Write policy rules, verify audit trails, configure PII detection, generate compliance evidence packages |\n\n## Agent\n\n| Agent | Best Model | Specialty |\n|-------|-----------|-----------|\n| **LLM Gateway Auditor** | Opus 4.6 | Policy authoring, audit trail verification, compliance control mapping, evidence package generation |\n\n## Quick Start\n\n```bash\n# Configure a gateway policy\n/llm-gateway\n\n# Or trigger directly\n\"Write a HIPAA-compliant gateway policy that blocks PII and requires approval for PHI.\"\n\n# Audit an existing deployment\n\"Verify this audit trail hasn't been tampered with.\" [paste JSONL entries]\n\n# Generate compliance evidence\n\"Generate a SOC2 CC7.1 evidence package for Q1 2025.\"\n```\n\n## Policy-as-Code\n\nPolicies are YAML files evaluated on every request before it reaches any LLM provider:\n\n```yaml\nrules:\n  - name: block-pii-in-prompts\n    description: Deny requests containing SSN, credit card, email, or phone patterns\n    action: DENY\n    conditions:\n      pii_detected: true\n\n  - name: require-approval-phi\n    description: PHI data requires human approval before any LLM dispatch\n    action: REQUIRE_APPROVAL\n    conditions:\n      data_classification:\n        - PHI\n\n  - name: eu-residency-review\n    description: EU jurisdiction requests require data residency review\n    action: REQUIRE_APPROVAL\n    conditions:\n      jurisdiction:\n        - EU\n```\n\n## Compliance Differentiators\n\n| Capability | This Skill |\n|------------|-----------|\n| Tamper-evident audit trail | Hash-chain JSONL — every entry links to the previous |\n| Policy-before-dispatch | DENY = prompt never leaves your infrastructure |\n| PII never stored raw | Only SHA-256 hashes logged |\n| SOC2/HIPAA evidence export | Structured packages mapped to specific controls |\n| Audit trail verification | Detects any modification, insertion, or deletion |\n\n## Compliance Control Mapping\n\n| Framework | Control | What the Gateway Proves |\n|-----------|---------|------------------------|\n| SOC2 CC6.1 | Logical Access Controls | Per-client auth, policy-gated access |\n| SOC2 CC7.1 | Detection and Monitoring | Complete audit trail of all interactions |\n| HIPAA 164.312(b) | Audit Controls | Immutable hash-chain audit trail |\n| HIPAA 164.312(c)(1) | Integrity | Merkle tree verification |\n| HIPAA 164.312(e)(1) | Transmission Security | Content hashing (never stored raw) |\n\n## Using the Actual Tool\n\nThis plugin includes the full source code from [NathanMaine/governed-llm-gateway](https://github.com/NathanMaine/governed-llm-gateway). You can deploy and run the gateway directly.\n\n### Install\n\n```bash\ncd src/\npip install -r requirements.txt\n```\n\n**Requirements:** Python 3.10+, FastAPI, uvicorn, PyYAML, pydantic\n\n### Run the Gateway\n\n```bash\ncd src/\nuvicorn src.app:app --reload\n```\n\nThe gateway starts on `http://127.0.0.1:8000`.\n\n### Send a Request\n\n```bash\ncurl -X POST http://127.0.0.1:8000/v1/chat \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: test-key-1\" \\\n  -d '{\n    \"client_id\": \"dev-local-1\",\n    \"model\": \"default-chat\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Explain rate limiting.\"}],\n    \"data_classification\": \"public\",\n    \"jurisdiction\": \"US\"\n  }'\n```\n\n### Policy Enforcement\n\nRequests containing PII are blocked before reaching any LLM provider:\n\n```bash\ncurl -X POST http://127.0.0.1:8000/v1/chat \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"client_id\": \"dev-local-1\", \"model\": \"default-chat\",\n       \"messages\": [{\"role\": \"user\", \"content\": \"SSN 123-45-6789\"}]}'\n# Returns: {\"error\": {\"type\": \"policy_denied\", ...}}\n```\n\n### Configuration\n\nEdit `src/config/example.config.json` to set providers, API keys, rate limits, and policy file path. Set provider API keys as environment variables:\n\n```bash\nexport OPENAI_API_KEY=sk-your-key-here\n```\n\nCustomize policy rules in `src/config/policies/default.yaml`.\n\n### Generate Compliance Evidence\n\n```python\nfrom src.src.audit import AuditTrail\nfrom src.src.compliance import generate_evidence_package, export_evidence_package\n\ntrail = AuditTrail(\"src/logs/audit.jsonl\")\nentries = trail.read_entries()\n\npackage = generate_evidence_package(\n    entries=entries,\n    control_id=\"164.312(b)\",\n    framework=\"HIPAA\",\n    date_start=\"2025-01-01T00:00:00Z\",\n    date_end=\"2025-03-31T23:59:59Z\",\n)\nexport_evidence_package(package, \"evidence/hipaa-q1-2025.json\")\n```\n\n### Run Tests\n\n```bash\ncd src/\npython3 -m pytest tests/ -v\n```\n\n103 tests covering all modules: app, audit, auth, compliance, config, limiter, policy, and router.\n\n### Project Structure (src/)\n\n```\nsrc/\n  src/\n    app.py          - FastAPI app with /v1/chat endpoint\n    config.py       - Configuration loader\n    models.py       - Request/response Pydantic models\n    provider.py     - Provider adapter (OpenAI-compatible, with stub mode)\n    router.py       - Model alias -> provider routing\n    limiter.py      - In-memory per-client rate limiter\n    telemetry.py    - Structured logging to stdout + log file\n    audit.py        - Immutable hash-chain audit trail\n    policy.py       - Policy-as-code engine (YAML rules)\n    compliance.py   - Compliance evidence collector (SOC2/HIPAA)\n  config/\n    example.config.json     - Sample configuration\n    policies/default.yaml   - Default policy rules\n  tests/                    - 103 tests covering all modules\n  logs/                     - Append-only log output\n```\n\n## Source\n\nBuilt from [NathanMaine/governed-llm-gateway](https://github.com/NathanMaine/governed-llm-gateway) — a production-ready compliance gateway with 103 tests.\n\n## License\n\nMIT\n",
  "bytes": 7115,
  "sha": "f404c175484d779c1f7fac0ac4b6313a2301a75656fb28419383439a4c0e2409",
  "repo_slug": "nathanmaine/memoriant-llm-gateway-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_nathanmaine_memoriant_llm_gateway_skill__e3979062/readme"
}