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

naming

What things get called. A file is named after its export in the project's case convention, a suffix is a resolution instruction rather than decoration, an index file only re-exports, and some symbol names are always wrong (utils, helpers, V2, Enhanced, New). Covers learning a tree's local vocabulary before adding to it, test and platform-variant naming, and the per-language conventions. Use when creating a file or directory, naming a test file, adding a platform variant, or when a name has to change. Triggers - "what should I call this file", "where does this file go", "naming convention", "kebab or camel", "name this test".

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.4 KB

SKILL.md(원문)

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

Naming

A name is read far more often than it is written, and a wrong one costs every later reader a lookup. Two questions answer most cases: what does this file export, and what suffix says how it is resolved.

Learn the local vocabulary first

Naming is the one area where matching the neighbours beats any rule here. Before adding a file, look at what surrounds it:

ls path/to/the/directory
git ls-files 'src/**' | head -50

Two neighbours agreeing is the convention. If they disagree, the project's own docs settle it: check CONVENTIONS.md, CODE_STYLE.md, CONTRIBUTING.md or the agent instructions at the repository root.

Files

Named after its export, in one case convention per language. The file, its main export and its folder carry the same name. Pick up the project's case from the tree and do not mix two in one directory.

Kebab-case is the common choice for TypeScript and JavaScript: focusable.tsx exports Focusable, stage-ratio.ts exports useStageRatio. Rust and Python are snake_case. Go is lower-case, no separator. Java and C# are PascalCase because the language ties the file to the type.

A tree that has drifted is normal. Name a new file correctly wherever it lands, and rename an off-convention neighbour only when you are already changing it. A rename commit that touches nothing else is its own change.

The suffix vocabulary

A suffix is a resolution instruction, not decoration. It tells a bundler, a test runner or a platform which of several files wins, so inventing one that nothing resolves is worse than no suffix at all.

Learn the set already in use before adding to it:

git ls-files | grep -oE '\.[a-z0-9]+\.[a-z]+$' | sort | uniq -c | sort -rn

The families that recur across projects:

FamilyMeans
.test.* .spec.*A test suite, beside the file it covers
A platform or target segment before the extensionWhich build picks this file: web, native, server, a specific engine
.story.* .stories.*A design-system story for a component
.fixtures.* .fixture.*Props or data a test or story imports
.d.tsTypes only
.gen.* .generated.*Generated. Never hand-edited, exempt from every policy

Invent no new suffix. A file that does not fit the set in use is a plain name.ext, and a genuinely new resolution rule is a change to the build config first and a file name second.

A component is a folder

Where a component owns more than its own code, give it a directory and let everything inside share its name:

focusable/
  focusable.tsx
  focusable.test.tsx
  focusable.fixtures.tsx
  focusable.story.mdx
  index.ts

The folder, the file and the export all carry the same name. An index.ts re-exports and nothing else:

export * from './focusable';

Logic in an index.ts is logic nobody can find.

Test files

A test file is the file under test plus the project's test suffix, in the same directory. Not a parallel __tests__ tree, not a tests/ folder at the package root, unless that is already the project's convention.

Where a test has to run under a different resolution or a different runner project, the suffix is what selects it, so read the runner's config to see which globs it owns before naming the file. Guessing here produces a test that never runs, which is worse than no test because it reads as coverage.

Per-language conventions that are the language's, not a project's:

  • Rust: unit tests in a #[cfg(test)] mod tests beside the code; integration tests in the crate's tests/ directory. Some projects keep API integration tests beside the handlers behind a prefix instead. Follow the tree.
  • Go: _test.go beside the file, same package for unit tests.
  • Python: test_*.py, wherever the project's runner is configured to look.

The name inside the test is a different rule and belongs to the project's test skills: the test name is a sentence about behaviour, the file name is about resolution.

Symbols

  • Name things fully. remainingRetries, not n, not retriesLeft2. Short names are fine only for a short life: i, f, ok inside a five-line block.
  • A name that says nothing is always wrong. utils, helpers, common, misc, data, stuff, manager, handler with no noun. A file named after nothing collects everything.
  • Never version a name. handleClickV2, parseEnhanced, dataNew, configFinal. Name what it does, or replace the old one. Git holds the previous version.
  • A boolean reads as a claim: isVisible, hasAudio, canSeek. Not visible on a function, not flag.
  • Units and scale belong in the name. expiresAtMs, widthPx, bitrateKbps. A number whose unit is a comment is a bug waiting.
  • Respect the framework's reserved shapes. In React a hook starts with use and nothing else does, because the compiler treats a use-prefixed member reached through an object as a hook and freezes it. Every framework has one or two of these; breaking one produces a bug with no error message.
  • One language for code. Identifiers, comments and commit messages in the project's code language, which for almost every project is English. Localised copy is content and lives behind a translation key, never in an identifier.

Directories

Use the domain nouns the project already uses, the same words that name its top-level modules, its services and its issue labels. Learn the vocabulary once and use it everywhere. A new noun for an existing domain is how two names for one thing start, and the second one is always the one nobody searches for.

Where a project uses a namespaced id scheme (reverse-DNS, a scope prefix, a registry name), take the next id from the existing set rather than inventing a shape.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

One file, one job, and short enough to hold in your head. Covers the size policy (hard-split over 300 lines, split 200 to 300 at a seam, aim for 150), what a natural seam is and where to cut, the exemptions, the dependency rules that decide where the split lands, and the signals that a file is already two files. Use before adding to a file that is already long, when naming a new file, when a function has nowhere obvious to live, or when a review says a file is doing too much. Triggers - "this file is too long", "where should this go", "split this file", "is this file too big", "one responsibility".

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

kromatv/kroma602026년 10월 19일 업데이트

Spawn the comment hunter, fix accepted findings, and offer encodings for claimed constraints.

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

kromatv/kroma602026년 10월 19일 업데이트

Write a short release note people finish reading. Picks the few changes a user will notice from the pull requests since the last release, names each by what the reader can now do, keeps to a length budget, writes every language from the intent instead of translating, and traces every line to a PR. Use when cutting a release, or filling a GitHub Release body, a store "what's new", a package changelog or an in-app what's new screen. Triggers - "write the release notes", "release notes for 0.4.0", "what's new", "changelog for this release", "notes de version".

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

kromatv/kroma602026년 10월 19일 업데이트

Rust best practices. Use when reading or editing any .rs file, designing a crate's public API, choosing an error type, splitting a workspace, or writing async code on tokio. Triggers - "rust best practices", "is this idiomatic", "should this be a newtype", "anyhow or thiserror", "why does the borrow checker", "review this Rust".

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

kromatv/kroma602026년 10월 19일 업데이트

Write cargo tests. A test name is a sentence, the body is setup, mock, test and verify blocks separated by blank lines with no comments, and shared setup lives in a named test-support module rather than in each test. Covers naming, the block shape, where a test file goes, async and time, workspaces, and running one crate or one filter. Use when adding or changing any #[test] or #[tokio::test], or when Rust coverage has to come up. Triggers - "write a rust test", "cargo test", "test this crate", "cover this handler".

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

kromatv/kroma602026년 10월 19일 업데이트

Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

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

kromatv/kroma602026년 10월 19일 업데이트

kromatv의 스킬 모두 보기

이 스킬의 문제 신고