Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Line Limit

ASecurity

Enforce file line count limits (200 recommended, 300 max) for CODE IMPLEMENTATION files only. Use this when reviewing code, creating files, or when files exceed line limits and need modularization.

416 stars
0 votes
0 copies
0 views
Added 2/7/2026
developmentjavascripttypescriptpythonrustgojavakotlinc++bashreact

Works with

api

Security Analysis

A100/100

Scanned 2/12/2026

Install to Claude Code

$npx -y skills add aiskillstore/marketplace --skill line-limit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Line Limit?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Line Limit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-line-limit/badge)](https://www.skillsdirectory.com/skills/aiskillstore-line-limit)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: line-limit
description: Enforce file line count limits (200 recommended, 300 max) for CODE IMPLEMENTATION files only. Use this when reviewing code, creating files, or when files exceed line limits and need modularization.
allowed-tools: Read, Glob, Grep, Edit, Write, Bash
license: MIT
metadata:
  author: antigravity-team
  version: "1.0"
---

# Line Limit Enforcement

**코드 구현 파일**에 대한 라인 수 제한을 강제하는 스킬입니다.

## Scope

> **이 스킬은 코드 구현 파일에만 적용됩니다.**

### ✅ 적용 대상

| 파일 유형 | 확장자 |
|----------|--------|
| JavaScript/TypeScript | `.js`, `.ts`, `.jsx`, `.tsx` |
| Python | `.py` |
| Go | `.go` |
| Rust | `.rs` |
| Java/Kotlin | `.java`, `.kt` |
| C/C++ | `.c`, `.cpp`, `.h` |
| 기타 실행 코드 | 언어별 소스 파일 |

### 🚫 예외 (적용 제외)

| 파일 유형 | 확장자/위치 | 사유 |
|----------|------------|------|
| Jupyter Notebook | `.ipynb` | 셀 기반 구조, 출력 포함 |
| 스킬 파일 | `SKILL.md` | 문서/가이드 (500줄까지 허용) |
| 문서 파일 | `.md`, `.mdx` | 문서는 길어도 무방 |
| 설정 파일 | `.json`, `.yaml`, `.toml` | 구조적 데이터 |
| 테스트 픽스처 | `fixtures/`, `__mocks__/` | 테스트 데이터 |
| 자동 생성 파일 | `*.generated.*`, `*.g.*` | 수동 관리 X |
| 타입 정의 | `.d.ts` | 선언 파일 |
| CSS/스타일 | `.css`, `.scss` | 스타일시트 |

## Rules

| 상태 | 라인 수 | 조치 |
|------|---------|------|
| ✅ OK | 0-200 | 정상 |
| ⚠️ WARNING | 201-300 | 권장 리팩토링 |
| 🔴 VIOLATION | 301+ | **필수 분리** |

## When This Skill Activates

- 새 파일 작성 시 라인 수 체크
- 코드 리뷰 요청 시
- "파일이 너무 길어", "모듈화 해줘" 등 요청 시
- 300줄 초과 파일 발견 시

## Enforcement Workflow

### 1. 라인 수 체크
```bash
wc -l <file>
```

### 2. 상태 판정
```
if lines <= 200: ✅ OK
elif lines <= 300: ⚠️ WARNING - 리팩토링 권장
else: 🔴 VIOLATION - 분리 필수
```

### 3. 위반 시 조치

**🔴 300줄 초과 파일 발견 시 반드시:**

1. 파일 구조 분석 (함수/클래스/섹션 파악)
2. 분리 가능한 단위 식별:
   - 유틸리티 함수 → `utils/` 또는 `helpers/`
   - 타입 정의 → `types/` 또는 `*.types.ts`
   - 상수/설정 → `constants/` 또는 `config/`
   - 하위 컴포넌트 → `components/`
   - 훅 → `hooks/`
3. 분리 계획 제시
4. 사용자 승인 후 리팩토링 실행

## Modularization Patterns

### React/TypeScript
```
# Before (500 lines)
src/components/Dashboard.tsx

# After
src/components/Dashboard/
├── index.tsx          # Main component (< 200 lines)
├── DashboardHeader.tsx
├── DashboardStats.tsx
├── DashboardChart.tsx
├── hooks/
│   └── useDashboardData.ts
├── types.ts
└── constants.ts
```

### General Functions
```
# Before (400 lines)
src/utils/helpers.ts

# After
src/utils/
├── index.ts           # Re-exports
├── string.utils.ts
├── date.utils.ts
├── array.utils.ts
└── validation.utils.ts
```

## Examples

### Example 1: 코드 리뷰 시
```
User: 이 파일 리뷰해줘 - src/services/api.ts

Claude: [파일 읽기 후]
📊 라인 수 체크: 342 lines
🔴 VIOLATION: 300줄 초과 - 모듈화 필요

분석 결과:
- API 엔드포인트 함수: 15개 (240 lines)
- 타입 정의: 12개 (45 lines)
- 헬퍼 함수: 5개 (57 lines)

권장 분리:
1. api/endpoints/ - 엔드포인트별 분리
2. api/types.ts - 타입 정의 추출
3. api/helpers.ts - 헬퍼 함수 추출

분리를 진행할까요?
```

### Example 2: 새 파일 작성 시
```
User: 대시보드 컴포넌트 만들어줘

Claude: [작성 중 200줄 도달 시]
⚠️ WARNING: 200줄 도달 - 분리 권장

현재 구조:
- DashboardHeader (40 lines)
- DashboardStats (60 lines)
- DashboardChart (80 lines)
- hooks (20 lines)

각 섹션을 별도 파일로 분리하면서 계속 진행할까요?
```

### Example 3: 모듈화 요청
```
User: 이 파일 너무 길어, 정리해줘

Claude: [line-limit 스킬 활성화]
📊 현재: 456 lines
🔴 VIOLATION: 156줄 초과

[분석 및 분리 계획 제시...]
```

## References

상세 모듈화 가이드: [references/modularization-guide.md](references/modularization-guide.md)

Attribution

aiskillstoreaiskillstore
View sourceMore from aiskillstore →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284722 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →