Skip to content

Instantly share code, notes, and snippets.

@youss1234
youss1234 / custom-rules.js
Created March 17, 2025 06:19 — forked from Illyism/custom-rules.js
ESLint 200-Line Max File Size Rule for Better AI Coding
/**
* 🧠 My game-changing ESLint rule that makes AI coding 10x better:
* - Enforces 200-line max file size
* - Counts only actual code (ignores comments)
* - Gives helpful refactoring suggestions
* - Works perfectly with Cursor AI's "Fix in Chat"
*
* Custom ESLint rule to limit file size to 200 lines
* @type {import("eslint").Rule.RuleModule}
*/
@youss1234
youss1234 / .py
Created March 17, 2025 05:19 — forked from Madhav-MKNC/coding-agent.py
All the code you need to create a powerful agent that can create and edit any file on your computer using the new text_editor tool in the Anthropic API.
import anthropic
import os
import sys
from termcolor import colored
from dotenv import load_dotenv
class ClaudeAgent:
def __init__(self, api_key=None, model="claude-3-7-sonnet-20250219", max_tokens=4000):
"""Initialize the Claude agent with API key and model."""