
Self Documenting Code
Self-documenting code guide that splits logic into semantic and pragmatic functions and models with compile-time-safe shapes.
- CCM score
- 50 of 100
- skills.sh installs
- 152
- GitHub stars
- 6
- last updated
- Jun 3, 2026
Own this skill? Claim it
What it does
- Covers how to split logic into semantic functions (reusable, side-effect-free building blocks) and pragmatic functions (messy production flows)
- Explains that models should make invalid states unrepresentable, using composed types and brand types like
DocumentId(UUID)to prevent ID mix-ups - Guards against drift by naming functions after where they are used and splitting models whose fields stop cohering around their name
- Designed for teams maintaining long-lived codebases where humans and agents must read code without relying on comments
Install
$ npx -y skills add theswerd/aicode --skill self-documenting-code -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Code should be self documenting
How you split logic into functions and shape the data they pass around determines how well a codebase holds up over time.
Semantic Functions
Semantic functions are the building blocks of any codebase, a good semantic function should be as minimal as possible in order to prioritize correctness in it. A semantic function should take in all required inputs to complete its goal and return all necessary outputs directly. Semantic functions can wrap other semantic functions to describe desired flows and usage; as the building blocks of the codebase, if there are complex flows used everywhere that are well defined, use a semantic function to codify them.
Details
- Repository
- github.com/theswerd/aicode
- Categories
- Code Review & Quality, Technical Documentation
- First seen
- Jun 3, 2026
Similar to Self Documenting Code
More Code Review & Quality
karpathy-guidelinesmultica-ai/andrej-karpathy-skills48.8K installsBehavioral guidelines that steer LLM coding toward simpler, surgical, verifiable changes.
solidramziddin/solid-skills3.7K installsOpinionated guide that turns coding work into senior-level practice through TDD, SOLID principles, and clean-code rules.
code-documentationaj-geddes/useful-ai-prompts502 installsStructured documentation guidance covering JSDoc, Python docstrings, JavaDoc, and inline comments for functions, classes, and modules.
clean-codesickn33/agentic-awesome-skills13.2K installsClean-code design heuristics from Robert C. Martin for refactoring, reviewing, and writing code that others can read.
typescriptmindrally/skills1K installsOpinionated TypeScript style guide that enforces type safety, functional patterns, and naming conventions.
code-documentation-code-explainsickn33/agentic-awesome-skills1K installsStructured walkthroughs that explain complex code, algorithms, or system flows with diagrams and progressive detail.