synaptic-labs-ai/pact-plugin/pact-coding-standards
Claude Code and agent skill by synaptic-labs-ai/pact-plugin
- community
Checking that the SKILL.md file is still in the repository.
Clean code principles, error handling patterns, and coding standards for PACT Code phase. Use when: implementing features, refactoring code, reviewing code quality, establishing coding conventions, or handling errors and exceptions. Triggers on: code quality, clean code, refactoring, error handling, logging patterns, naming conventions, code review, code phase.
Install
npx vskill@latest install synaptic-labs-ai/pact-plugin/pact-coding-standardsSKILL.md
PACT Coding Standards
Clean code principles for the Code phase of PACT. This skill provides essential coding guidelines and links to detailed patterns for implementation.
Core Principles
1. Single Responsibility Principle
Each function, class, or module should have exactly one reason to change.
2. DRY (Don't Repeat Yourself)
Extract duplicated logic into reusable functions.
3. KISS (Keep It Simple, Stupid)
Choose the simplest solution that works.
4. Defensive Programming
Validate inputs, handle edge cases, and fail gracefully.
Naming Conventions
Functions
Variables
Constants
Classes
Error Handling
Fail Fast, Recover Gracefully
Custom Error Classes
For comprehensive error patterns: See references/error-handling-patterns.md
Logging
Log Levels
| Level | When to Use | Example | |
|---|---|---|---|
| ERROR | Failures requiring attention | Database connection failed | |
| WARN | Potentially harmful situations | Rate limit approaching | |
| INFO | Normal operational events | User created, order placed | |
| DEBUG | Detailed debugging info | Function parameters, intermediate values |
Structured Logging
Code Organization
File Size Guidelines
- Maximum file size: 500 lines
- Maximum function size: 50 lines
- Maximum line length: 100 characters
Module Structure
Interpreting design-doc optionals
When a design doc spec'd an OPTIONAL cross-link sentence, closing paragraph, or sister-section reference, the CODE author MUST evaluate the optional content's logical relationship to the preceding paragraph before deciding how to render it.
- Strengthening clause — the optional content reinforces, qualifies, or extends the directive in the preceding paragraph (e.g., a cross-link that tells the reader where the next degree of detail lives). FOLD it inline into the preceding paragraph for tighter prose flow.
- Discursive observation — the optional content introduces a new framing, raises a separate point, or pivots to an adjacent concern. KEEP it as a standalone paragraph.
The judgment lives at write time: read the preceding paragraph and ask "does this optional content add to that paragraph's directive, or does it start a new one?" Strengthening = fold; discursive = keep.
Detection signature
Design-doc phrasings like "CODE may include or drop", "optional closing cross-link", or "optional discursive paragraph" mark the entry condition. Apply the strengthening-vs-discursive judgment before composing the section; do not default to either form mechanically.
Worked example — fold-in cross-link
In pact-plugin/skills/pact-testing-strategies/SKILL.md, the section "Sibling-file convention for parametrized noise-budget regression" closes its canonical-mitigation paragraph with an inline cross-reference to the sister "Author-blindness in HANDOFF arithmetic" section rather than a standalone closing paragraph. The cross-link functions as a strengthening clause on the elevated-priority directive that precedes it — telling the reader where the pair-with-cross-stream-verifier rule lives — so it folds into the same paragraph instead of opening a new one. The fold preserves the cross-reference content while keeping the canonical mitigation a single tight directive.
Code Quality Checklist
Before completing CODE phase:
Structure
- [ ] Functions under 50 lines
- [ ] Files under 500 lines
- [ ] Single responsibility per function/class
- [ ] No deeply nested code (max 3 levels)
Naming
- [ ] Descriptive variable names
- [ ] Consistent naming conventions
- [ ] No abbreviations (except common ones: id, url, api)
- [ ] Boolean variables have is/has/can prefix
Error Handling
- [ ] All async operations have error handling
- [ ] Errors include relevant context
- [ ] No silent failures
- [ ] User-facing errors are friendly
Documentation
- [ ] Complex logic has comments
- [ ] Public APIs have JSDoc/docstrings
- [ ] No commented-out code
- [ ] No TODO comments without tickets
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpact-plugin/skills/pact-coding-standards/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/synaptic-labs-ai/pact-plugin/pact-coding-standards)