code-quality

code-quality is a skill for Claude Code, Codex from rafaelghif/antigravity-agents. It costs 27 tokens per session (836 once invoked), scanned A, original, MIT.

A set of rules for writing, refactoring, and reviewing application code with an emphasis on small, reusable, maintainable solutions. Refactoring means improving code structure without changing what it does.

In plain words
What is it for?
Use it before adding code, when reusing existing helpers or components, during refactoring, and when reviewing application changes for maintainability.
Why use it?
It helps prevent duplicate logic, unnecessary dependencies, inconsistent project patterns, and fixes that only hide symptoms instead of addressing the shared cause.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/rafaelghif/antigravity-agents/code-quality
Any agent
npx skills add rafaelghif/antigravity-agents --skill code-quality
Clone the repo
git clone --depth 1 https://github.com/rafaelghif/antigravity-agents

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/rafaelghif/antigravity-agents/code-quality.svg)](https://agentmods.dev/skills/rafaelghif/antigravity-agents/code-quality)
Your own site
<a href="https://agentmods.dev/skills/rafaelghif/antigravity-agents/code-quality"><img src="https://agentmods.dev/badge/skills/rafaelghif/antigravity-agents/code-quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.00836
Opus 5 $0.00014 $0.00418
Sonnet 5 $0.00005 $0.00167
Haiku 4.5 $0.00003 $0.00084

Measured 4d ago against content hash 3e784d451cfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-quality scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/code-quality/SKILL.md · 46 lines

What it actually says

<CRITICAL_DIRECTIVE> Enforce Staff-level procedural rigor, the Senior Ladder, and Enterprise-Grade software architecture. </CRITICAL_DIRECTIVE>

<THE_SENIOR_LADDER> The best code is the code never written. Before writing code, stop at the first rung that holds:

  1. Does this need to exist? -> Skip it (YAGNI).
  2. Already in codebase? -> Reuse existing helper/hook/type/component.
  3. Stdlib does it? -> Use standard library.
  4. Native platform feature? -> Native HTML5/CSS/DB constraint over heavy libraries (e.g. <input type="date"> over picker lib).
  5. Existing dependency? -> Use installed libraries; never add new dependencies for trivial tasks.
  6. Can it be one line? -> One line.
  7. Only then: write the minimum code that works. Root-cause fix only: grep all callers and fix at the shared root, never patch leaf symptoms. </THE_SENIOR_LADDER>

<ENTERPRISE_STANDARDS>

  1. DRY & Single Source of Truth (SSOT): Absolutely NO duplicate logic. Re-use existing project hooks, utilities, and components. If logic repeats >= 2 times, extract it to a shared module immediately.
  2. Project Pattern Harmony: NEVER introduce pattern schizophrenia. Before coding, inspect existing sibling files. Strictly adhere to the project's established conventions for state management, data-fetching, error handling, directory structure, and styling.
  3. SOLID & Clean Architecture: Enforce Single Responsibility (SRP) and Dependency Inversion (DIP). Maintain strict isolation between UI presentation, domain business logic, and infrastructure/data access.
  4. Senior Defensive Engineering:
    • Prevent race conditions and memory leaks (clean up event listeners, timers, abort stale requests with AbortController).
    • Strict runtime data validation (Zod, Pydantic) on all external inputs, APIs, and route params.
    • Comprehensive error boundaries with structured domain errors (no silent failures or ad-hoc console.log).
  5. Cyclomatic Complexity & Algorithmic Supremacy: Keep functions atomic with shallow indentation. Default to O(1) lookups instead of O(N^2) loops. Memoize expensive operations.
  6. Zero-Tolerance Anti-Patterns: NO any types in TypeScript. NO broad except Exception: blocks in Python. NO inline CSS styles or ad-hoc duplicate UI primitives.
  7. Feature Completeness (Anti-Dummy): 100% complete production implementations. NO placeholders, mock arrays, or // TODO stubs. Handle loading, empty, and error states gracefully.
  8. Security & Secrets: All credentials, tokens, and sensitive configs MUST come from environment variables. </ENTERPRISE_STANDARDS>

<PROCEDURAL_WORKFLOW>

  1. Pattern Reconnaissance: Search and read existing sibling files to identify established project patterns (state, API, styling, error handling).
  2. Ladder Check: Evaluate the 7-rung Senior Ladder before adding new code or dependencies.
  3. Reuse Audit: Check for existing shared components, hooks, or utilities before creating new ones to maintain DRY.
  4. Context Acquisition: Understand imports, contracts, and type definitions before modifying code.
  5. Minimal Delta Enforcement: Implement ONLY the requested feature with maximum architectural elegance.
  6. Test Gap Analysis & TDD: Ensure tests exist and cover all edge cases before modifying implementation.
  7. Local Verification: Run stack linter, typecheck, and test runner via python3 scripts/verify.py --execute.
  8. Diff Review: Verify zero duplicate code, zero pattern deviations, and complete feature coverage. </PROCEDURAL_WORKFLOW>
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 46 lines · 27 tokens per session scan A 3e784d451cfa

Subscribe to this mod's changes

code-quality is a skill published in the GitHub repository rafaelghif/antigravity-agents (5 stars, last pushed 4d ago), licensed MIT. It adds 27 tokens to every session and 836 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

coordinate-recover

Diagnose and safely resume Coordinate Agents Tasks after executable failure, non-zero exit, timeout, stale claim, processing message, or Implementer ERROR. Recovery is explicit and never an automatic retry loop.

hogancv/coordinate-agents · 43 tokens

coordinate-setup

Discover coding CLIs on the current computer and configure a Coordinate Agents implementation agent. Use for setup, executable checks, registered agents, user-level configuration, and project-over-user precedence.

hogancv/coordinate-agents · 40 tokens

dev-engineer

Adds logic, state management, TypeScript types, and CRUD operations to UI. Works AFTER ui-first-builder creates the interface. Implements Zustand stores, form handling with React Hook Form + Zod, and prepares for backend connection. Triggers: add logic, add functionality, make it work, state management, form…

wasintoh/toh-framework · 75 tokens

platform-specialist

Doc-driven platform integration expert. Converts a web app to LINE MINI App (LIFF SDK), PWA (Next.js 16), and Capacitor (iOS/Android). Expo & Tauri are secondary/legacy. ปรัชญาหลัก: ดึง docs จริงล่าสุดก่อนเขียนโค้ดเสมอ — ไม่ freeze snippet ที่จะ rot. Triggers: "LINE MINI App", "LIFF", "LINE OA", "convert to app"…

wasintoh/toh-framework · 161 tokens

premium-experience

Premium app generation that creates WOW-factor experiences. Multi-page apps with smooth animations, zero TypeScript errors, and production-ready quality. Lovable-style experience: one prompt, complete app, instant delight. MUST be used alongside vibe-orchestrator for new projects.

wasintoh/toh-framework · 56 tokens

smart-routing

Intelligent request routing for /toh command. Analyzes user intent, assesses confidence, surveys the runtime (2-step, per orchestration-protocol), and routes to the appropriate agent(s). Memory-first approach ensures context awareness. Triggers: /toh command, natural language requests, ambiguous inputs.

wasintoh/toh-framework · 65 tokens