pn-slice-contracts

pn-slice-contracts is a skill for Cursor from perniemann/pnCore. It costs 56 tokens per session (1,763 once invoked), scanned A, original, MIT.

A tool for defining shared interface rules between parts of a feature and checking that each part follows them. An interface contract specifies the names and shapes of data exchanged between components or services.

In plain words
What is it for?
Use it to define TypeScript interfaces, JSON Schemas, API stubs, or GraphQL fragments, then run tests that check conformance.
Why use it?
It prevents separately developed parts from using incompatible field names or data formats, reducing merge and integration problems.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { createOrder } from "../api/orders";.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it to define TypeScript interfaces, JSON Schemas, API stubs, or GraphQL fragments, then run tests that check conformance.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore
agentmods
npx agentmods add skills/perniemann/pncore/pn-slice-contracts

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pn-slice-contracts

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-slice-contracts/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-slice-contracts)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-slice-contracts"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-slice-contracts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pn-slice-contracts

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-slice-contracts"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-slice-contracts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01763
Opus 5 $0.00028 $0.00881
Sonnet 5 $0.00011 $0.00353
Haiku 4.5 $0.00006 $0.00176

Measured 9d ago against content hash 11e97ac611b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

pn-slice-contracts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/pn-core-mcp/content/skills/orchestration/pn-slice-contracts/SKILL.md · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Slice contracts

When used as a standalone skill, begin every response with [pn-skill] 🔺

When to use

Use this skill at feature_program step 1 to define and lock interface contracts between slices, and to generate .cursor/worktrees.json. Also use at step 4 (verifier gate) to author contract-conformance tests and interpret verifier reports.

Purpose

Contracts are the seams between slices. They must be locked before fan-out so every slice works against the same interface. Without locked contracts, parallel agents invent incompatible field names (userId vs user_id vs uid) and the merge phase becomes a semantic debugging session.

Contract types and when to use each

Type When Example
TypeScript interfaces Shared data models, request/response shapes in a TS monorepo interface CreateOrderRequest { userId: string; items: OrderItem[] }
JSON Schema Language-agnostic APIs, config files, event envelopes { "type": "object", "properties": { "userId": { "type": "string" } } }
OpenAPI stubs REST endpoints consumed across slices paths: /orders: post: requestBody: ...
GraphQL schema fragment Shared types in a GraphQL API type Order { id: ID! userId: ID! items: [OrderItem!]! }

Use the simplest format that covers the consuming slice's needs. TypeScript interfaces for all-TS repos; OpenAPI stubs when contracts cross language boundaries.

Where contracts live

docs/refs/contracts/<programSlug>/
├── shared-types.ts         ← TypeScript shared interfaces
├── api-stubs.yaml          ← OpenAPI stubs (paths only, no implementation)
├── events.schema.json      ← JSON Schema for event envelopes
└── README.md               ← Contract index (auto-generated at step 1)

Rules:

  • All contract files live in docs/refs/contracts/<programSlug>/.
  • Contract files are read-only to slice worktrees — slices consume but do not edit them.
  • Any edit to contracts re-triggers step 1 review (major patch path).

Read the full file on GitHub · 181 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 181 lines · 56 tokens per session scan A 11e97ac611b9

Subscribe to this mod's changes

pn-slice-contracts is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 6d ago), licensed MIT. It adds 56 tokens to every session and 1,763 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

t-800-run-gates

A set of machine checks for deciding whether a T-800 run is ready to finish. It covers different run modes, such as creating, patching, looping, or auditing.

Khar-AG/t-800-agent · 89 tokens

screen-reader-testing

Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues, or ensuring assistive technology support.

wshobson/agents · 39 tokens

web3-testing

Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.

wshobson/agents · 46 tokens

e2e-testing-patterns

Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment. Use when implementing E2E tests, debugging flaky tests, or establishing testing standards.

wshobson/agents · 51 tokens

implement-universal

Harness-agnostic version of /implement. Drives a single workshop ticket through the SWE→Tester loop in ONE conversation, with the role prompts bundled as agents/software-engineer.md and agents/tester.md instead of being launched as subagents. Resolves the ticket from implementyourself/tasks/, creates an…

Arindam200/awesome-ai-apps · 204 tokens

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

VoltAgent/voltagent · 52 tokens