postels-law
Skill6 starsChanged 34 days agoMITView on GitHub
Apply Postel's Law when designing APIs, data interchange formats, network protocols, input validation, or any interface that will receive data from other systems or users. Trigger on phrases like "how strict should our API be?", "should we accept slightly malformed input?", "what should we send vs. accept?", "how do we handle unexpected fields?", or any question about the balance between strictness and permissiveness in an interface design. Postel's Law is a foundational principle of robust interface design, with important modern caveats.
In this repository79 other files it gives its agents.
- adr-phase-coverageSkill
- aposd-red-flag-reviewSkill
- apple-on-device-aiSkill
- artifact-gatesSkill
- asc-app-create-uiSkill
- asc-build-lifecycleSkill
- asc-cli-usageSkill
- asc-crash-triageSkill
- asc-id-resolverSkill
- asc-localize-metadataSkill
- asc-metadata-syncSkill
- asc-notarizationSkill
- asc-ppp-pricingSkill
- asc-release-flowSkill
- asc-revenuecat-catalog-syncSkill
- asc-shots-pipelineSkill
- asc-signing-setupSkill
- asc-submission-healthSkill
- asc-subscription-localizationSkill
- asc-testflight-orchestrationSkill
- asc-wall-submitSkill
- asc-workflowSkill
- asc-xcode-buildSkill
- choose-boring-technologySkill
- ci-preflightSkill
- conways-lawSkill
- cost-routingSkill
- cost-tier-routingSkill
- cunninghams-lawSkill
- ddd-strategic-auditSkill
- ddd-tactical-reviewSkill
- debug-test-captureSkill
- developing-ios-appsSkill
- doerrs-lawSkill
- fitts-lawSkill
- fix-regression-guardSkill
- galls-lawSkill
- goodharts-lawSkill
- greenspuns-tenth-ruleSkill
- gsd-core-hooksSkill
- hofstadters-lawSkill
- hyrums-lawSkill
- ios-accessibilitySkill
- ios-simulator-boot-healthSkill
- kerckhoffs-principleSkill
- kernighans-lawSkill
- knuths-optimization-principleSkill
- lady-lovelaces-objectionSkill
- leaky-abstractionsSkill
- linuss-lawSkill
- mobile-ios-designSkill
- money-boundary-judgmentSkill
- moores-lawSkill
- no-deferSkill
- norvigs-lawSkill
- parkinsons-lawSkill
- peter-principleSkill
- post-fix-traceSkill
- qa-test-architectSkill
- rubber-duckSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
When building systems that communicate with other systems, Postel recommended:
- Distinctive: line 14
Send only well-formed, minimal, correct data: Don't rely on the other side tolerating your quirks.
- Distinctive: line 23
Interoperability requires tolerance: When you have many producers of data and many consumers, allowing slightly varied input enables the …
- Distinctive: line 40
Don't rely on the other side tolerating your quirks.
- Distinctive: line 43
When accepting imperfect input, prefer to:
- Distinctive: line 59
If we accept this slightly malformed input silently, will the sender ever know they're sending bad data?
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Postel's Law (Robustness Principle)
"Be conservative in what you send, liberal in what you accept." — Jon Postel, RFC 760, 1980
The core idea
When building systems that communicate with other systems, Postel recommended:
- Send only well-formed, minimal, correct data. Don't rely on the other side tolerating your quirks.
- Accept data that is slightly off. Be forgiving of minor variations, extra fields, or slightly non-standard inputs from senders.
This principle shaped the early internet. HTML parsers that accepted malformed tags, TCP stacks that handled variations in packet formatting — the early web grew partly because implementors were lenient about what they accepted.
The case for it
Real-world senders make mistakes. Other systems, other developers, other versions of software — they will send you data that is slightly wrong. If you reject anything imperfect, you become brittle and hard to integrate with.
Interoperability requires tolerance. When you have many producers of data and many consumers, allowing slightly varied input enables the ecosystem to grow. Strict rejection creates integration friction.
Graceful degradation. A system that accepts imperfect input can provide partial value; one that rejects it provides none.
The modern critique — and important caveats
Postel's Law has critics, and their arguments are strong enough to warrant caution:
Permissive acceptance hides bugs. When you silently accept malformed input and make sense of it, the sender never finds out they're sending bad data. You've obscured an error that should have been fixed at the source. Over time this creates "compatibility debt" — everyone depends on your interpretation of malformed data.
Security vulnerabilities. Many security exploits rely on parsers accepting inputs that are technically invalid. Permissive HTML parsing has been a rich source of XSS vulnerabilities. Permissive SQL parsing has enabled injection attacks. Being liberal in what you accept often means being liberal in what you execute.
The "HTML lesson." The web's legacy of permissive HTML parsing created enormous complexity. Browsers must maintain compatibility with decades of broken HTML, and the parsing rules are extraordinarily complex as a result.
How to apply it thoughtfully
Be conservative in what you send — always. Don't rely on the other side tolerating your quirks. Send clean, minimal, well-specified data. This is almost universally good advice.
Be "liberal" carefully and visibly — not silently. When accepting imperfect input, prefer to:
- Log what you received and what you did with it
- Return warnings alongside the response
- Normalize input and tell the sender what you normalized
- Reject with a clear, helpful error message rather than silently "fixing" it
Fail loudly on ambiguous input. "Liberal" should not mean "guess silently." Prefer explicit handling over implicit interpretation.
Apply the principle at different levels differently.
- Public APIs used by many developers: stricter acceptance, better error messages
- Internal system-to-system: stricter on both sides; control both ends
- User-facing input (forms, natural language): more liberal; users make typos
Key questions to surface
- If we accept this slightly malformed input silently, will the sender ever know they're sending bad data?
- Does being liberal in what we accept here create a security risk?
- Can we be liberal but visible — accepting the input while logging or warning?
- Are we being conservative enough in what we send, so we don't impose our quirks on receivers?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

