Best for
- Defining or enforcing clean code rules across teams and languages.
- Reviewing code: cite CC- IDs and avoid restating standards in reviews.
- Building automation: map linters/CI gates to CC- IDs.
vasilyu1983/AI-Agents-public/frameworks/shared-skills/skills/software-clean-code-standard/SKILL.md
Defines clean-code standards and CC-* rules. Use when reviewing code, setting team standards, citing lint findings, or measuring erosion, complexity mass, and verbosity.
Decision brief
This skill is the authoritative clean code standard for this repository's shared skills. It defines stable rule IDs (CC-), how to apply them in reviews, and how to extend them safely via language overlays and explicit exceptions.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/software-clean-code-standard"Inspect the Agent Skill "software-clean-code-standard" from https://github.com/vasilyu1983/AI-Agents-public/blob/53f6cb73ea53a2646e3e7d4665062ad66f3683ac/frameworks/shared-skills/skills/software-clean-code-standard/SKILL.md at commit 53f6cb73ea53a2646e3e7d4665062ad66f3683ac. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Decide whether the request is about a base rule, an overlay, or an exception. 2. Route security, review-process, or refactoring mechanics to the adjacent skill if that is the real problem. 3. Anchor the guidance in existing CC- rules before proposing new wording or automation…
1. Check official docs first for the named tool(s): current docs, release notes/changelog, migration guidance, and supported workflows. 2. Check the official standard/spec when relevant: RFCs, OWASP, NIST, OpenTelemetry, GitHub Docs. 3. Use web search for cross-tool comparisons…
Review the “Quick Reference” section in the pinned source before continuing.
Defining or enforcing clean code rules across teams and languages.
Deep security audits → software-security-appsec for OWASP/SAST deep dives beyond CC-SEC- baseline.
Permission review
The documentation includes network, browsing, or remote request actions.
Use web search/web fetch to verify current external facts, versions, pricing, deadlines, regulations, or platform behavior before final answers.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 97/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 82 | Source | Repository attention, not individual Skill quality |
| Compatibility | 2 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
This skill is the authoritative clean code standard for this repository's shared skills. It defines stable rule IDs (CC-*), how to apply them in reviews, and how to extend them safely via language overlays and explicit exceptions.
Modern Best Practices: Prefer small, reviewable changes and durable change context. Use BCP 14 normative language consistently (RFC 2119 + RFC 8174). Treat security-by-design and secure defaults as baseline (OWASP Top Ten 2025, NIST SSDF). Prefer GitHub rulesets over branch-protection-only governance. Build observable systems with OpenTelemetry. For current tool choices, consult data/sources.json and prefer official docs first.
Judgment over dogma: This standard's CC-* rules are durable (coupling/cohesion, naming, small interfaces, explicit errors). Numeric folklore — hard function-length caps, "comments are a smell," DRY applied absolutely — is not. Robert C. Martin's Clean Code (2nd ed., 2025) and John Ousterhout's A Philosophy of Software Design disagree in a published, public debate on function size and commenting (see references/code-quality-operational-playbook.md § 14); apply the rule ID's intent, not a book's specific numeric prescription, and know when not to refactor (§ 14.3 of the same reference).
| Task | Tool/Framework | Command | When to Use |
|---|---|---|---|
| Cite a standard | CC-* rule ID | N/A | PR review comments, design discussions, postmortems |
| Categorize feedback | CC-NAM, CC-ERR, CC-SEC, etc. | N/A | Keep feedback consistent without "style wars" |
| Add stack nuance | Language overlay | N/A | When the base rule is too generic for a language/framework |
| Allow an exception | Waiver record | N/A | When a rule must be violated with explicit risk |
| Reuse shared checklists | assets/checklists/ | N/A | When you need product-agnostic review/release checklists |
| Reuse utility patterns | references/*-utilities.md | N/A | When extracting shared auth/logging/errors/resilience/testing utilities |
CC-* IDs and avoid restating standards in reviews.CC-* IDs.CC-SEC-* baseline.CC-* rules before proposing new wording or automation.When citing or enforcing CC-* rules in a review:
CC-SEC-001, CC-ERR-003Clean-code request
-> Identify behavior that must stay unchanged
-> Find duplication, unclear boundaries, or unsafe complexity
-> Refactor in the smallest coherent slice
-> Preserve public contracts and naming consistency
-> Add or adjust tests for changed control flow
-> Run focused verification and report residual risk
Feedback needed: [What kind of guidance is this?]
├─ Universal, cross-language rule? → Add/modify `CC-*` in `references/clean-code-standard.md`
│
├─ Language/framework-specific nuance? → Add overlay entry referencing existing `CC-*`
│
└─ One-off constraint or temporary tradeoff?
├─ Timeboxed? → Add waiver with expiry + tracking issue
└─ Permanent? → Propose a new rule or revise scope/exception criteria
CC-* IDs (linters, SAST, dependency scanning) so humans can review impact, not tooling noise.AI-generated code requires the same CC-* standards plus additional vigilance for these patterns:
| Pattern | CC-* Mapping | Detection |
|---|---|---|
| Hallucinated imports | CC-DEP-* | npm info / pip index / type-check fails |
| Stale or deprecated APIs | CC-DEP-* | Compiler warnings, changelog checks |
| Missing error paths | CC-ERR-* | No catch/finally, no null guards, no timeout |
| Premature abstraction | CC-COMPLEXITY-* | Wrappers with single call site, unused generics |
| Confident wrong comments | CC-NAMING-* | Docstrings that don't match implementation |
| Security anti-patterns | CC-SEC-* | String concatenation in queries, hardcoded tokens |
For detailed hallucination detection steps, see references/code-quality-operational-playbook.md § 11.3.
Resources
data/sources.jsonTemplates
Utility Patterns
Related Skills
CC-* IDsCC-SEC-*IMPORTANT: When users ask recommendation questions about clean code standards, linters, formatters, static analysis, or code quality tools, you MUST verify current guidance with web search and official docs before answering. If web search is unavailable, say so and answer using data/sources.json, clearly flagging that the recommendation may be stale.
After verifying, provide:
ty, mypy, pylint)Before applying this skill on a non-trivial task, read learnings.consolidated.md in this directory (and learnings.md if present).
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
Frequently asked questions
This skill is the authoritative clean code standard for this repository's shared skills. It defines stable rule IDs (CC-), how to apply them in reviews, and how to extend them safely via language overlays and explicit exceptions.
The source record exposes this install command: npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/software-clean-code-standard". Inspect the command and pinned source before running it.
The pinned source record declares support for: codex, claude code.
Static rules flagged network in the source; the page lists the matching lines and excerpts.
Alternatives
vasilyu1983/AI-Agents-public
Configures Claude Code hooks and Codex hooks.json/notify callbacks. Use when adding guardrails, preflight, audit trails, worktree automation, or budget enforcement.
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
vasilyu1983/AI-Agents-public
Guides multi-GPU pre-training: DDP, FSDP2, ZeRO, tensor/pipeline/expert parallelism, fp8/Muon. Use when scaling a run, training MoE, or reproducing GPT-2 on rented GPUs.
vasilyu1983/AI-Agents-public
Scans public GitHub repos for agent skills, dev practices, and code patterns. Use when enriching skills, setting team policy, or researching a build domain.