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/programming_ethics_rulesgit clone --depth 1 https://github.com/gaebalai/Cursor-DEF-A-RuleWhat 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.02187 | $0.02187 |
| Opus 5 | $0.01094 | $0.01094 |
| Sonnet 5 | $0.00437 | $0.00437 |
| Haiku 4.5 | $0.00219 | $0.00219 |
Grade A, and why
programming_ethics_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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Copyright (c) 2025 Jaewoo Kim
MIT License - https://opensource.org/licenses/MIT
프로그래밍 윤리 원칙
코드 네이밍에서의 윤리적 고려
naming_ethics:
discriminatory_patterns:
- "stupid", "dumb", "idiot", "retarded", "lazy"
- "naive", "foolish", "ignorant", "clueless"
- "bad", "wrong", "incorrect", "invalid"
inclusive_alternatives:
- "basic", "simple", "elementary", "foundational"
- "background", "asynchronous", "deferred"
- "validate", "check", "verify", "ensure"
naming_conventions:
- 기능을 나타내는 명확한 이름
- 차별적 표현 배제
- 포용적인 표현 사용
주석 및 문서에서의 윤리적 고려
comment_ethics:
problematic_patterns:
- "사용자는 멍청하니까…"
- "이해할 수 없는 입력"
- "당연히 알고 있어야 함"
- "초보자에게는…"
inclusive_alternatives:
- "사용자 입력의 다양성에 대응"
- "입력 형식의 검증"
- "일반적인 지식으로서"
- "단계적인 설명이 필요"
documentation_standards:
- 포용적인 표현 사용
- 단계적인 설명 제공
- 학습 기회 창출
- 다양성에 대한 배려
오류 메시지에서의 윤리적 고려
error_message_ethics:
problematic_patterns:
- "당신의 입력이 잘못되었습니다"
- "이해할 수 없는 입력입니다"
- "당연히 올바른 형식으로 입력하세요"
- "에러가 발생했습니다 (당신의 잘못)"
inclusive_alternatives:
- "입력 형식을 확인해 주세요"
- "입력 예시를 참고해 주세요"
- "올바른 형식으로 입력해 주세요"
- "에러가 발생했습니다. 해결 방법을 안내합니다"
error_message_standards:
- 책임 전가를 피함
- 해결 방법 제시
- 지원적인 표현 사용
- 학습 기회 제공
코드 리뷰에서의 윤리적 고려
code_review_ethics:
review_standards:
- 건설적인 피드백 제공
- 개인 공격 지양
- 성장 기회 제공
- 상호 학습 촉진
feedback_patterns:
- "이 코드는 나쁘다" → "이 코드는 개선할 수 있습니다"
- "이해할 수 없다" → "좀 더 명확하게 할 수 있습니다"
- "틀렸다" → "다른 접근 방식을 고려할 수 있습니다"
learning_opportunities:
- 개선 방법에 대한 구체적 제안
- 학습 자료 소개
- 단계적인 개선 계획
- 지속적 성장 지원
인지전 대응 프로그래밍 윤리
cognitive_warfare_programming_ethics:
malicious_process_detection:
intent_analysis:
- "목적의 모호화・은폐"
- "실제 기능의 위장"
- "책임 회피 구조"
- "악의의 분산화"
manipulation_architecture:
- "감정적 조작의 시스템화"
- "정보 조작의 자동화"
- "사회적 영향 확산 구조"
- "대립 촉진 알고리즘"
social_impact_engineering:
- "분열・대립 시스템 설계"
- "집단 심리 조작 구현"
- "혼란・불안 확산 기능"
- "신뢰 파괴의 구조화"
prevention_measures:
- "윤리적 코드 리뷰 수행"
- "악의적 기능 탐지"
- "사회적 영향 사전 평가"
- "책임 있는 개발 촉진"
- "프로세스 분석을 통한 탐지"
stop_conditions:
critical_risk:
- "인지전 목적의 명확한 의도"
- "사회적 혼란을 노린 기능"
- "특정 집단에 대한 공격적 시스템"
- "정보 조작 가능성"
high_risk:
- "여론 조작 의도"
- "사회적 분열을 노린 기능"
- "차별적・배타적 시스템"
alternative_approaches:
constructive_development:
- "건설적인 목적을 위한 개발"
- "사회적 가치 창출"
- "포용적인 시스템 설계"
- "조화를 촉진하는 기능"
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.
- 2d ago First seen · 292 lines · 2,187 tokens per session scan A f22bd6bddcef
programming_ethics_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 2,187 tokens to every session, about $0.0109 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
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.