Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By gener8vv0.4.2MITIn 1 marketplace
Code-quality rules for coding agents, with measures: file size and naming, directory and package structure, dependency direction, function size, interfaces and abstraction, tests next to the tested file, duplication, and the behavior rules for a change (scope, errors, tests, dependencies, security, proof before 'done'). A Stop hook measures each turn and blocks once on the findings that the turn caused, including dependencies added without approval. Two skills: rules (before you write code) and self-check (measure and review before you say done).
Claude loads one when your task matches it, or you run it by name.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
code-quality, code-structure, agents, agents-md, linting, maintainability, claude-code
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Coding agents write code faster than people can review it. This repository gives an agent the rules for where code goes, how large it gets, and how to work on a change, and it gives the agent a tool that measures those rules.
AGENTS.md: the index of all rules in one file, to copy into a repository.cq-measure: a command-line tool that measures a repository against the rules. It has no dependencies, and it exits with code 1 on a fail finding so that CI can use it.rules applies before the agent writes code, and self-check applies before the agent says "done".Part A: Structure. Most of these rules have a measure.
| Section | Examples of measures (warn / fail) |
|---|---|
| 1. Files | File length (300 / 500 lines), one concept per file, the file name matches the class, one role suffix per role, one case convention per language |
| 2. Directories | Root files (15 / 25), source files per directory (12 / 20), depth (5 / 7), no utils or helpers, paths that start with a domain function |
| 3. Packages | No deep imports, relative climbs (2 / 3), dependencies point inward, no import cycles, fan-out (12 / 20) |
| 4. Functions and classes | Function length (40 / 80), nesting (3 / 4), complexity (10 / 15), parameters (4 / 6), methods per class (15 / 25) |
| 5. Interfaces and abstraction | Interfaces with one implementation, interface size (7 / 12), pass-through layers, inheritance depth (2 / 3) |
| 6. Test placement | Unit tests next to the tested file, test files named for their subject, files with no test |
| 7. Duplication and dead code | Copied blocks, orphan files, unused names, commented-out code |
Part B: Behavior. Most of these rules need judgment: scope of a change, read before you write, names in code, data and types, errors, test discipline, comments, third-party dependencies, security hygiene, performance, and the proof before "done". Five of them have a measure: type escapes, swallowed errors, TODOs without an issue, secrets in code, and debug output.
Copy AGENTS.md into the root of your repository. Codex, Cursor, Copilot, Gemini CLI, and other agents that read AGENTS.md load it. For Claude Code, add it to CLAUDE.md, or install the plugin.
Measure a repository with no installation (Python 3.10 or later):
uvx --from git+https://github.com/gener8v/gener8v.guidelines.code-quality cq-measure .
Useful options:
| Option | Effect |
|---|---|
--changed-since origin/main | Measures the whole repository, and reports only findings in the changed files |
--format json | Gives JSON for an agent or a script |
--format sarif | Gives SARIF 2.1.0 for GitHub code scanning and other SARIF readers |
--write-baseline | Records every finding of the repository in .code-quality-baseline.json |
--baseline FILE / --no-baseline | Uses a different baseline file, or reports every finding |
--fail-on warn | Exits with code 1 on a warn finding too |
--only file-lines,import-cycle | Runs only the named checks |
--list-checks | Lists each check with its rule and limits |
An existing repository usually has many findings on the first run. To fail only on new findings, record the current ones in a baseline, and commit the file:
cq-measure . --write-baseline
git add .code-quality-baseline.json
When .code-quality-baseline.json exists, cq-measure uses it. A finding in the baseline does not fail. A new finding fails as usual. These changes make a finding new:
warn to fail, for example a file that grows from 341 lines to 520.A line that moves, or a value that changes inside the same severity, does not make a finding new. When you correct baselined findings, the report says how many are fixed. Run --write-baseline again to record the gain, so that they cannot come back.
jobs:
code-quality:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: gener8v/gener8v.guidelines.code-quality@main
with:
fail-on: fail
The action measures the repository, writes the report to the job summary, and uploads the findings to GitHub code scanning, so that they show on the lines of a pull request. Private repositories need GitHub Advanced Security for code scanning. Without it, set upload-sarif: "false". Other inputs: path, changed-since (check out with fetch-depth: 0), baseline, and typescript.
npx claudepluginhub gener8v/gener8v.guidelines.code-quality --plugin code-qualityPlugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.