pn-discipline-philosophy

pn-discipline-philosophy is a skill for Cursor from perniemann/pnCore. It costs 66 tokens per session (1,613 once invoked), scanned A, original, MIT.

A set of software-engineering rules for making changes in small, testable steps and confirming the cause of a problem before fixing it. TDD, or test-driven development, means writing a failing test before the production code.

In plain words
What is it for?
Use it when implementing features, debugging failures, planning work, reviewing changes, or setting team development practices.
Why use it?
It helps reduce untested changes, guesswork, unnecessary refactoring, and scope creep.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

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

Good fit Use it when implementing features, debugging failures, planning work, reviewing changes, or setting team development practices.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-discipline-philosophy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add perniemann/pnCore --skill pn-discipline-philosophy
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

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-discipline-philosophy

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-discipline-philosophy/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-discipline-philosophy)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-discipline-philosophy"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-discipline-philosophy/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-discipline-philosophy

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-discipline-philosophy"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-discipline-philosophy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,613 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.00066 $0.01613
Opus 5 $0.00033 $0.00807
Sonnet 5 $0.00013 $0.00323
Haiku 4.5 $0.00007 $0.00161

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

Security

Grade A, and why

pn-discipline-philosophy 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 8d 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/discipline/pn-discipline-philosophy/SKILL.md · 189 lines

How it starts

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

Engineering Discipline Philosophy

Purpose

Use this as a discipline rulebook for:

  • Test-driven development (TDD)
  • Systematic debugging and root cause analysis
  • Implementation planning and work breakdown
  • Code quality and verification
  • Minimal, evidence-based change

It unifies how to work: test-first, confirm-before-fix, incremental, verifiable.

When to use

  • Implementing features or fixes (TDD workflow)
  • Debugging failures with unclear cause
  • Planning multi-step implementation
  • Establishing team or AI agent discipline
  • Reviewing for guess-and-patch, untested changes, or scope creep

For workflow, audit checklist, and templates, see reference.md.


Core Philosophy (non-negotiables)

Test before production code

Do not write production code before a failing test. If production code exists without a failing test, remove it and write the failing test first. Red–Green–Refactor: smallest failing test, minimal code to pass, then refactor.

Root cause before fix

Reproduce → Isolate → Hypothesize → Confirm. Do not guess-and-patch. One hypothesis at a time; confirm or reject before the next. Fix only after root cause is confirmed.

Minimal change

Smallest change that fixes the problem. Prefer targeted fixes over broad edits. Refactor only after tests pass. No "while I'm here" scope expansion without a new test.

Measure before optimize

No performance work without a recorded baseline. State the metric (LCP, INP, query ms, allocation count), the measured current value, and the target. Optimization without numbers is decoration. Profile → identify hot path → change → re-measure. Reject "should be faster" — show the delta.

Goodhart's Law caveat. Once a metric becomes a target (a KPI, a budget cap, a "must hit"), it stops being a measure of the underlying property — it measures only itself. Token usage, test count, lighthouse score, "skills loaded" — useful as feedback, dangerous as goals. When citing a metric, state whether it is feedback or target; never optimize a target without also tracking the property it was meant to proxy.

Read the full file on GitHub · 189 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 189 lines · 66 tokens per session scan A fc55e86b5123

Subscribe to this mod's changes

pn-discipline-philosophy is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 5d ago), licensed MIT. It adds 66 tokens to every session and 1,613 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.