{
  "markdown": "# Pact Kit\n\nDomain knowledge and workflow automation for Pact 5 / KDA-CE smart contract development —\npackaged for Claude Code, Codex, and Gemini CLI.\n\n[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square)](LICENSE)\n[![npm](https://img.shields.io/npm/v/@pact-community/pact-kit?style=flat-square&color=cb3837)](https://www.npmjs.com/package/@pact-community/pact-kit)\n[![Release](https://img.shields.io/github/v/release/Pact-Community-Organization/pact-kit?style=flat-square)](https://github.com/Pact-Community-Organization/pact-kit/releases)\n\n---\n\n## Requirements\n\n- **Claude Code**, **Codex**, or **Gemini CLI** — see [Tool Support](docs/agent-portability.md) for per-host details\n- **git** and **bash** — only needed for the curl-pipe installer\n- **Pact 5.4ce** — the [KDA-CE](https://github.com/kda-community/pact-5) fork of kadena-io/pact-5\n\n---\n\n## Install\n\n**Claude Code**\n```bash\nclaude plugins add Pact-Community-Organization/pact-kit\n```\n\n**Codex**\n```bash\ncodex plugins add Pact-Community-Organization/pact-kit\n```\n\n**Gemini CLI**\n```bash\ngemini extension install https://github.com/Pact-Community-Organization/pact-kit\n```\n\n**Any host — installs directly into `~/.claude/`**\n```bash\nbash <(curl -fsSL https://raw.githubusercontent.com/Pact-Community-Organization/pact-kit/main/scripts/install.sh)\n```\n\nThe installer merges into `~/.claude/` and never removes existing files. Safe to run again after updates.\n\n---\n\n## Getting Started\n\nAfter installing, open a Pact project in Claude Code:\n\n```\n/new-pact-module          scaffold a new module with REPL tests and a deploy script\n/validate-pact-module     run the 4-phase validation: REPL analysis → devnet deploy → verify\n/gas-analysis             measure gas per function against the 150k ceiling\nsecurity review           invoke the independent auditor before shipping any module\n```\n\nCopy the starter configuration and fill in the identity placeholder:\n\n```bash\ncp ~/.claude/CLAUDE.md.template ~/.claude/CLAUDE.md\n```\n\nThen add the hooks snippet from `~/.claude/CLAUDE.md.template` to `~/.claude/settings.json`\nto enable automatic static analysis on every `.pact` and `.repl` edit.\n\n---\n\n## What's Included\n\n### Skills\n\n25 domain skills covering the full Pact 5 / KDA-CE surface. Loaded on demand — your AI\nassistant draws on precise, current knowledge for the task without carrying it in every session.\n\n| Area | What it covers |\n|---|---|\n| Core language | Capabilities, guards, schema design, module architecture, interfaces, defpacts, events, invariants |\n| Testing & validation | REPL test patterns, devnet workflows, 4-phase module validation, CLI tooling, debugging |\n| Security & correctness | Security review, capability audits, fungible-v2 / xchain-v1 compliance, formal verification, offensive red-team testing |\n| Gas & cross-chain | Gas analysis against the 150k ceiling, gas station design, cross-chain transfer patterns |\n| Platform | KDA-CE network compliance, devnet lifecycle management |\n\n### Slash Commands\n\n21 commands covering the full development lifecycle. Type `/command-name` in Claude Code.\n\n| Command | What it does |\n|---|---|\n| `/new-pact-module` | Scaffold module + REPL tests + deploy script |\n| `/design-defpact` | defpact steps, yield/resume, SPV, rollback, and test plan |\n| `/generate-repl-tests` | REPL test suite from an ADR or acceptance criteria |\n| `/generate-integration-stubs` | TypeScript `@kadena/client` stubs for a module |\n| `/validate-pact-module` | 4-phase validation: REPL analysis → REPL exec → devnet deploy → verify |\n| `/verify-pact-module` | Formal verification and typecheck |\n| `/capability-audit` | Capability hierarchy map with bypass path analysis |\n| `/pact-security-audit` | Security-focused code review checklist |\n| `/full-security-audit` | 5-phase audit (in-session; use `pact-auditor` for pre-ship reviews) |\n| `/red-team` | Executable offensive pass: runs real `.repl` attacks and proves HELD/BROKEN |\n| `/security-assessment` | STRIDE per public function with attack simulation |\n| `/threat-model` | STRIDE threat model with attack trees and mitigations |\n| `/analyze-feature` | 7-step impact analysis before implementing a feature |\n| `/architecture-lockdown` | Architecture freeze: options → decision → ADR outputs |\n| `/architecture-review` | Review an ADR or proposal for gas, DAG acyclicity, KDA-CE compliance |\n| `/design-test-suite` | Test suite design from ADRs and acceptance criteria |\n| `/deploy-to-devnet` | Ordered deploy with gas tracking and a verification report |\n| `/gas-analysis` | Gas per function vs. 150k ceiling with baseline comparison |\n| `/migrate-pact-schema` | New table, admin migration functions, bless list, row-count test |\n| `/developer-handoff` | Implementation spec: schemas, capabilities, gas estimate, deploy notes |\n| `/review-pr` | Dual-scope review: isolated diff + full regression |\n\n### Behavioral Instructions\n\n16 instruction files that load automatically based on the files you're editing. Opening a\n`.pact` or `.repl` file activates Pact language rules, trap avoidance, and security checklists.\nDeployment, testing, gas, and refactoring rules activate for their respective contexts.\n\n### Security Agents\n\nTwo fresh-context agents with no implementation history, one defensive and one offensive.\n\n`pact-auditor` **reviews**. Invoke it by saying `security review` or `ready to ship` in\nClaude Code. It runs a 5-step protocol — static analysis, capability audit, Pact 5.4ce trap\ncheck, security checklist, and STRIDE per public function — and returns a structured finding\ntable.\n\n`red-team-attacker` **attacks**. Given one module and one front, it writes and executes real\n`.repl` attacks (20 mutations per front) with the `pact` CLI, applies the REPL-artifact\nfilter, and reports HELD or BROKEN with reproducible proof — the offensive counterpart driven\nby the `/red-team` command.\n\n### Examples\n\n`examples/example-token.pact` + `examples/example-token.repl` — a runnable, CI-verified\nreference module demonstrating the conventions the kit enforces (capability layering,\nmanaged caps, principal discipline, trust-boundary validation, node-safe enforce patterns).\n\n### Reference Repositories\n\n[docs/reference-repos.md](docs/reference-repos.md) — the vetted primary sources (language\nrepo, official docs, pact-util-lib, production contracts) and the idioms they agree on.\nWhen in doubt, primary sources beat web search results and model memory.\n\n### CI Scripts\n\n`pact-static-check.sh` is a two-tier static analysis gate (Pact CLI + semantic greps).\nConfigure it as a `PostToolUse` hook to run automatically on every `.pact` and `.repl` edit.\n`session-end-secrets-scan.sh` scans modified files for credential patterns at session end.\nThe hooks configuration snippet is in `~/.claude/CLAUDE.md.template`.\n\n---\n\n## Contributing\n\nOpen an issue or discussion before submitting a PR. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n---\n\n[Apache-2.0 License](LICENSE) · [Changelog](CHANGELOG.md) · [Security Policy](SECURITY.md) · [Code of Conduct](CODE_OF_CONDUCT.md)\n",
  "bytes": 7070,
  "sha": "7b2f35df1beb516154aee317ecb1066358a874d6592ea2784bd4279efa95d989",
  "repo_slug": "pact-community-organization/pact-kit",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_pact_community_organization_pact_kit_baa644c0/readme"
}