code-index-first

code-index-first is a cursor rule for Cursor from HyunjunJeon/FastCampus_MCP_A2A_Basic. It costs 577 tokens per session, scanned A, original, MIT.

A set of rules for navigating and editing a codebase through its project indexes, which are documents describing where code lives and how parts connect. It requires checking those indexes before reviewing or changing code.

In plain words
What is it for?
Use it to plan small code changes, trace affected paths, update indexes when structure changes, and run relevant tests afterward.
Why use it?
It helps limit edits to the necessary files and makes related callers, imports, tests, and documentation easier to check.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to plan small code changes, trace affected paths, update indexes when structure changes, and run relevant tests afterward.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/hyunjunjeon/fastcampus_mcp_a2a_basic/code-index-first
Install

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.

Clone the repo
git clone --depth 1 https://github.com/HyunjunJeon/FastCampus_MCP_A2A_Basic

Made for: Cursor.

Wrote 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.

agentmods badge for code-index-first

README.md
[![agentmods](https://agentmods.dev/badge/rules/hyunjunjeon/fastcampus_mcp_a2a_basic/code-index-first/github.svg)](https://agentmods.dev/rules/hyunjunjeon/fastcampus_mcp_a2a_basic/code-index-first)
Your own site
<a href="https://agentmods.dev/rules/hyunjunjeon/fastcampus_mcp_a2a_basic/code-index-first"><img src="https://agentmods.dev/badge/rules/hyunjunjeon/fastcampus_mcp_a2a_basic/code-index-first/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-index-first

Your own site · 80×15
<a href="https://agentmods.dev/rules/hyunjunjeon/fastcampus_mcp_a2a_basic/code-index-first"><img src="https://agentmods.dev/badge/rules/hyunjunjeon/fastcampus_mcp_a2a_basic/code-index-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 577 This file is loaded in full into every session.
When invoked 577 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00577 $0.00577
Opus 5.5 $0.00231 $0.00231
Sonnet 5.5 $0.00115 $0.00115
Haiku 4.5 $0.00058 $0.00058

Measured 2mo ago against content hash 2d465a56df00, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-index-first 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 2mo 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.

.cursor/rules/code-index-first.mdc · 41 lines

What it actually says

Code Index-First Workflow

항상 코드 편집/리뷰/탐색 전에 프로젝트 인덱스를 먼저 확인하고, 필요한 파일만 최소 범위로 수정합니다. 변경으로 영향받는 경로를 식별하고 관련 테스트/문서를 함께 갱신합니다.

Entry Points

하위 모듈 인덱스

Editing Policy

  1. 변경 계획 수립: 인덱스를 기반으로 수정 대상(필수 파일)과 주변 영향 경로(참조/임포트/호출부)를 식별합니다.

  2. 최소 변경: 요구사항을 충족하는 가장 작은 단위로 수정하고, 불필요한 리팩터링/포맷 변경을 피합니다.

  3. 일관성 유지: 새로운 파일/모듈을 추가할 경우, 해당 모듈의 code_index.md와 루트 인덱스에 역할을 2줄 이내로 추가합니다.

  4. 영향 분석: 수정 후 호출 관계, A2A/HITL/LangGraph 경계면(서버/클라이언트/그래프 노드/웹 UI)을 재점검합니다.

  5. 검증: 관련 테스트 스위트와 예제 스크립트를 우선 실행합니다. 자세한 위치는 README.md와 tests/의 개별 테스트 파일을 참고하세요.

참고

  • 인덱스와 불일치 발견 시 먼저 인덱스를 갱신한 뒤 코드를 정리합니다.
  • 링크는 항상 클릭 가능한 마크다운 형태(문서)로 유지합니다.
Changes

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.

  1. 2mo ago First seen · 41 lines · 577 tokens per session scan A 2d465a56df00

Subscribe to this mod's changes

code-index-first is a cursor rule published in the GitHub repository HyunjunJeon/FastCampus_MCP_A2A_Basic (11 stars, last pushed 10mo ago), licensed MIT. It adds 577 tokens to every session, about $0.0023 per session on Opus 5.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-31.