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

style

Apply the project’s Rust conventions when editing code or documentation. The guidance covers module and type organization, workspace dependency declarations, plain English documentation, and tests that check meaningful behavior rather than fixed text.

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

원문원문 설명 보기

Always use this skill before writing or editing Rust code or documentation in the Topcoat repository

tokio-rs/topcoat스타 6,235(GitHub 6,235 + cccskills 0)

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Organizing Rust modules and implementations
  • Writing or revising Rust documentation
  • Reviewing whether a test protects real behavior

포함된 파일(1)

  • SKILL.md2.9 KB

SKILL.md(원문)

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

Code Style

General

  • Keep related code together: a struct is immediately followed by its inherent impl and then its trait impls, before the next struct in the file. Unit tests (#[cfg(test)] mod tests) go at the very bottom of the file.
  • Free functions are allowed, but first consider whether a more idiomatic Rust grouping onto a struct exists.
  • Unsafe code is not allowed in this project, unless wrapped by a reputable dependency.
  • Avoid needless allocations, it is reasonable to refactor the code a bit to make it faster.

Barrel files

Name a module's file after the module and place it alongside its directory (foo.rs next to foo/), never foo/mod.rs. A barrel file declares all submodules and re-exports each with a glob; only third-party items are re-exported by name.

mod content;
mod error;
mod request;

pub use content::*;
pub use error::*;
pub use request::*;

pub use http::Method;

When a module's submodules are peers that make up a whole (the CLI commands fmt, dev, asset; the macros expr, procedure, shard), put anything shared between them in a common submodule so it does not read as another peer.

Dependencies

  • Declare every dependency in the top-level Cargo.toml under [workspace.dependencies] with only a version and no features. Crates pull it in with workspace = true and opt into features there.

Documentation

  • Write in plain english. No fancy sentence structure.
  • Item docs describe what something is/does and how to use it. Avoid implementation details unless relevant to a caller.
  • Describe the current state only; never reference previous iterations ("this used to be A but is now B").
  • Avoid exhaustively listig specific implementations or uses that could evolve over time and go stale. Keep documentation robust to changes.
  • Avoid mentioning unrelated items, like "this is used by X to do Y". Focus on describing only the item itself.
  • Use only ASCII characters in both code and documentation, e.g. -> instead of unicode arrow or ... instead of ellipsis character.
  • Avoid em-dashes entirely. Use colons and semicolons sparingly.
  • Avoid using ignore for code snippets to keep them type-checked.

Tests

  • Do not write tests that only verify hardcoded values. Make the tests insensitive to the exact wording of strings or error messages.
  • Every test must protect a specific behavior or catch a plausible bug. Before writing it, identify what incorrect behavior would make it fail.
  • Derive expected results from the intended behavior. Do not calculate them by repeating the implementation or calling the same code being tested.
  • Keep tests sensitive to broken behavior and tolerant of implementation changes that preserve correct behavior.
  • If a test is useless, delete it.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

check

무료

Use this skill to check Topcoat changes locally before committing or opening a pull request. It runs the project’s Rust formatting, lint, test, and documentation commands, plus browser project checks when relevant, so problems can be caught before review.

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

  • Checking a Rust change before committing
  • Validating browser project changes
  • Building project documentation locally
tokio-rs/topcoat6.2천2026년 10월 25일 업데이트

commit

무료

Use this skill to write concise commit messages in the Topcoat project’s Conventional Commits format. It helps choose a change type and scope, describe the update clearly, and mark breaking changes so release notes and version bumps can be based on commit history.

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

  • Writing a commit message for a code change
  • Choosing a commit type and scope
  • Marking a breaking change and migration note
tokio-rs/topcoat6.2천2026년 10월 25일 업데이트

macro

무료

Use this skill when building procedural macros for Topcoat in Rust. It explains how to preserve parsed syntax in AST nodes, separate parsing from meaning, and keep macro entry points focused on parsing input, expanding valid code, and reporting errors.

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

  • Designing AST nodes for a procedural macro
  • Parsing custom syntax while preserving tokens
  • Organizing a macro entry point and code generation
tokio-rs/topcoat6.2천2026년 10월 25일 업데이트

pr

무료

Use this skill to prepare a Topcoat pull request from the full branch diff. It guides you to write a Conventional Commits title and a concise body covering the change, verification performed, and an AI-use disclaimer when an agent creates the PR.

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

  • Writing a pull request title from the net branch change
  • Summarizing a diff and the checks performed
  • Adding the required AI-use disclosure to a PR
tokio-rs/topcoat6.2천2026년 10월 25일 업데이트

prose

무료

Use this skill to write long-form Markdown guides for Topcoat. It covers where documentation sources belong, how to structure explanations from basic to advanced, and how to keep prose plain, concise, and easier to maintain as implementations change.

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

  • Planning where a guide and its links should live
  • Structuring a guide from basic to advanced use
  • Editing Markdown for clear, maintainable prose
tokio-rs/topcoat6.2천2026년 10월 25일 업데이트

tokio-rs의 스킬 모두 보기

이 스킬의 문제 신고