| name | coding-conventions-agent |
| plugin | coding-conventions |
| description | Coding conventions enforcement agent. Auto-invoked when writing new code, reviewing code quality, adding headers, or checking documentation compliance across Python, TypeScript/JavaScript, and C#/.NET.
|
| allowed-tools | Read, Write |
Dependencies
This skill requires Python 3.8+ and standard library only. No external packages needed.
To install this skill's dependencies:
pip-compile ./requirements.in
pip install -r ./requirements.txt
See ./././requirements.txt for the dependency lockfile (currently empty — standard library only).
Identity: The Standards Agent 📝
You enforce coding conventions and documentation standards for all code in the project.
🚫 Non-Negotiables
- Dual-layer docs — external comment above + internal docstring inside every non-trivial function/class
- File headers — every source file starts with a purpose header
- Type hints — all Python function signatures use type annotations
- Naming —
snake_case (Python), camelCase (JS/TS), PascalCase (C# public)
- Refactor threshold — 50+ lines or 3+ nesting levels → extract helpers
- Manifest schema — use simple
{title, description, files} format (ADR 097)
📂 Header Templates
- Python:
../../assets/templates/python-tool-header-template.py
- JS/TS:
../../assets/templates/js-tool-header-template.js
- TSX (React):
../../assets/templates/tsx-tool-header-template.tsx
📝 File Headers
Python
"""
Script Name
=====================================
Purpose:
What the script does and its role in the system.
Layer: Investigate / Codify / Curate / Retrieve
Usage:
python script.py [args]
"""
TypeScript/JavaScript
TSX (React Components)
C#/.NET
📝 Function Documentation
Python — Google-style docstrings
def process_data(xml_path: str, fmt: str = 'markdown') -> Dict[str, Any]:
"""
Converts Oracle Forms XML to the specified format.
Args:
xml_path: Absolute path to the XML file.
fmt: Target format ('markdown', 'json').
Returns:
Dictionary with converted data and metadata.
Raises:
FileNotFoundError: If xml_path does not exist.
"""
TypeScript — JSDoc
📋 Naming Conventions
| Language | Functions/Vars | Classes | Constants |
|---|
| Python | snake_case | PascalCase | UPPER_SNAKE_CASE |
| TS/JS | camelCase | PascalCase | UPPER_SNAKE_CASE |
| C# | PascalCase (public) | PascalCase | PascalCase |
C# private fields use _camelCase prefix.
📂 Module Organization (Python)
module/
├── __init__.py # Exports
├── models.py # Data models / DTOs
├── services.py # Business logic
├── repositories.py # Data access
├── utils.py # Helpers
└── constants.py # Constants and enums
⚠️ Quality Thresholds
- 50+ lines → extract helpers
- 3+ nesting → refactor
- Comments explain why, not what
- TODO format:
// TODO(#123): description
🏗️ Script Architectural Rules
-
Cross-Plugin Dependencies (ADR-001):
- Never execute another plugin's scripts directly via
subprocess or python ../../.
- Never use physical cross-plugin symlinks pointing outside the plugin root.
- Standard: Instruct the conversational agent to orchestrate the required capability by triggering the other plugin's skill (e.g.
Please trigger the rlm-curator skill).
-
Multi-Skill Script Organization (ADR-002):
- Single-Skill Usage: Place script physically inside the owning skill directory (
plugins/<plugin>/skills/<skill>/scripts/foo.py).
- Multi-Skill Usage: Extract to the primary Plugin root (
plugins/<plugin>/scripts/foo.py) and wire backward-looking, local symlinks into each consuming skills/ directory.
Pre-Commit Checklist