Skip to content
Back to skills

Coding Conventions Agent

ASecurity

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.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added June 6, 2026
developmentjavascripttypescriptpythongojavac#apidocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add richfrem/Project_Sanctuary --skill coding-conventions-agent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Coding Conventions Agent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Coding Conventions Agent
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-coding-conventions-agent/badge)](https://www.skillsdirectory.com/skills/richfrem-coding-conventions-agent)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: coding-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`

## πŸ—οΈ Script Architectural Rules

1. **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`).

2. **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.

## πŸ› οΈ Tool Inventory Integration

All Python scripts in `plugins/` **must** be registered in `plugins/tool_inventory.json`.

After creating or modifying a tool, trigger the `tool-inventory` skill to register the script and audit coverage.

### Pre-Commit Checklist
- [ ] File has proper header
- [ ] Script registered in `plugins/tool_inventory.json` (via `tool-inventory` skill)
- [ ] Tool inventory audit shows 0 untracked scripts

Files in this skill

  • SKILL.md4.6 KB
  • evals/evals.json1.3 KB
  • references/DEPENDENCY_MANAGEMENT.md5.3 KB
  • references/SECRETS_CONFIGURATION.md2.7 KB
  • references/UIUX_styling_guidelines_and_guidance.md4.6 KB
  • references/acceptance-criteria.md501 B
  • references/context-spiral-protocol.md2.1 KB
  • references/fallback-tree.md1.3 KB
  • references/file-namespace-and-class-naming-conventions.md5.3 KB
  • references/header_templates.md2.9 KB
  • references/namespace-standardization.md3.5 KB
  • references/parent-project-folder-structure-overview.md2.6 KB
  • references/project-folder-structure-guidance.md4.4 KB
  • references/recent-updates-and-conventions.md4 KB
  • references/shared-block-component-pattern.md3.1 KB
  • references/std_workflow_definition.md2.1 KB
  • rules/coding-conventions.md854 B
  • rules/coding-conventions.mdc854 B
  • templates/js-tool-header-template.js321 B
  • templates/python-tool-header-template.py420 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.