agentleFS
4444J994444J99/a-i--skills/skills/development/coding-standards-enforcer/SKILL.md

coding-standards-enforcer

Skill17 starsChanged 5 months agoApache-2.0Archived repositoryView on GitHub

Automated code style enforcement with linters, formatters, and pre-commit hooks for consistent codebases

  • Installs packages

1 other project uses a version of this.

The file

Files
SKILL.md

Coding Standards Enforcer

Automate code quality and consistency with linters, formatters, and hooks.

ESLint Configuration

// .eslintrc.js
module.exports = {
  extends: [
    'eslint:recommended',
    'plugin:@typescript-eslint/recommended',
    'plugin:react/recommended',
    'prettier'
  ],
  rules: {
    'no-console': 'warn',
    '@typescript-eslint/no-unused-vars': 'error',
    '@typescript-eslint/explicit-function-return-type': 'warn',
    'react/prop-types': 'off',
    'complexity': ['warn', 10],
    'max-lines-per-function': ['warn', 50]
  }
};

Prettier Configuration

{
  "semi": true,
  "singleQuote": true,
  "trailingComma": "es5",
  "printWidth": 100,
  "tabWidth": 2,
  "arrowParens": "avoid"
}

Pre-commit Hooks

// package.json
{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{ts,tsx}": [
      "eslint --fix",
      "prettier --write"
    ],
    "*.{json,md}": [
      "prettier --write"
    ]
  }
}

Git Hooks Setup

# Install husky
npm install --save-dev husky lint-staged

# Initialize husky
npx husky install

# Add pre-commit hook
npx husky add .husky/pre-commit "npx lint-staged"

Naming Conventions

// PascalCase for classes and types
class UserService {}
type UserData = {};

// camelCase for functions and variables
function getUserById() {}
const userName = 'John';

// UPPER_SNAKE_CASE for constants
const MAX_RETRY_COUNT = 3;
const API_BASE_URL = 'https://api.example.com';

// kebab-case for files
// user-service.ts
// api-client.ts

Integration Points

Complements:

  • verification-loop: For pre-commit validation
  • tdd-workflow: For test standards
  • code-refactoring-patterns: For style improvement

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.