### Avoid Narrating Comments in Code (TypeScript Example) Source: https://github.com/ofershap/ai-humanizer/blob/main/skills/ai-humanizer/SKILL.md Shows an AI-generated code pattern with excessive, narrating comments explaining each line's purpose, and the human-preferred pattern with minimal, non-obvious comments. Explicitly stating the function of each line is a strong AI code signal. ```typescript // Import the database client import { db } from "./db"; // Define the user type type User = { id: string; name: string }; // Fetch the user from the database async function getUser(id: string): Promise { // Query the database for the user const result = await db.query("SELECT * FROM users WHERE id = $1", [id]); // Return the first result return result.rows[0]; } ``` ```typescript import { db } from "./db"; type User = { id: string; name: string }; async function getUser(id: string): Promise { const result = await db.query("SELECT * FROM users WHERE id = $1", [id]); return result.rows[0]; } ``` -------------------------------- ### Code Commenting: AI vs. Human Patterns (TypeScript) Source: https://context7.com/ofershap/ai-humanizer/llms.txt Demonstrates the difference between AI-generated narrating comments and concise, human-written comments in TypeScript. AI comments explain the obvious intent, while human comments are minimal. ```typescript // AI pattern (narrating comments): // Import the database client import { db } from "./db"; // Define the user type type User = { id: string; name: string }; // Fetch the user from the database async function getUser(id: string): Promise { // Query the database for the user const result = await db.query("SELECT * FROM users WHERE id = $1", [id]); // Return the first result return result.rows[0]; } // Human pattern (no narrating comments): import { db } from "./db"; type User = { id: string; name: string }; async function getUser(id: string): Promise { const result = await db.query("SELECT * FROM users WHERE id = $1", [id]); return result.rows[0]; } ``` -------------------------------- ### Avoid Git Co-author Trailers and AI-Generated Commit Messages Source: https://github.com/ofershap/ai-humanizer/blob/main/skills/ai-humanizer/SKILL.md Demonstrates the AI pattern of including 'Co-authored-by' trailers in git commits, which permanently mark them as AI-generated. It also contrasts verbose, conventionally prefixed AI commit messages with terse, human-like commit messages. ```bash git commit --trailer "Co-authored-by: Cursor " ``` ```plaintext Co-authored-by: Cursor Co-authored-by: GitHub Copilot Generated-by: Claude ``` ```plaintext feat: implement comprehensive user authentication system with JWT tokens This commit introduces a robust authentication module that leverages JSON Web Tokens for secure session management. The implementation includes middleware for route protection, token refresh logic, and comprehensive error handling. ``` ```plaintext add JWT auth Middleware for protected routes, token refresh, error handling. ``` -------------------------------- ### Avoid Em Dashes for Separation (TypeScript Best Practices) Source: https://github.com/ofershap/ai-humanizer/blob/main/skills/ai-humanizer/SKILL.md Demonstrates the AI-generated pattern using em dashes (—) for separation, which is flagged by detectors, and the human-preferred pattern using hyphens with spaces (-). Em dashes are a strong AI writing signal due to their overuse by AI compared to humans. ```typescript typescript-best-practices — enforces current best practices Use satisfies for type checking — never use "as" for assertions ``` ```typescript typescript-best-practices - enforces current best practices Use satisfies for type checking. Never use "as" for assertions. ``` -------------------------------- ### Vary Sentence Length and Structure (AI vs. Human Patterns) Source: https://github.com/ofershap/ai-humanizer/blob/main/skills/ai-humanizer/SKILL.md Illustrates the difference in sentence structure and length between AI-generated content (uniform, predictable sentences) and human-written content (varied, natural rhythm). AI detectors measure 'burstiness' to identify machine-generated text. ```plaintext This plugin enforces security best practices for your codebase. It catches common vulnerabilities that AI agents introduce. The rules run automatically on every file. Each rule includes examples of correct and incorrect patterns. ``` ```plaintext Catches security issues AI agents introduce. Runs on every file automatically. Each rule shows what's wrong and how to fix it - with real code, not theory. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.