본문으로 건너뛰기
Skillpedia
에이전트33k · #8510

context-mode

하는 일

이 스킬은 AI 에이전트가 큰 명령 출력과 파일을 전체로 읽는 대신 context-mode 도구로 처리하도록 안내합니다. 긴 로그, 큰 API 응답, 빌드 출력을 다루는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓에이전트가 로그를 분석하거나 명령 출력을 요약하거나 큰 JSON 응답을 파싱해야 할 때.
  • ✓빌드나 의존성 점검이 길게 출력되어 거를 필요가 있을 때.
  • ✓페이지 스냅숏이나 브라우저 구조가 너무 커서 직접 읽기 어려울 때.

스킬 링크

https://github.com/mksglu/context-mode/blob/main/skills/context-mode/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mksglu/context-mode/blob/main/skills/context-mode/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 빌드 로그를 분석해서 오류만 알려 주세요. 전체 출력은 보여 주지 말아 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 기본 규칙을 정합니다. 읽거나, 조회하거나, 가져오거나, 목록을 만들거나, 빌드하는 모든 것에 context-mode 도구를 사용하고, 작고 안전한 동작에는 일반 셸 명령을 씁니다. 그다음 에이전트는 중요한 부분만 보여 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Context Mode: Default for All Large Output

MANDATORY RULE

<context_mode_logic> <mandatory_rule> Default to context-mode for ALL commands. Only use Bash for guaranteed-small-output operations. </mandatory_rule> </context_mode_logic>

Bash whitelist (safe to run directly):

  • File mutations: mkdir, mv, cp, rm, touch, chmod
  • Git writes: git add, git commit, git push, git checkout, git branch, git merge
  • Navigation: cd, pwd, which
  • Process control: kill, pkill
  • Package management: npm install, npm publish, pip install
  • Simple output: echo, printf

Everything else → ctx_execute or ctx_execute_file. Any command that reads, queries, fetches, lists, logs, tests, builds, diffs, inspects, or calls an external service. This includes ALL CLIs (gh, aws, kubectl, docker, terraform, wrangler, fly, heroku, gcloud, etc.) — there are thousands and we cannot list them all.

When uncertain, use context-mode. Every KB of unnecessary context reduces the quality and speed of the entire session.

Decision Tree

About to run a command / read a file / call an API?
│
├── Command is on the Bash whitelist (file mutations, git writes, navigation, echo)?
│   └── Use Bash
│
├── Output MIGHT be large or you're UNSURE?
│   └── Use context-mode ctx_execute or ctx_execute_file
│
├── Fetching web documentation or HTML page?
│   └── Use ctx_fetch_and_index → ctx_search
│
├── Using Playwright (navigate, snapshot, console, network)?
│   └── ALWAYS use filename parameter to save to file, then:
│       browser_snapshot(filename) → ctx_index(path) or ctx_execute_file(path)
│       browser_console_messages(filename) → ctx_execute_file(path)
│       browser_network_requests(filename) → ctx_execute_file(path)
│       ⚠ browser_navigate returns a snapshot automatically — ignore it,
│         use browser_snapshot(filename) for any inspection.
│       ⚠ Playwright MCP uses a SINGLE browser instance — NOT parallel-safe.
│         For parallel browser ops, use agent-browser via execute instead.
│
├── Using agent-browser (parallel-safe browser automation)?
│   └── Run via execute (shell) — each call gets its own subprocess:
│       execute("agent-browser open example.com && agent-browser snapshot -i -c")
│       ✓ Supports sessions for isolated browser instances
│       ✓ Safe for parallel subagent execution
│       ✓ Lightweight accessibility tree with ref-based interaction
│
├── Processing output from another MCP tool (Context7, GitHub API, etc.)?
│   ├── Output already in context from a previous tool call?
│   │   └── Use it directly. Do NOT re-index with ctx_index(content: ...).
│   ├── Need to search the output multiple times?
│   │   └── Save to file via ctx_execute, then ctx_index(path) → ctx_search
│   └── One-shot extraction?
│       └── Save to file via ctx_execute, then ctx_execute_file(path)
│
└── Reading a file to analyze/summarize (not edit)?
    └── Use ctx_execute_file (file loads into FILE_CONTENT, not context)

When to Use Each Tool

Situation Tool Example
Hit an API endpoint ctx_execute fetch('http://localhost:3000/api/orders')
Run CLI that returns data ctx_execute gh pr list, aws s3 ls, kubectl get pods
Run tests ctx_execute npm test, pytest, go test ./...
Git operations ctx_execute git log --oneline -50, git diff HEAD~5
Docker/K8s inspection ctx_execute docker stats --no-stream, kubectl describe pod
Read a log file ctx_execute_file Parse access.log, error.log, build output
Read a data file ctx_execute_file Analyze CSV, JSON, YAML, XML
Read source code to analyze ctx_execute_file Count functions, find patterns, extract metrics
Fetch web docs ctx_fetch_and_index Index React/Next.js/Zod docs, then search
Playwright snapshot browser_snapshot(filename) → ctx_index(path) → ctx_search Save to file, index server-side, query
Playwright snapshot (one-shot) browser_snapshot(filename) → ctx_execute_file(path) Save to file, extract in sandbox
Playwright console/network browser_*(filename) → ctx_execute_file(path) Save to file, analyze in sandbox
MCP output (already in context) Use directly Don't re-index — it's already loaded
MCP output (need multi-query) ctx_execute to save → ctx_index(path) → ctx_search Save to file first, index server-side
자주 묻는 질문

어떤 명령은 바로 실행할 수 있나요?

폴더 만들기, 파일 이동, git 쓰기, 탐색, echo 같은 작고 안전한 작업은 셸에서 바로 실행할 수 있습니다.

큰 출력은 어떻게 하나요?

샌드박스에서 출력을 처리하고, 대화에는 관련 결과만 돌려줍니다.

모든 명령에 적용되나요?

대부분의 명령에 적용되며, 출력 크기를 확실히 모를 때는 context-mode를 쓰는 것이 규칙입니다.

상세 정보

작성자의 원본 설명

Use context-mode tools (ctx_execute, ctx_execute_file) instead of Bash/cat when processing large outputs. Triggers: "analyze logs", "summarize output", "process data", "parse JSON", "filter results", "extract errors", "check build output", "analyze dependencies", "process API response", "large file analysis", "page snapshot", "browser snapshot", "DOM structure", "inspect page", "accessibility tree", "Playwright snapshot", "run tests", "test output", "coverage report", "git log", "recent commits", "diff between branches", "list containers", "pod status", "disk usage", "fetch docs", "API referen

repo: mksglu/context-mode

인기도

GitHub 스타
33k
순위
#8510
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬