CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

coding-guidelines-generator

Use when asked to generate or set up coding guidelines, detect my stack, generate AGENTS.md rules, create stack-specific conventions, set up agent guidelines, or configure coding guidelines for this repo on first use in a codebase. Deterministically detects tech stack layers, confirms with the user, generates tailored guidelines from modular references, and links them from AGENTS.md without overwriting user content. Excludes general code review, linter/formatter configuration, or CI pipeline setup.

71

Quality

89%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Coding Guidelines Generator

Deterministic router for generating and maintaining modular stack guidelines.

Routing Table

Detected Stack / LayerReference FileTarget Output FileLoad Condition
Android (Compose / XML)references/android.mdAGENTS-GUIDELINES-ANDROID.mdAndroid plugin, AndroidManifest.xml
JavaScript / Node.jsreferences/javascript.mdAGENTS-GUIDELINES-JS.mdpackage.json, .js/.mjs files
TypeScriptreferences/typescript.mdAGENTS-GUIDELINES-JS.mdtsconfig*.json or typescript dependency
Reactreferences/react.mdAGENTS-GUIDELINES-REACT.mdreact dependency (names JS/TS layer)
Next.js (App/Pages)references/nextjs.mdAGENTS-GUIDELINES-NEXTJS.mdnext dependency (names React & JS/TS layers)
Python (+ FastAPI/Django/Flask)references/python.mdAGENTS-GUIDELINES-PYTHON.mdpyproject.toml, requirements*.txt, uv.lock
PHPreferences/php.mdAGENTS-GUIDELINES-PHP.mdcomposer.json, *.php
WordPress (Theme/Plugin/Site)references/wordpress.mdAGENTS-GUIDELINES-WORDPRESS.mdstyle.css (Theme Name), plugin header, wp-config.php
Goreferences/go.mdAGENTS-GUIDELINES-GO.mdgo.mod
Rustreferences/rust.mdAGENTS-GUIDELINES-RUST.mdCargo.toml
Shellreferences/shell.mdAGENTS-GUIDELINES-SHELL.mdSubstantive standalone shell project
HTML / CSSreferences/html-css.mdAGENTS-GUIDELINES-HTML-CSS.mdStatic web without JS/backend framework
Java / Kotlin (Backend)references/java.mdAGENTS-GUIDELINES-JAVA.mdNon-Android JVM Gradle/Maven project
Unknown / Otherreferences/generic.mdAGENTS-GUIDELINES-GENERIC.mdUnrecognized stack fallback

Conflict Policy

Stack guidelines may only be stricter than the portable baseline on security, authorization, data protection, and verification. They never weaken baseline rules. Material conflicts must be surfaced to the user, never silently resolved.

Monorepo Collision Resolution

  • If a package directory has its own AGENTS.md, write guideline files next to it.
  • Otherwise, generate one guideline file per stack next to root AGENTS.md, listing the directories it covers.

Execution Workflow

  1. Read Environment: Inspect existing AGENTS.md, CLAUDE.md, manifests, and git status. Never overwrite uncommitted user changes. If not a git repo, note it.
  2. Detect Stack:
    • Run python3 scripts/detect_stack.py --root .
    • Manual Fallback (if python3 missing): Check signature files from Routing Table manually. Treat package.json in PHP/WordPress/Android as secondary tooling.
  3. Confirm or Ask: Present detected stacks, versions, real commands, and target paths in one concise message. If ambiguous, ask once. Support dry-run (--dry-run), refresh, and remove (--remove) modes. Never write before confirmation.
  4. Baseline Check: If AGENTS.md lacks the portable baseline, propose adding assets/baseline.md (150-250 words, merged additively).
  5. Generate Guidelines:
    • Generate each required guideline file for detected stacks (including full layer chains: e.g. Next.js generates JS, React, and Next.js files; WordPress generates PHP and WordPress files).
    • Each layer contains only its own layer's rules and names lower layers in one line.
    • Upsert content between marker pair: <!-- stack-guidelines:start skill=1.1.0 verified=YYYY-MM-DD hash=<hash> --> using scripts/upsert_section.py --file <path> --content-file <ref> --hash --substitute pm=<pm>.
    • Never alter text outside the markers.
  6. Link from AGENTS.md: Upsert managed section using the dynamic links generated by detect_stack.py (or templating assets/agents-md-section.md with only detected files) between <!-- stack-guidelines:start --> and <!-- stack-guidelines:end -->. Never link to ungenerated stack files. Place at the bottom by default (ask if top preferred).
  7. Report: Summarize detected stacks, created/updated files, hash status, and unverified items. Re-running on unchanged code is byte-identical.
Repository

administrakt0r/pro-skills-repo-administraktor

Path

skills/development-skills/coding-guidelines-generator/SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.