Coding conventions agent
Skill richfrem/agent-plugins-skills/plugins/dev-utils/skills/coding-conventions-agent
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.From its SKILL.md
npx -y skills add richfrem/agent-plugins-skills --skill coding-conventions-agentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.9 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
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 project-wide coding policy alignment across all scripts and code.
Your Mission: Ensure 100% codebase compliance with .agent/rules/ policies so that:
- Policies are consistently enforced - No scripts are exempt or grandfathered in
- Fresh agents can understand code at a glance - First 20 lines answer: what/why/how/dependencies
- Code quality is uniform - Standards are applied systematically, not ad-hoc
Authority: All standards defined in .agent/rules/coding-conventions.md and related policy files
π« 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
#!/usr/bin/env 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
/**
* path/to/file.js
* ================
*
* Purpose:
* Component responsibility and role in the system.
*
* Key Functions/Classes:
* - functionName() - Brief description
*/
TSX (React Components)
/**
* ComponentName (React Component)
* =====================================
*
* Purpose:
* Component responsibility and role in the UI.
*
* Layer: Frontend / UI / Layout
*
* Usage Examples:
* <ComponentName />
*
* Props:
* - propName: description
*
* Key Functions:
* - handleEvent() - 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
ποΈ Script Architectural Rules
-
Cross-Plugin Dependencies (ADR-001):
- Never execute another plugin's scripts directly via
subprocessorpython ../../. - 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).
- Never execute another plugin's scripts directly via
-
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 consumingskills/directory.
- Single-Skill Usage: Place script physically inside the owning skill directory (
Pre-Commit Checklist
- File has proper header
- Type hints are complete
- Docstrings follow Google style
- Dual-layer documentation applied (comment + docstring)
π Automated Compliance Checks
To check files across the workspace for alignment with these conventions, run the developer conventions auditor utility:
python3 plugins/dev-utils/scripts/workspace_conventions_auditor.py
This utility parses AST trees for Python and matches regex structures for JavaScript and TypeScript files, generating a comprehensive report under temp/workspace_conventions_report.md.
What ships with it: 27 files
3.6 KB alongside SKILL.md, 4 of them executable
assets/
evals/
- evals.json696 B
- results.tsv301 B
references/
- acceptance-criteria.md42 B
- coding-conventions.md36 B
- context-spiral-protocol.md46 B
- DEPENDENCY_MANAGEMENT.md44 B
- fallback-tree.md36 B
- file-namespace-and-class-naming-conventions.md66 B
- header_templates.md39 B
- namespace-standardization.md48 B
- parent-project-folder-structure-overview.md63 B
- project-folder-structure-guidance.md56 B
- recent-updates-and-conventions.md53 B
- requirements.txt36 B
- SECRETS_CONFIGURATION.md44 B
- shared-block-component-pattern.md53 B
- spec-driven-development-policy.md48 B
- std_workflow_definition.md46 B
- UIUX_styling_guidelines_and_guidance.md59 B
scripts/
- workspace_conventions_auditor.pyruns49 B
- acceptance-criteria.md501 B
- fallback-tree.md1.0 KB
- requirements.txt22 B