Agent skill
Core/Std Boundary
modules/* の core と std の依存境界を守る依頼で使う。core は no_std のみに依存し、std は std/tokio などに依存できる。テストコードは例外。
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/core-std-boundary
SKILL.md
Core/Std Boundary
modules/* における core と std の依存境界を守るためのガイド。
ルール(最優先)
- core は no_std のみ:
stdやtokioなどの依存は禁止 - std は std/tokio 等が利用可: OS/IO/スレッド/タイマなどは
std側に集約 - テストコードは例外:
core配下でもテスト専用コードではstd依存を許容 - ランタイム本体で cfg(feature = "std") による分岐は入れない(テスト内は可)
進め方
- 変更対象が core / std のどちらかを判定
- 依存の追加が必要なら置き場所を再考
std依存が必要ならstd側へ移動coreにはallocやcore、プロジェクト内の no_std 準拠モジュールのみ
- 境界をまたぐ場合は interface を core に置く
- trait / struct / enum を core に置き、std 実装は std 側に置く
- テストは例外扱いにする
tests/やcfg(test)の範囲でstdを使う- 本体コードに
std依存が混ざらないよう分離
チェックリスト
- core に
std/tokio/ OS API が入っていないか - std にしか置けない処理が core に残っていないか
- core の public API が std に引きずられていないか
- テストコードが本体に混ざっていないか
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?