Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/gaebalai/cursor-def-a-rule/backend_rulesgit clone --depth 1 https://github.com/gaebalai/Cursor-DEF-A-RuleWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/gaebalai/cursor-def-a-rule/backend_rules)<a href="https://agentmods.dev/rules/gaebalai/cursor-def-a-rule/backend_rules"><img src="https://agentmods.dev/badge/rules/gaebalai/cursor-def-a-rule/backend_rules.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01050 | $0.01050 |
| Opus 5 | $0.00525 | $0.00525 |
| Sonnet 5 | $0.00210 | $0.00210 |
| Haiku 4.5 | $0.00105 | $0.00105 |
Grade A, and why
backend_rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Copyright (c) 2025 Jaewoo Kim
MIT License - https://opensource.org/licenses/MIT
[BACKEND] 백엔드 개발 가이드 라인
기술 스택(우선순위 포함)
- Node.js/TypeScript - 서버측 개발
- Python/FastAPI - API 개발 및 데이터 처리
- PostgreSQL - 관계형 데이터베이스
- Redis - 캐시 세션 관리
- MongoDB - 문서 지향 데이터베이스
API 설계 원칙
- RESTful: 표준 HTTP 메소드 및 상태 코드
- GraphQL: 유연한 데이터 검색(필요한 경우)
- 버전닝: API 버전 관리 전략
- 문서: OpenAPI/Swagger로 자동 생성
데이터베이스 설계
- 정규화: 적절한 정규화 수준
- 인덱스: 쿼리 성능 최적화
- 마이그레이션: 데이터베이스 스키마 관리
- 백업: 정기적인 백업 전략
보안 구현
- 인증: JWT, OAuth2.0, Session 관리
- 허가: RBAC(Role-Based Access Control)
- 입력 검증: 엄격한 검증
- SQL 인젝션 방지: 선불 문
- XSS 대책: 출력 이스케이프
- CSRF 대책: 토큰 기반 보호
성능 최적화
- 캐시 전략: Redis, 메모리 캐시
- 데이터베이스 최적화: 쿼리 최적화, 연결 풀
- 비동기 처리: 백그라운드 작업
- CDN: 정적 콘텐츠 전송
오류 처리
- 글로벌 에러 핸들러: 통일적인 에러 처리
- 로그 관리: 구조화된 로그, 로깅 수준
- 모니터링: 애플리케이션 모니터링, 알림
- 사용자 친화: 적절한 오류 메시지
아키텍처 패턴
- MVC: Model-View-Controller
- Repository: 데이터 액세스 추상화
- Service Layer: 비즈니스 로직 분리
- Middleware: 공통 처리 분리
테스트 전략
- 단위 테스트: Jest, pytest
- 통합 테스트: API 엔드포인트 테스트
- 데이터베이스 테스트: 테스트 데이터 관리
- 부하 테스트: 성능 검증
개발 환경 및 도구
- Docker: 컨테이너화 개발 환경
- 환경 변수: 설정 관리
- Hot Reload: 개발 효율성 향상
- 디버그: 적절한 디버깅 도구
데이터 처리 및 배치
- ETL: 데이터 추출, 변환, 로드
- 스케줄러: 정기 실행 작업
- 큐: 비동기 처리 관리
- 스트리밍: 실시간 데이터 처리
마이크로 서비스
- 서비스 분할: 적절한 입도로 분할
- API Gateway: 통합된 진입점
- 서비스 간 통신: gRPC, 메시지 큐
- 서비스 검색: 동적 서비스 발견
모니터링 및 로그
- APM: 애플리케이션 성능 모니터링
- 메트릭스: Prometheus, Grafana
- 로그 집계: ELK Stack, Fluentd
- 경고: 이상 감지 및 통지
배포 CI/CD
- 컨테이너화: Docker, Kubernetes
- CI/CD: GitHub Actions, Jenkins
- 블루 그린: 제로 다운 타임 배포
- 롤백: 긴급 복구 전략
확장성
- 수평 스케일링: 로드 밸런서
- 수직 스케일링: 리소스 강화
- 데이터베이스 샤딩: 데이터 분산
- CDN: 지리적 분산
백업 및 재해 복구
- 자동 백업: 정기적인 데이터 보호
- 포인트 인 타임 복구: 특정 시점으로 복구
- 지리적 중복성: 다중 지역 배치
- 재해 복구 계획: 긴급시 대응 절차
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 100 lines · 1,050 tokens per session scan A bae1c9c1a14b
backend_rules is a cursor rule published in the GitHub repository gaebalai/Cursor-DEF-A-Rule (12 stars, last pushed 1y ago), licensed MIT. It adds 1,050 tokens to every session, about $0.0052 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-backward-compatibility
Do not add backward-compatibility shims or migration scaffolding.
postgresql
This guide defines the definitive best practices for writing clean, performant, and maintainable PostgreSQL SQL, focusing on modern conventions and avoiding common pitfalls.
query-optimization
查詢優化、EXPLAIN、index 設計與 RLS 效能測量.
sqlmodel
Satisfying the type checker when working with SQLModel.