# AI Coding Rules and Claude SKILLs
Welcome to Devotts's public repository of AI coding rules for Cursor and SKILLs for Claude Code! This collection is designed to help AI developers, and AI agents themselves, improve the quality, consistency, and reliability of the code they write.
Initially focused on Cursor rules, this repository has expanded to prioritize Claude SKILLs, which provide powerful autonomous capabilities and integrations.
## Claude SKILLs (Priority)
These skills enhance Claude Code with specific, powerful capabilities.
All skills authored by [DevOtts](https://github.com/DevOtts).
---
### `chrome-cdp-control`
**Description**: Drive the user's real, logged-in Chrome browser via Chrome DevTools Protocol on localhost:9222 using Playwright. Trigger this skill when the user explicitly asks to "use my Chrome", "use my browser", "log into", "post on" (X, Reddit, LinkedIn, etc.), or any task that requires an authenticated session, persistent cookies, or bot-detection evasion that headless scraping cannot provide. Also trigger when the user references their CDP setup, their `~/.chrome-automation` profile, or asks Claude to manually walk through actions on a real site one step at a time. Do NOT use this skill for: simple unauthenticated content fetches (use `web_fetch`), bulk headless scraping (use a standalone Playwright script), or anything where a fresh Chromium instance would suffice. Do NOT use for tasks that can be solved by an API call to the same service.
---
### `cicd-deploy`
**Description**: Generic CI/CD deploy runner. Reads any project's cicd.yaml config and executes the full pipeline: preflight checks, git push, platform-specific deploys (Vercel/Railway/Fly/custom), service monitoring, smoke tests, and final report. Invoked automatically by project-specific deploy skills generated by /cicd-deploy-builder. Can also be called directly with a config path. This is a `-runner` skill (executes a defined workflow), not a builder.
---
### `cicd-deploy-builder`
**Description**: Generates a complete, project-specific CI/CD deploy skill. Discovers services by reading the repo (package.json, railway.toml, vercel.json, Dockerfile, fly.toml, .env.example), interviews the user for anything it can't infer, then produces two files: a cicd.yaml config (the editable source of truth) and a .deploy-credentials template. The generated config is immediately consumed by /cicd-deploy — no manual editing required to do the first deploy. Trigger when the user says "generate a deploy skill", "set up cicd for this project", "create a deploy pipeline", or "/cicd-deploy-builder".
---
### `favicon-builder`
**Description**: Design and ship a brand favicon that survives 16×16 — one recognizable shape, substantial strokes, and the Next.js App Router auto-detection pipeline so the asset actually appears in the browser tab. Use when replacing a default framework favicon, when the brand has a logo or wordmark too complex for 16×16, or when the user mentions "favicon", "site icon", "browser tab icon", or "the little icon next to the URL".
---
### `iterate`
**Description**: Autonomous multi-cycle problem solver for complex tasks that require diagnosis → fix → test → verify loops. Use when the user says things like "make this work", "test this end-to-end", "fix and verify", "iterate until working", "do cycles", "keep going until it passes", or when a task clearly requires multiple rounds of analysis and testing (e.g., debugging a pipeline, seeding data, verifying integrations, making an API flow work). Also activates when the user wants autonomous QA, test runs, or system-level verification. Splits heavy work across subagents to preserve context and speed up iteration.
---
### `iteration-impl`
**Description**: Implement an iteration on top of a `/launch-light` scaffold (or any minimal NestJS / Next.js project). Two modes auto-detected: API iteration (domain layer on Nest) and FRONTEND iteration (Next.js/Vite UI built from HTML/Figma/image mockups, consuming an existing API). Reads the problem statement, locks 2-4 ambiguities, runs a simplicity governor that aggressively cuts ceremony, AUTHORS RED tests on the load-bearing logic IN THE MAIN THREAD (not the agents — provenance matters), then fans the implementation build across 3-4 parallel subagents in one message. The RED tests are the verdict; agent "done" claims are not. Iteration-aware: detects existing state and runs deltas on v2+. Use when the user says "/iteration-impl", "build the iteration", "implement v1 / v2 / v3 of <feature>", "add the domain", "build the nextjs frontend", "implement the UI from <mockup>", or hands you a problem statement after `/launch-light`. Defaults skewed toward NO ceremony.
---
### `landing-page-builder`
**Description**: Build premium landing pages that don't smell like AI slop — concept-first atmosphere, real proof points, motion that respects users, and JSON-LD that gets you cited by Google rich results and AI search engines. Use when building a marketing site or landing page from scratch (Next.js / Tailwind / shadcn), iterating on a hero that feels generic or "Bootstrap-y", launching a SaaS / B2B / agency single-page offer, or requesting dark + light hero variants for A/B feel.
---
### `launch`
**Description**: Mission control for autonomous projects — analyzes tasks, recommends approaches (sub-agents/teams), sets up environment (features, evals, hooks, init.sh), suggests and configures tooling (MCPs), and launches the work.
---
### `launch-light`
**Description**: Lightweight productivity bootstrap for greenfield TypeScript projects — pnpm workspace with `apps/api/` (NestJS) by default, BFF-ready so adding `apps/web/` later requires zero restructuring. OpenRouter + LangSmith env slots, a colored `start-services.sh` launcher that hard-fails when a service doesn't come up, README, and `.env.example`. NO Docker, NO Postgres, NO infra. Generates a runnable scaffold in seconds without asking domain questions. Use when the user says "/launch-light", "init", "init setup", "bootstrap minimal", "spin up Nest", "give me a scratch Nest app". Hands off to `/launch-scratch-project` the moment Docker/Postgres/Redis/queues/multi-service enter the picture.
---
### `make-eval`
**Description**: Build a small, deterministic evaluation harness for an LLM-backed function — especially classifiers with a closed label set (intent routing, priority tagging, category assignment, yes/no extraction). Use this whenever you have a function that calls an LLM and you need to prove it works, catch regressions, or demonstrate validation/guardrail thinking. Trigger on phrases like "eval", "test the LLM", "is the classifier reliable", "validate the model output", "confusion matrix", "how do I know the prompt works", or any time an LLM boundary needs evidence rather than vibes. Defaults to a minimal local harness (no cloud dependency). When the project already has LangSmith wired (`langsmith` in `package.json` + `LANGSMITH_API_KEY` in env), generates the LangSmith mode instead — `upload-dataset.ts` + `run-eval.ts` + auto-wires `pnpm eval` and `pnpm eval:upload`, and prints clickable dataset + experiment URLs on every run. Always exact-match scored, never LLM-as-judge for closed labels.
---
### `notebooklm`
**Description**: Complete API for Google NotebookLM - full programmatic access including features not in the web UI. Create notebooks, add sources, generate all artifact types, download in multiple formats. Activates on explicit /notebooklm or intent like "create a podcast about X"
---
### `shopify-forge`
**Description**: Full-stack Shopify theme developer and ecommerce execution agent. Builds, customizes, and ships Shopify themes from design files (HTML/Figma/images). Manages products, collections, publishing, and end-to-end QA with visual verification.
---
### `test-coach`
**Description**: Real-time test/assessment coaching assistant. Reads the browser screen via CDP (Playwright on localhost:9222) and provides instant answers, guidance, and strategy while the user takes online tests, assessments, or quizzes. Trigger this skill when the user mentions taking a test, assessment, quiz, exam, or evaluation and wants real-time help — e.g. "help me with this test", "watch my screen and give me answers", "coach me through this assessment", "I'm taking the Wonderlic/PDA/Kolbe", "read my test questions". Do NOT trigger for studying or test prep without a live browser session. Do NOT trigger for automated test-taking (clicking answers) — this skill is read-only coaching, not browser automation.
---
### `vps-maintenance`
**Description**: Install or update a recurring VPS housekeeping pack on any Linux + Docker VPS — daily Postgres logical backups, weekly Docker prune, weekly DB retention cleanup, and a 5-min memory pressure alert to Slack or Telegram. Use when the user says "set up vps maintenance", "/vps-maintenance", "install housekeeping crons", "add backup cron", "add docker cleanup cron", "add memory alert", "set up retention cleanup", "harden this vps", or when a new VPS is being commissioned and needs the standard ops baseline.
---
## Cursor Rules
By leveraging Cursor's powerful rule-based customization, you can enforce best practices, institutionalize knowledge, and guide AI-driven development toward more robust and maintainable outcomes.
### How to Use Cursor Rules
1. **Clone or Fork this Repository**: Get a local copy of these rules.
2. **Copy to Your Project**: Copy the `.mdc` files from the `.cursor/rules/` directory into the `.cursor/rules/` directory of your own project.
3. **Customize**: Adapt the `globs` and content of the rules to match your project's structure and specific needs.
4. **Let Cursor Work**: Cursor will automatically apply these rules during your coding sessions, guiding you and any AI assistants you work with.
### Cursor Rules Overview
Here is a breakdown of the rules available in this repository:
---
### `cursor_rules.mdc`
**Description**: Guidelines for creating and maintaining Cursor rules to ensure consistency and effectiveness.
This meta-rule establishes the standard format for all other rules. It defines the required frontmatter (`description`, `globs`, `alwaysApply`), file referencing syntax, and best practices for writing clear and actionable rule content.
---
### `dev_workflow.mdc`
**Description**: Guide for using Task Master to manage task-driven development workflows.
This rule outlines a comprehensive development workflow centered around the "Task Master" tool. It covers project initialization, task management (listing, viewing, breaking down), handling implementation drift, and the iterative process of implementing subtasks, including logging progress and updating rules.
---
### `e2e-testing-rules.mdc`
**Description**: Best practices for creating and maintaining end-to-end (E2E) tests.
This rule defines a robust E2E testing strategy. Key principles include testing against a real database, ensuring full workflow coverage, isolating data per test, and generating automated cleanup scripts. It provides a standard structure for test files and a helper `apiCall` function.
---
### `error-context-logging.mdc`
**Description**: Enforces logging best practices to ensure that when errors occur, they provide enough context to be debugged quickly.
This rule tackles insufficient error context by mandating structured, contextual logging. It introduces a "5-Minute Debugging Protocol" for API errors and provides patterns for enriching error messages with the specific data that caused the failure.
---
### `mcp_server_rules.mdc`
**Description**: Best practices for working with MCP (Model Context Protocol) Servers.
This rule focuses on defining clear and unambiguous tool descriptions for AI agents. It mandates that every tool description must explain its purpose, define the required input structure, and provide a realistic JSON example to ensure AI agents can build correct requests.
---
### `medium-sized-coding-tasks.mdc`
**Description**: Structured workflow for medium-sized coding tasks involving multiple files, refactoring, or complex debugging.
This rule provides a systematic approach for tasks that are too complex for a single edit but not large enough for a full task-management system. It enforces a pre-coding analysis phase, the creation of a JSON tracking document, and a user-authorization gate before implementation begins.
---
### `microfactory-best-practices.mdc`
**Description**: Enforces best practices for development, covering database, Next.js, React, and data handling.
This is a comprehensive rule set covering a wide range of best practices, including:
- **Database**: `snake_case` naming, handling multiple foreign keys.
- **Next.js**: Separating Server/Client components, handling dynamic routes, configuring external image sources.
- **React**: Avoiding infinite update loops.
- **Data**: Bulk import/export patterns.
- **API**: Forcing Node.js runtime and correctly typing HOC context parameters for API routes.
- **Authentication**: Implementing `withDualAuth` for JWT and service key support.
---
### `mongodb-field-mapping.mdc`
**Description**: Prevents common MongoDB validation errors by enforcing correct field mapping between the API layer and MongoDB models.
This rule addresses `ValidationError` issues by providing explicit mapping tables for common field name mismatches (e.g., `organization_id` in the API vs. `organizationId` in the Mongoose model). It also covers safe handling of `ObjectId` to `string` conversions.
---
### `n8n-mcp-workflow-building-rules.mdc`
**Description**: Comprehensive guidelines for building robust n8n workflows for MCP (Model Context Protocol) servers.
This extensive rule set provides a complete guide to building n8n workflows for MCP servers. It covers authentication, workflow architecture (single trigger, multiple tools), API endpoint configuration, tool description standards, error handling, testing, documentation, and performance optimization.
---
### `self_improve.mdc`
**Description**: Guidelines for continuously improving Cursor rules based on emerging code patterns and best practices.
This meta-rule defines a process for the AI to improve its own rule set. It outlines triggers for rule updates (e.g., new patterns, common errors), an analysis process, and quality checks to ensure the rule base evolves with the codebase.
---
### `service-data-transformation.mdc`
**Description**: Ensures that data is correctly transformed between different layers of the application (e.g., API to Service, Service to DB Model).
This rule prevents data format mismatches by enforcing the use of explicit transformation functions. It provides patterns for mapping API data to service-layer interfaces, validating file constraints for ingestion, and safely using optional chaining for nested properties.
---
### `taskmaster.mdc`
**Description**: Comprehensive reference for Taskmaster MCP tools and CLI commands.
This rule serves as a detailed command reference for the "Task Master" tool. It documents both the MCP tools (for AI/integration use) and the equivalent CLI commands, covering initialization, task management, AI model configuration, dependency management, and more.
---
### `use-context7-code-documentation.mdc`
**Description**: Proactively consults the Context7 MCP Server for internal documentation when encountering ambiguity or cognitive struggle.
This rule directs the AI to use an internal documentation server (Context7) when it's stuck. Triggers include semantic ambiguity, looping on a bug fix, or low-confidence guesses. This mimics a human developer's "pause and research" behavior.
---
### `vectorization-defaults.mdc`
**Description**: Prevents common search and indexing issues by ensuring that content is properly vectorized and stored in Weaviate.
This rule ensures content is made searchable by default. It enforces `vectorizeContent: true` for all new content, specifies the use of semantic chunking, and provides best practices for Weaviate integration, such as converting MongoDB `ObjectId`s to strings.
---
### `vercel-deployment.mdc`
**Description**: Documents essential practices and common pitfalls to avoid when deploying Next.js applications to Vercel.
A critical guide for Vercel deployments, this rule provides a pre-deployment checklist, solutions for common build errors (like `export-detail.json` missing), bundle size optimization strategies, and best practices for managing dependencies, environment variables, and serverless function architecture.
Ler o README original