diff --git a/README.md b/README.md index aea3afc..3777bf0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ๐ก๏ธ Code Quality Skills -> **Reusable AI skills for plan-driven implementation, React/Next.js implementation guidance, and code verification, cleanup, runtime auditing, and security-focused review.** +> **A modular collection of AI sub-skills for verifying, cleaning, auditing, and securing code.** Install only the focused capability your task needs, or install the optional bundle for the complete workflow.   @@ -10,177 +10,154 @@ ## ๐ Table of Contents - [Purpose](#-purpose) -- [Features](#-features) -- [Getting Started](#-getting-started) -- [Implementation Workflow](#-implementation-workflow) -- [Skills.sh Listing](#-skillssh-listing) +- [Sub-skills](#-sub-skills) +- [Installation](#-installation) - [Repository Structure](#-repository-structure) - [Core Principles](#-core-principles) -- [Verification Pipeline](#-verification-pipeline) -- [Reporting Workflow](#-reporting-workflow) +- [Workflow](#-workflow) +- [Resources](#-resources) - [License](#-license) --- ## ๐ฏ Purpose -These skills empower AI agents to: +Code Quality Skills separates code-quality work into small, composable sub-skills. Choose a targeted skill when you need one type of review, or use the all-in-one bundle when a change needs the entire verification-and-cleaning workflow. -- โ **Verify code correctness** - Ensure logic works as intended -- ๐งน **Remove dead code & duplication** - Keep codebases lean and maintainable -- ๐ **Audit runtime behavior** - Browser-based verification with DevTools -- ๐ **Check security issues** - Identify vulnerabilities and exposure risks -- ๐๏ธ **Enforce clean architecture** - Maintain modular, single-responsibility design -- ๐งช **Validate builds, tests & linting** - Automated quality gates -- ๐งญ **Execute approved plans incrementally** - Implement small, verified changes that follow repository conventions +| Need | Owning sub-skill | +|------|------------------| +| Remove dead code, duplication, and unnecessary complexity | [Clean Code](skills/clean-code/SKILL.md) | +| Run builds, tests, linters, and formatting checks | [Code Verification](skills/code-verification/SKILL.md) | +| Inspect a running frontend with browser DevTools | [Runtime Auditing](skills/runtime-auditing/SKILL.md) | +| Review injection risks, exposed tokens, and client-side security issues | [Security Review](skills/security-review/SKILL.md) | +| Perform the complete scan, cleanup, verification, and reporting workflow | [Code Verification & Cleaning bundle](skills/code-verify-and-clean-skill/SKILL.md) | --- -## โจ Features +## ๐งฉ Sub-skills -| Feature | Description | -|---------|-------------| -| **Static Analysis** | Automated linting, formatting, and compilation checks | -| **Runtime Auditing** | Live browser testing with console & network inspection | -| **Code Sanitization** | Remove unused imports, variables, and technical debt | -| **Security Scanning** | Detect injection points, token exposure, and client-side risks | -| **Architecture Review** | Enforce modularity and reusability patterns | +- **[Clean Code](skills/clean-code/SKILL.md)** โ owns dead-code removal, duplicate-code reduction, simplification, and modularity improvements. +- **[Code Verification](skills/code-verification/SKILL.md)** โ owns compilation, tests, linting, formatting, and other automated quality gates. +- **[Runtime Auditing](skills/runtime-auditing/SKILL.md)** โ owns browser-based validation, console inspection, network checks, and UI runtime diagnostics. +- **[Security Review](skills/security-review/SKILL.md)** โ owns security-focused review for injection points, credential exposure, and client-side risks. +- **[Code Verification & Cleaning](skills/code-verify-and-clean-skill/SKILL.md)** โ the optional bundle that combines every sub-skill and coordinates the end-to-end reporting workflow. --- -## ๐ Getting Started +## ๐ Installation -### Installation +Install the smallest sub-skill that covers the task. For example, install **Clean Code** by itself: ```bash -npx skills add abozezo-dev/Code-Quality-Skill/code-verify-and-clean-skill -npx skills add abozezo-dev/Code-Quality-Skill/execution -npx skills add abozezo-dev/Code-Quality-Skill/react-best-practices +npx skills add abozezo-dev/Code-Quality-Skill/clean-code ``` -### Quick Start - -1. Install `execution` after an implementation plan has been approved. -2. Ask the agent to implement the plan; it works in small verifiable increments and hands off to `code-verify-and-clean-skill`. -3. For React or Next.js changes, install `react-best-practices` too. `execution` invokes it only for React/Next.js work. -4. Run verification on the target codebase and review the generated report templates in `skills/code-verify-and-clean-skill/assets/`. - -## ๐งญ Implementation Workflow - -The [`execution`](skills/execution/SKILL.md) skill consumes an **approved** plan, discovers local conventions, -implements one independently verifiable increment at a time, and sends the completed change to -[`code-verify-and-clean-skill`](skills/code-verify-and-clean-skill/SKILL.md) for verification and review. +Install any other individual sub-skill as needed: -For React or Next.js implementation tasks, it has an explicit local dependency on -[`react-best-practices`](skills/react-best-practices/SKILL.md). Install both skills for those projects; no React -guidance is applied to non-React work. - ---- +```bash +# Automated builds, tests, linting, and formatting +npx skills add abozezo-dev/Code-Quality-Skill/code-verification -## ๐ Skills.sh Listing +# Browser and DevTools runtime checks +npx skills add abozezo-dev/Code-Quality-Skill/runtime-auditing -View this skill on skills.sh: +# Security-focused code review +npx skills add abozezo-dev/Code-Quality-Skill/security-review +``` -- [Code Verification & Cleaning Skill](https://skills.sh/abozezo-dev/Code-Quality-Skill/code-verify-and-clean-skill) -- [Implementation Execution](https://skills.sh/abozezo-dev/Code-Quality-Skill/execution) -- [React and Next.js Best Practices](https://skills.sh/abozezo-dev/Code-Quality-Skill/react-best-practices) +Or install the optional all-in-one bundle for the complete code-quality workflow: -The repository page is customized with [`skills.sh.json`](skills.sh.json), and all skill files live under [`skills/`](skills/) for a clean skills.sh-compatible layout. +```bash +npx skills add abozezo-dev/Code-Quality-Skill/code-verify-and-clean-skill +``` --- ## ๐ Repository Structure -``` +```text Code-Quality-Skill/ โโโ skills/ +โ โโโ clean-code/ +โ โ โโโ SKILL.md # Cleanup, deduplication, and modularity +โ โโโ code-verification/ +โ โ โโโ SKILL.md # Builds, tests, linting, and formatting +โ โโโ runtime-auditing/ +โ โ โโโ SKILL.md # Browser and DevTools validation +โ โโโ security-review/ +โ โ โโโ SKILL.md # Security-focused review โ โโโ code-verify-and-clean-skill/ -โ โโโ assets/ -โ โ โโโ report-template.md # Post-modification report template -โ โ โโโ review-template.md # Template for code reviews -โ โ โโโ scan-template.md # Pre-modification scan template -โ โ โโโ verification-checklist.md # Comprehensive checklist -โ โโโ reference/ -โ โ โโโ code-cleaning-universal.md # Cleaning standards & patterns -โ โ โโโ devtools-verification.md # Browser audit workflows -โ โ โโโ reporting-workflow.md # SCAN.md and REPORT.md workflow -โ โ โโโ security-verification.md # Security check guidelines -โ โโโ scripts/ -โ โ โโโ verify-pipeline.sh # Automated verification script -โ โโโ SKILL.md # Full skill specification -โ โโโ execution/ -โ โ โโโ SKILL.md # Approved-plan implementation workflow -โ โโโ react-best-practices/ -โ โโโ SKILL.md # React and Next.js implementation guidance -โโโ .github/ -โ โโโ workflows/ -โ โโโ ci.yml # CI/CD pipeline -โโโ .gitignore # Local and generated file exclusions -โโโ skills.sh.json # skills.sh repository page customization -โโโ LICENSE # MIT License -โโโ README.md # You are here! +โ โโโ assets/ # Bundle report and review templates +โ โโโ reference/ # Bundle workflow guides +โ โโโ scripts/ # Bundle automation +โ โโโ SKILL.md # All-in-one workflow +โโโ .github/workflows/ci.yml # CI checks +โโโ skills.sh.json # skills.sh repository configuration +โโโ LICENSE # MIT license +โโโ README.md # You are here ``` +Each directory above links to its own `SKILL.md`: [Clean Code](skills/clean-code/SKILL.md), [Code Verification](skills/code-verification/SKILL.md), [Runtime Auditing](skills/runtime-auditing/SKILL.md), [Security Review](skills/security-review/SKILL.md), and the [all-in-one bundle](skills/code-verify-and-clean-skill/SKILL.md). + --- ## ๐ง Core Principles -### 1. Trust But Verify -Never assume code works just because it looks correct. Always: -- **Execute** - Boot servers, compile modules, run interpreters -- **Observe** - Use browser tools to catch visual/architectural breaks -- **Isolate** - Capture stack traces and system warnings +### 1. Trust But Verify โ Code Verification and Runtime Auditing -### 2. Radical Code Cleaning -Keep code lean, modern, and maintainable: -- ๐๏ธ Prune unused components, imports, and variables -- ๐ Refactor complex logic into explicit early returns -- โป๏ธ Reuse global utilities instead of reinventing logic +Do not treat code that looks correct as code that is correct. **Code Verification** executes builds, tests, and static checks; **Runtime Auditing** validates the running application, including browser console output and network activity. -Install the orchestrator only when a coordinated scan, remediation, verification, and final report are needed: +### 2. Keep Code Lean โ Clean Code -```bash -npx skills add abozezo-dev/Code-Quality-Skill/code-verify-and-clean-skill -``` +**Clean Code** keeps codebases maintainable by pruning unused components, imports, and variables; reducing duplication; and simplifying complex logic into explicit, reusable modules. -## Skills +### 3. Treat Security Findings as First-Class โ Security Review -| Skill | Use it for | Included resources | -|---|---|---| -| [`clean-code`](skills/clean-code/) | Dead-code removal, unused imports, duplication, complexity reduction, data flow, and modular architecture. | Universal cleaning guide and clean-code review template. | -| [`code-verification`](skills/code-verification/) | Builds, tests, linters, formatters, type checks, and evidence-backed verification. | Optional cross-ecosystem pipeline and verification checklist. | -| [`runtime-devtools-audit`](skills/runtime-devtools-audit/) | Browser rendering, hydration, console, network, and interaction audits. | DevTools verification guide. | -| [`security-review`](skills/security-review/) | Input validation, authorization, injection, secrets, storage, uploads, redirects, and secure defaults. | Security verification guide. | -| [`code-verify-and-clean-skill`](skills/code-verify-and-clean-skill/) | Composing the focused skills and producing before/after quality reports. | Reporting workflow plus `SCAN.md` and `REPORT.md` templates. | +**Security Review** identifies injection opportunities, exposed tokens, and client-side exposure risks before they become production issues. -## Repository structure +### 4. Use Clear Severity Tiers โ All-in-One Bundle -```text -skills/ -โโโ clean-code/ -โ โโโ assets/review-template.md -โ โโโ reference/code-cleaning-universal.md -โ โโโ SKILL.md -โโโ code-verification/ -โ โโโ assets/verification-checklist.md -โ โโโ scripts/verify-pipeline.sh -โ โโโ SKILL.md -โโโ runtime-devtools-audit/ -โ โโโ reference/devtools-verification.md -โ โโโ SKILL.md -โโโ security-review/ -โ โโโ reference/security-verification.md -โ โโโ SKILL.md -โโโ code-verify-and-clean-skill/ # Optional orchestrator - โโโ assets/{scan-template,report-template}.md - โโโ reference/reporting-workflow.md - โโโ SKILL.md -``` +The **Code Verification & Cleaning** bundle uses consistent markers when coordinating multiple sub-skills: + +| Marker | Meaning | Action | +|--------|---------|--------| +| ๐ด `[breaking-error]` | Code crashes, fails checks, or breaks a workflow | **Blocks merge** | +| ๐ก `[code-smell]` | Code works but adds debt or avoidable complexity | Schedule remediation | +| ๐ข `[refactored]` | A cleanup was applied and verified | Already resolved | + +--- + +## โ๏ธ Workflow + +1. **Clean Code** removes obvious dead code, duplication, and structural bloat. +2. **Code Verification** runs the repository's native build, test, lint, and formatting commands. +3. **Runtime Auditing** validates changed frontend behavior in a live browser when applicable. +4. **Security Review** checks the changed surface for security risks. +5. The **all-in-one bundle** coordinates the full workflow and records the pre-change `SCAN.md` and post-change `REPORT.md` when comprehensive reporting is required. + +--- + +## ๐ Resources + +The optional bundle supplies shared workflow resources; use the indicated sub-skill for the capability each resource supports. + +| Resource | Capability owner | Description | +|----------|------------------|-------------| +| [Code Cleaning Standards](skills/code-verify-and-clean-skill/reference/code-cleaning-universal.md) | [Clean Code](skills/clean-code/SKILL.md) | Cleaning standards and patterns for reducing technical debt. | +| [DevTools Verification Guide](skills/code-verify-and-clean-skill/reference/devtools-verification.md) | [Runtime Auditing](skills/runtime-auditing/SKILL.md) | Browser, layout, console, and network-audit guidance. | +| [Security Verification Guide](skills/code-verify-and-clean-skill/reference/security-verification.md) | [Security Review](skills/security-review/SKILL.md) | Security checks for injection and client-side exposure. | +| [Reporting Workflow Guide](skills/code-verify-and-clean-skill/reference/reporting-workflow.md) | [Code Verification & Cleaning bundle](skills/code-verify-and-clean-skill/SKILL.md) | `SCAN.md` and `REPORT.md` workflow and evidence standards. | +| [Verification Checklist](skills/code-verify-and-clean-skill/assets/verification-checklist.md) | [Code Verification](skills/code-verification/SKILL.md) | Checklist for automated verification gates. | +| [Review Template](skills/code-verify-and-clean-skill/assets/review-template.md) | [Security Review](skills/security-review/SKILL.md) | Consistent review findings and remediation notes. | +| [SCAN.md Template](skills/code-verify-and-clean-skill/assets/scan-template.md) | [Code Verification & Cleaning bundle](skills/code-verify-and-clean-skill/SKILL.md) | Baseline report template before modifications. | +| [REPORT.md Template](skills/code-verify-and-clean-skill/assets/report-template.md) | [Code Verification & Cleaning bundle](skills/code-verify-and-clean-skill/SKILL.md) | Final report template after remediation and validation. | + +--- ## Reporting workflow -When using the orchestration skill, create `SCAN.md` after a read-only assessment and before application changes. After remediation and re-verification, create `REPORT.md` that records results, reconciles findings, and notes remaining risks. See [the reporting workflow](skills/code-verify-and-clean-skill/reference/reporting-workflow.md) for requirements. +This project is licensed under the [MIT License](LICENSE). -## License +---
Made with โค๏ธ by abozezo-dev