codebase-layout
БесплатноБез исполняемых скриптовНе проверенCodebase organization for pikru. Use when you need to find where specific functionality lives.
Об этом скилле
Pikru Codebase Organization
Top-Level Structure
src/- Main pikru library (parsing and rendering)crates/- Supporting cratesvendor/pikchr-c/- Original C implementation and test filesexamples/- Example programstests/- Integration tests
Main Library (src/)
Entry Point
src/lib.rs- Public API, exports key types and functions
Parsing
src/parse.rs- Parser implementation (statement parsing, token handling)src/ast.rs- AST types (Statement, Expr, ObjectClass, etc.)src/types.rs- Core types (ClassName, Direction, EdgePoint, etc.)
Rendering
src/render/mod.rs- Main renderer logic- Object placement and geometry
- Text positioning (ljust/rjust logic at lines 1265-1550)
- Variable scope and context management
src/render/eval.rs- Expression evaluation (positions, scalars, variables)src/render/svg.rs- SVG generation (converts shapes to SVG elements)src/render/geometry.rs- Shape geometry (boxes, circles, paths, files)src/render/shapes.rs- Shape rendering (specific shape implementations)src/render/types.rs- Render types (PObject, Style, PositionedText, etc.)src/render/path_builder.rs- Path construction (line/arrow building)src/render/context.rs- Render context (variable scopes, state)src/render/defaults.rs- Default values (line width, font size, etc.)
Error Handling
src/errors.rs- Error types and reportingsrc/macros.rs- Helper macros
Supporting Crates
crates/pikru-compare/
SVG comparison utilities for testing
src/lib.rs- Core comparison logiccompare_outputs()- Main comparison functionCompareResult::is_match()- Determines if test passes- Handles error matching, SVG parsing, tolerance
- Used by: test harness, MCP server
crates/pikru-mcp/
MCP server for test running
src/tools.rs- MCP tool implementationsrun_pikru_test()- Run single test, returns comparisonlist_pikru_tests()- List available testsdebug_pikru_test()- Run with trace output
src/main.rs- MCP server entry point
Test Files
Location
vendor/pikchr-c/tests/*.pikchr - Test input files from C implementation
Categories
test01-test81- Numbered feature testsautochop*.pikchr- Arrow chopping tests- Other specialized tests
Common Debugging Paths
Text Positioning Issues
- Check
src/render/mod.rs:1265-1550- ljust/rjust calculation - Check
src/render/svg.rs:294- Text anchor assignment - Check
src/render/types.rs- PositionedText structure
Rendering Issues
- Check
src/render/shapes.rs- Shape-specific rendering - Check
src/render/geometry.rs- Geometric calculations - Check
src/render/svg.rs- SVG element generation
Parsing Issues
- Check
src/parse.rs- Parser logic - Check
src/ast.rs- AST node definitions
Test Comparison Issues
- Check
crates/pikru-compare/src/lib.rs- Comparison logic - Check tolerance constants (FLOAT_TOLERANCE, SIMILARITY_THRESHOLD)
Key Code References (cref comments)
Many functions include // cref: comments pointing to the original C implementation:
- Format:
// cref: function_name (pikchr.c:line_number) - Use these to cross-reference with C implementation when debugging
Установить codebase-layout в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл codebase-layout?
Codebase organization for pikru. Use when you need to find where specific functionality lives.
Как установить скилл codebase-layout?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл codebase-layout запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic