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.
Resources
2Install
npx skillscat add richfrem/agent-plugins-skills/conventions-agent Install via the SkillsCat registry.
SKILL.md
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
- Tool registration โ all
plugins/scripts registered inplugins/tool_inventory.json - Manifest schema โ use simple
{title, description, files}format (ADR 097)
๐ Header Templates
- Python:
plugins/templates/python-tool-header-template.py - JS/TS:
plugins/templates/js-tool-header-template.js
๐ File Headers
Python
#!/usr/bin/env python3
"""
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
/**
* path/to/file.js
* ================
*
* Purpose:
* Component responsibility and role in the system.
*
* Key Functions/Classes:
* - functionName() - Brief description
*/C#/.NET
// path/to/File.cs
// Purpose: Class responsibility.
// Layer: Service / Data access / API controller.
// Used by: Consuming services.๐ 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
/**
* Fetches RCC data and updates component state.
*
* @param rccId - Unique identifier for the RCC record
* @returns Promise resolving to RCC data object
* @throws {ApiError} If the API request fails
*/๐ 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