소스 정보
- 저장소
- mratsim/tattletale
- 최근 소스 활동
- 2026년 2월 9일 13:03
- 감지된 SKILL.md 언어
- 영어
- 스타
- 40
- 포크
- 4
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/mratsim/tattletale --skill nim-imports명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Nim testing conventions, unittest framework, and C++ compatibility patterns
Repository documentation contract for the Tattletale monorepo: the house style for doc comments, module headers, inline comments, and any committed prose (what-over-how, contracts over narration, banned-vocabulary blocklist, format rules, seven canonical reference files). Use when writing or updating doc comments, module headers, inline comments, or any prose in this repo, or when de-sloping existing comments.
Nim bindings to libtorch for tensor operations with high-level sugar
SOC 직업 분류 기준
SKILL.md 표시 중
| name | nim-imports |
| description | Common import patterns and pitfalls for the Tattletale Nim project |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","workflow":"nim-development"} |
I provide guidelines for importing modules and common pitfalls in the Tattletale Nim project.
/home/beta/Programming/Perso/tattletale/
├── config.nims # Project-level config with paths and tasks
├── workspace/
└── mylib/ # First-party libraries
├── mylib.nim # Re-exports all public symbols
├── src/
│ └── mylib.nim # Implementation
└── tests/
└── test_mylib.nim # Tests
import workspace/mylib # Imports from mylib.nim which re-exports
Note: Do NOT use import workspace/mylib/mylib - the .nim extension and file path are handled by the config.nims --path:"." setting.
import pkg/jsony # For packages installed via nimble
import std/tables # For stdlib modules
import std/os
import std/json
import std/sequtils # IMPORTANT: Required for mapIt
Always import std/sequtils when using mapIt:
import std/sequtils # MISSING import causes: "undeclared identifier: mapIt"
let nums = @[1, 2, 3]
let doubled = nums.mapIt(it * 2) # Fails without sequtils import
WRONG:
import toktoktok # Fails - not in stdlib or pkg
import workspace/toktoktok/toktoktok.nim # Wrong path
CORRECT:
import workspace/toktoktok # Imports the re-export module
pkg/ - Third-party packages installed via nimble (e.g., jsony, chronos)workspace/ - First-party project librariesimport pkg/jsony # Third-party JSON library
import workspace/toktoktok # Your project's tokenizer
To access private (non-*) procedures from a module, use the {.all.} pragma:
import workspace/toktoktok {.all.}
# Now you can access bytePairEncode and bytePairMerge even though they were private
let ranks = initTable[seq[byte], int]()
ranks[@[byte(228), byte(189)]] = 19526
let result = bytePairEncode(piece, ranks)
For accessing private fields of objects, use std/importutils with privateAccess:
# file_a.nim
type MyObjectA* = object # public
privateFieldA: int # privaterivate
# file_b.nim
type MyObjectB = object # private
privateFieldB: int # private
# file_c.nim
import std/importutils
import file_a # MyObjectA is public
import file_b {.all.} # MyObjectB is private
block:
privateAccess(MyObjectA)
let obj = MyObject(privateFieldA: 42)
echo obj.privateFieldA # Accessible in this scope
block:
privateAccess(MyObjectB)
let obj = MyObject(privateFieldB: 42)
echo obj.privateFieldB # Accessible in this scope
Each workspace library should have a re-export module at the root:
# workspace/mylib/mylib.nim
# Re-exports all public symbols from src/ and submodules
export src/mylib
This allows users to import workspace/mylib instead of knowing the internal structure.
PCRE2 is vendored in workspace/pcre2. The config.nims automatically sets:
No manual configuration needed - just import workspace/pcre2.
The project root has a config.nims that sets:
--path:"." - Allows import workspace/foo syntaxTests are discovered by:
workspace/*/tests/ directorytest_ or t_