본문으로 건너뛰기
cccskills
무료GitHub에 공개

analyze-code

Use when asked to analyze a file, a directory, or the whole codebase to understand structure, architecture, dependencies, complexity, duplication, dead code, or technical debt — e.g. "analyze this", "análisis total", "explain this codebase", "mapa del código", "how does X work", "technical debt". Produces a complete, structured picture with verified commands, not guesses. Distinct from review-* skills (which judge quality); this skill explains and maps.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Code / File Analysis

You build a complete, verified picture of code: what exists, how it is structured, how pieces connect, where the complexity and debt live. You always ground conclusions in actual file reads and command output — never from memory of what a codebase "probably" looks like.

Steps

  1. Inventory mechanically — use Glob/Grep/Bash to map the scope before reading anything:
    • List all files: rg --files <scope> (or ls -R), grouped by type.
    • Count per type and per directory; note sizes with wc -l on the big files (rg --files -g '*.go' | xargs wc -l | sort -n | tail).
    • Note unusual names: _test.go, _test.py, minified bundles, lockfiles.
  2. Read in dependency order — read entrypoints first (main.go, index files, workflow files), then what they call. Read imports/requires to learn the dependency graph. Do not read 200 files; read the ones that matter and sample the rest.
  3. Map the architecture — produce:
    • Layers/components and their responsibilities.
    • Data flow: entrypoint -> handlers -> services -> storage/external.
    • Cross-cutting concerns: config, logging, error handling, auth.
    • Shared state and its accessors.
  4. Measure quality signals (mechanical where possible):
    • Duplication — similar blocks across files (rg a distinctive line, or look for copy-pasted comments/handlers).
    • Dead code — exported/unused functions, orphaned files, unreachable branches (grep for references of suspect symbols).
    • Complexity — deeply nested functions, god-functions (>100 lines with many branches), switch/if chains that scream for a table or dispatch.
    • Coupling — files that import from many places, globals, magic strings.
    • TODOs/FIXMEs/hacks — rg -n 'TODO|FIXME|HACK|XXX' <scope>.
    • Stale artifacts — commented-out blocks, unused deps, obsolete config.
  5. Trace one real end-to-end path — pick the core feature, follow it from trigger to result, and verify each step against the code. This is the difference between a map and a guess.
  6. Report in the output format below.

Output format

  1. Overview — what the scope is, what it does, how big (files, lines).
  2. Architecture map — components, layers, dependency graph (text/Mermaid on request), data flow.
  3. Verified facts — each claim about the code with file:line.
  4. Quality findings — duplication, dead code, complexity, coupling, debt — each with file:line, evidence, and severity (Low/Med/High).
  5. Answers — the original question (how does X work, what happens on startup, where is state stored) answered directly and precisely.
  6. Commands run — the exact inventory commands and their key output.
  7. Open questions — what is ambiguous, unknown, or needs confirmation from the user or a runtime.

Rules: no hypotheticals — every structural claim cites file:line; when you cannot verify something, say so explicitly rather than guessing.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when asked to audit or harden security in this repo — e.g. "security audit", "auditoría de seguridad", "revisa la seguridad", "is this secure", "hardening", "vulnerabilities". Audits code, config, workflows, and secrets exposure. Covers injection, secrets, TLS, untrusted input, dependency risk, and CI supply-chain hygiene. Runs when the user asks about security, not just for code reviews.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go582026년 8월 8일 업데이트

Use when reviewing the structure, ordering, coherence, and narrative flow of the book as a whole or across chapters. Checks chapter sequencing against the ID scheme, cross-references and forward hooks between chapters, README/index link integrity, exercise-to-chapter pairing, duplicate or contradictory content, and progression of difficulty. Best paired with a full-docs review rather than a single-chapter proofread.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go582026년 8월 8일 업데이트

Use when writing, expanding, rewriting, or drafting any chapter (.mdx) or Go exercise for this book. Encodes the authorial voice, the mdx-pdf-format rules, the ID/naming scheme, the zero-emoji rule, chapter/exercise pairing, and the "theory first, then code" pedagogy so new or edited content reads like the rest of the book and keeps the PDF compiling.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go582026년 8월 8일 업데이트

Use when brainstorming, evaluating ideas, designing architectures, writing technical plans, or choosing between approaches — e.g. "give me ideas", "ideas para", "diseña la arquitectura", "how should I structure this", "compare approaches", "plan". Turns vague ideas into concrete, prioritized, buildable designs with explicit tradeoffs. Use before writing code, not after.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go582026년 8월 8일 업데이트

Use when proofreading, copy-editing, or verifying English in any docs/**/*.mdx chapter or code comment in this repo. Catches grammar, punctuation, spelling, syntax, article/tense/agreement errors, wordiness, tone drift, and style inconsistencies, and rewrites text in the book's confident second-person voice without changing meaning or breaking the mdx/PDF format rules.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go582026년 8월 8일 업데이트

Use when reviewing, writing, or debugging Go code under exercises/part2/ (and matching embedded code in docs/part2/**/*.mdx). Thinks hard about correctness, idiomatic Go, error handling, resource cleanup, concurrency, and — crucially — what the tests would catch: edge cases, races, leaks, timeouts, and port conflicts. Knows the repo's module-mode quirk (GO111MODULE=off) and which dirs carry go.mod.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go582026년 8월 8일 업데이트

sazardev의 스킬 모두 보기

이 스킬의 문제 신고