xiaohongshu
xiaohongshu
kalahari-coding
Core coding patterns and conventions for Kalahari project. MUST be used by all code-related agents.
Full skill instructions
core::ArtProvider::getInstance().getIcon("cmd_id")
core::ArtProvider::getInstance().createAction("cmd_id", parent) // for QAction with auto-refresh
QIcon("path/to/icon.svg") // hardcoded path
resources/icons/icon_registrar.cpp (gui::registerAllIcons())QColor primary = core::ArtProvider::getInstance().getPrimaryColor();
QColor secondary = core::ArtProvider::getInstance().getSecondaryColor();
core::ArtProvider::getInstance().setPrimaryColor(QColor("#hex"));
core::ArtProvider::getInstance().setSecondaryColor(QColor("#hex"));
QColor(255, 0, 0) // hardcoded color
Theme::instance().getColor() // DOES NOT EXIST!
auto& settings = core::SettingsManager::getInstance();
std::string value = settings.getValue("key", "default");
settings.setValue("key", "value");
// hardcoded configuration values
const int MAX_SIZE = 100; // should be in settings
tr("User visible text")
tr("Format: %1").arg(value)
"Hardcoded string" // not translatable
const core::Theme& theme = core::ThemeManager::getInstance().getCurrentTheme();
// Access theme colors:
theme.colors.primary
theme.colors.secondary
theme.palette.toQPalette()
theme.log.info // log panel colors
Use the automated script scripts/add_theme_color.py for adding colors to the theme system.
Basic usage (5 files modified):
python scripts/add_theme_color.py <color_name> <dark_value> <light_value> -d "description"
With Settings UI integration (9 files modified):
python scripts/add_theme_color.py <color_name> <dark_value> <light_value> -d "description" -l "Label" -s
Parameters:
color_name: camelCase name (e.g., infoPrimary)dark_value: hex color for Dark theme (e.g., #6B9BD2)light_value: hex color for Light theme (e.g., #3D6A99)-d/--description: description for C++ comments-l/--label: display label in Settings UI-s/--add-to-settings: add to Settings dialog UIFiles modified by script:
resources/themes/Dark.json - dark theme color valueresources/themes/Light.json - light theme color valueinclude/kalahari/core/theme.h - QColor member in Theme structsrc/core/theme.cpp - fromJson/toJson serializationsrc/core/theme_manager.cpp - fallback, applyColorOverrides, setColorOverride-s): settings_data.h, settings_dialog.h, settings_dialog.cpp, main_window.cppExample:
python scripts/add_theme_color.py htmlHeading "#4A90D9" "#2E5C8A" -d "HTML heading color" -l "Heading" -s
NEVER add theme colors manually - always use the script to ensure consistency across all 5-9 files.
core::Logger::getInstance().info("Message: {}", value);
core::Logger::getInstance().debug("Debug: {}", value);
core::Logger::getInstance().warn("Warning: {}", value);
core::Logger::getInstance().error("Error: {}", value);
QVBoxLayout* mainLayout = new QVBoxLayout(this);
QHBoxLayout* rowLayout = new QHBoxLayout();
QGroupBox* group = new QGroupBox(tr("Title"));
#include "kalahari/gui/utils/layout_utils.h"
// ALWAYS - properly handles nested layouts
kalahari::gui::utils::clearLayout(m_contentLayout);
// NEVER - leaks nested layouts
while (QLayoutItem* item = layout->takeAt(0)) {
delete item->widget();
delete item;
}
scripts/build_windows.bat Debug
scripts/build_linux.sh
| Type | Convention | Example |
|---|---|---|
| Files | snake_case | character_card.cpp |
| Classes | PascalCase | CharacterCard |
| Methods | camelCase | getTitle() |
| Members | m_prefix | m_title |
| Constants | UPPER_SNAKE_CASE | MAX_CHAPTERS |
| Namespaces | lowercase | kalahari::core |
| Class | Access Method | Namespace |
|---|---|---|
| ArtProvider | getInstance() | kalahari::core |
| SettingsManager | getInstance() | kalahari::core |
| ThemeManager | getInstance() | kalahari::core |
| IconRegistry | getInstance() | kalahari::core |
| Logger | getInstance() | kalahari::core |
| CommandRegistry | getInstance() | kalahari::gui |
Use for understanding and navigating Kalahari codebase:
When to use:
Use for Qt6 and other library documentation:
mcp__context7__resolve-library-id("Qt6") # get library ID (once)
mcp__context7__get-library-docs("/qt/qtdoc", topic="QDockWidget")
When to use:
| Need | Tool |
|---|---|
| Qt6 API reference | Context7 |
| Qt6 signals/slots | Context7 |
| External library docs | Context7 |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience