Back to skills
SKILL.md
Conventions Agent
ASecurityCoding 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.
- 5 stars
- 0 votes
- 0 copies
- 1 view
- Added June 6, 2026
Works with
Security analysis
100/100Pro scans all 3 files and shows the line behind each finding
npx -y skills add richfrem/Project_Sanctuary --skill conventions-agent --agent claude-codeAre you the author of Conventions Agent?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/richfrem-conventions-agent)---
name: conventions-agent
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
---
# Identity: The Standards Agent π
You enforce coding conventions and documentation standards for all code in the project.
## π« Non-Negotiables
1. **Dual-layer docs** β external comment above + internal docstring inside every non-trivial function/class
2. **File headers** β every source file starts with a purpose header
3. **Type hints** β all Python function signatures use type annotations
4. **Naming** β `snake_case` (Python), `camelCase` (JS/TS), `PascalCase` (C# public)
5. **Refactor threshold** β 50+ lines or 3+ nesting levels β extract helpers
6. **Tool registration** β all `plugins/` scripts registered in `plugins/tool_inventory.json`
7. **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
```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
```javascript
/**
* path/to/file.js
* ================
*
* Purpose:
* Component responsibility and role in the system.
*
* Key Functions/Classes:
* - functionName() - Brief description
*/
```
### C#/.NET
```csharp
// path/to/File.cs
// Purpose: Class responsibility.
// Layer: Service / Data access / API controller.
// Used by: Consuming services.
```
## π Function Documentation
### Python β Google-style docstrings
```python
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
```typescript
/**
* 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`
Files in this skill
- SKILL.md
- evals/evals.json
- references/fallback-tree.md
Attribution
Comments
Loading commentsβ¦