Skip to content

Instantly share code, notes, and snippets.

@spilist
spilist / token-efficiency-analysis-prompt.md
Last active April 27, 2026 07:04
코딩 에이전트 토큰 효율과 관련된 상태 점검용 프롬프트

다음 레퍼런스를 바탕으로, 내 코딩 에이전트 설정을 토큰 효율 관점에서 점검해줘.

목표는 성능 저하를 크게 만들지 않으면서 토큰 낭비를 줄이는 거야.

  • 직접 절약(자동 주입 문맥, 긴 툴 출력 제한 등)과 간접 절약(검색/IDE/앱 경로 차단 등)을 구분해서 봐줘
  • 현재 버전 공식 문서나 현재 설치본에서 확인되지 않은 키는 절대 추천하지 마
@spilist
spilist / _CLAUDE_CODE_GIT_INSTRUCTION_EXPERIMENT.md
Last active April 17, 2026 00:02
Claude Code includeGitInstructions cache miss reproduction (issue #47107)

Claude Code includeGitInstructions 캐시 미스 실측

anthropics/claude-code#47107 재현 실험. Claude Code의 시스템 프롬프트 마지막 블록에 git status / Recent commits가 들어가서, git 상태가 바뀔 때마다 그 블록이 통째로 prompt cache miss를 내는 현상을 측정했습니다.

환경

  • Claude Code 2.1.112
@spilist
spilist / INSTALL_PROMPT_ko.md
Last active April 7, 2026 22:28
블루투스를 이용해 아이폰과 맥북 사이 거리가 일정 이상 멀어지면 화면을 잠가주는 HammerSpoon 기반 스크립트 + 설치 프롬프트

이 프롬프트를 그대로 복사해서 Codex/Claude Code 같은 로컬 코딩 에이전트에 붙여 넣어 주세요.

이 gist는 macOS + iPhone + Hammerspoon 조합 기준입니다. 다른 플랫폼에서도 비슷한 자동 잠금 흐름을 만들 수 있고, 아래 키워드는 탐색 시작점으로 쓸 만합니다.

  • 맥북 + 안드로이드: Hammerspoon + Tasker + Bluetooth presence
  • 윈도 + 아이폰: PowerShell/AutoHotkey + iPhone presence + Shortcuts/Home Assistant
  • 윈도 + 안드로이드: PowerShell/AutoHotkey + Tasker/KDE Connect + Bluetooth presence

기본 동작은 단순합니다. 5초마다 Bluetooth RSSI를 읽고, 최근 4개 샘플이 모두 임계값 밖이면 잠금을 시도합니다. 체감상 대략 20초 정도 멀어진 상태를 보는 보수적인 기본값입니다. 다만 RSSI는 실제 거리와 1:1로 대응하지 않고 꽤 흔들립니다. 같은 자리에서도 몸 방향, 벽, 가방, 책상, 주변 전파 환경 때문에 값이 달라질 수 있습니다. 필요하면 trustedWifiSSIDs로 집 Wi-Fi나 개인 핫스팟에서는 자동 잠금을 끌 수 있습니다.

@spilist
spilist / context.md
Last active February 4, 2026 01:12
Robert C. Martin(Uncle Bob)의 AI 견해 변화 추적
@spilist
spilist / commit.md
Created August 30, 2025 19:03
Commit guildeline for AGENTS (inspired by https://cbea.ms/git-commit/)

/commit

Create a git commit with a properly formatted message following best practices.

Usage

/commit [message]

Instructions

@spilist
spilist / log-prompt-context.md
Last active January 7, 2026 04:31
Agent Rule (custom command) for Prompt & Context Version Control

/log-prompt-context

Record AI development context in /__prompts/ directory.

When to Use

  • After completing any project-related conversation (code changes, discussions, analysis, questions)
  • Before the user leaves a conversation session
  • For simple tasks: record immediately after task completion
  • For complex tasks with TodoWrite: record before marking final todo as complete
  • Even for CLAUDE.md modifications or meta-discussions about the project/rules
@spilist
spilist / shadcn.md
Last active August 22, 2025 17:04
Rule for ShadCN MCP usage

General Rule

When a task requires building or modifying a user interface, you must use the tools available in the shadcn-ui MCP server.

Planning Rule

When planning a UI build using shadcn:

  1. Discover Assets: First, use list_components() and list_blocks() to see all available assets in the MCP server.
  2. Map Request to Assets: Analyze the user's request and map the required UI elements to the available components and blocks.
  3. Prioritize Blocks: You should prioritize using blocks (get_block) wherever possible for common, complex UI patterns (e.g., login pages, calendars, dashboards). Blocks provide more structure and accelerate development. Use individual components (get_component) for smaller, more specific needs.
@spilist
spilist / gist:e4446565f1bdeed68f3d1a20debfe605
Created July 7, 2025 00:55
Cursor rules for step-by-step and TDD principle
---
description:
globs:
alwaysApply: true
---
# TDD-Integrated Development Workflow
## Core Directive
You are a senior software engineer AI assistant following Kent Beck's Test-Driven Development (TDD) and Tidy First principles. For EVERY task request, you MUST follow the three-phase TDD-integrated process below in exact order. Each phase must be completed with expert-level precision and detail.
Always follow the instructions in plan.md. When I say "go", find the next unmarked test in plan.md, implement the test, then implement only enough code to make that test pass.
# ROLE AND EXPERTISE
You are a senior software engineer who follows Kent Beck's Test-Driven Development (TDD) and Tidy First principles. Your purpose is to guide development following these methodologies precisely.
# CORE DEVELOPMENT PRINCIPLES
- Always follow the TDD cycle: Red → Green → Refactor
- Write the simplest failing test first
@spilist
spilist / gist:6b065cda20c0e75436d018e147f0cad9
Last active August 22, 2025 05:01
Custom command to open Claude Code with optimized configurations.
# .bashrc version. Source: https://bagerbach.com/blog/how-i-use-claude-code#running-claude-code
function ccv() {
local env_vars=(
"ENABLE_BACKGROUND_TASKS=true"
"FORCE_AUTO_BACKGROUND_TASKS=true"
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=true"
"CLAUDE_CODE_ENABLE_UNIFIED_READ_TOOL=true"
)
local claude_args=()