ui-ux-guidelines
UI/UX best practices for obsidian-gemini plugin development. Covers modal sizing, text overflow, message formatting, collapsible UI, animations, icons, file chips, session state, CSS containment, and theme compatibility. Use this skill when building or modifying UI components.
Best use case
ui-ux-guidelines is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
UI/UX best practices for obsidian-gemini plugin development. Covers modal sizing, text overflow, message formatting, collapsible UI, animations, icons, file chips, session state, CSS containment, and theme compatibility. Use this skill when building or modifying UI components.
Teams using ui-ux-guidelines should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ui-ux-guidelines/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ui-ux-guidelines Compares
| Feature / Agent | ui-ux-guidelines | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
UI/UX best practices for obsidian-gemini plugin development. Covers modal sizing, text overflow, message formatting, collapsible UI, animations, icons, file chips, session state, CSS containment, and theme compatibility. Use this skill when building or modifying UI components.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# UI/UX Best Practices
## When to use this skill
Use this skill when:
- Building or modifying UI components in the plugin
- Implementing views, modals, or interactive elements
- Working on styling, layout, or theming
- Reviewing UI code for consistency and quality
For Obsidian-specific API guidance (views, modals, workspace, DOM helpers), also refer to the **obsidian-plugin-development** skill.
## Guidelines
### 1. Modal Sizing
Use the `:has()` CSS selector to target parent containers for proper width constraints. Obsidian wraps modal content in container elements, so direct width on the modal class may not be enough.
```css
.modal-container:has(.my-modal) {
max-width: 800px;
}
```
### 2. Text Overflow
Always handle long text with `text-overflow: ellipsis` and proper flex constraints. This prevents layout breaking with long file names, paths, or user input.
```css
.truncated-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0; /* Required for flex children */
}
```
### 3. Message Formatting
Convert single newlines to double newlines for proper Markdown rendering in chat and agent views. Obsidian's Markdown renderer requires double newlines for paragraph breaks.
### 4. Collapsible UI
Use compact views by default with expandable details for complex information. This keeps the interface clean while still providing access to detailed data (e.g., tool call results, debug info, context trees).
### 5. Animations
Add subtle transitions and animations for a professional feel. Use CSS transitions for state changes (expand/collapse, show/hide) rather than abrupt visibility toggling.
```css
.expandable {
transition: max-height 0.2s ease-out;
overflow: hidden;
}
```
### 6. Icon Usage
Use Obsidian's built-in Lucide icons via `setIcon()` for consistency with the Obsidian ecosystem. Do not import icon libraries separately.
```typescript
import { setIcon } from 'obsidian';
const iconEl = containerEl.createDiv('my-icon');
setIcon(iconEl, 'file-text');
```
### 7. File Chips (@ mentions and file references)
When implementing @ mentions or file reference chips:
- Use `contenteditable` divs with proper event handling
- Convert chips to Markdown links (`[[file]]`) when saving to history
- Position cursor after chip insertion for natural typing flow
- Handle backspace to delete chips as single units
### 8. Session State
Maintain clean session boundaries:
- Clear context files when creating new sessions
- Reset permissions and state when loading from history
- Track session-level settings separately from global settings
- Do not carry over stale state between sessions
### 9. CSS Containment
Ensure proper CSS containment to prevent overflow issues. Use `overflow: hidden` or `overflow: auto` on containers that might have variable-size content. Set explicit dimensions or max-dimensions on containers.
### 10. Theme Compatibility
Use Obsidian's theme CSS variables for consistent styling. Test with different Obsidian themes (light and dark).
```css
/* GOOD: Uses theme variables */
.my-element {
color: var(--text-normal);
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
}
/* BAD: Hardcoded colors */
.my-element {
color: #333;
background-color: white;
}
```
Key theme variables:
- `--text-normal`, `--text-muted`, `--text-faint` for text colors
- `--background-primary`, `--background-secondary` for backgrounds
- `--background-modifier-border` for borders
- `--interactive-accent` for interactive/highlighted elements
- `--font-ui-small`, `--font-ui-medium` for font sizesRelated Skills
vault-semantic-search
Search vault notes by meaning using semantic search (RAG). Activate this skill when users want to find notes by concept or topic rather than exact keywords, or when keyword search tools return poor results.
recall-sessions
Search past agent conversations to recall prior discussions, decisions, and context. Activate this skill when users ask about previous conversations, want to resume past work, or reference earlier decisions.
obsidian-properties
Work with Obsidian note properties (frontmatter). Activate this skill when users want to add, modify, or organize properties, understand property types, format YAML frontmatter, or use properties with templates, search, or Bases.
obsidian-bases
Create and configure Obsidian Bases — database-like views of notes. Activate this skill when users want to create bases, write filters, formulas, or set up table/cards/list/map views.
image-generation
Generate images from text descriptions and save them to the vault. Activate this skill when users want to create illustrations, diagrams, visual content, or any AI-generated images.
gemini-scribe-help
Answer questions about Gemini Scribe plugin features, settings, and usage. Activate this skill when users ask how to use the plugin, configure settings, or troubleshoot issues.
deep-research
Conduct comprehensive, multi-source research and generate cited reports. Activate this skill when users want in-depth research on a topic, need synthesis across web and vault sources, or want a structured research report saved to their vault.
audio-transcription
Transcribe audio and video files into structured notes. Activate this skill when users want to transcribe recordings, meetings, podcasts, voice memos, or any audio/video content in their vault.
release-process
Full release workflow for obsidian-gemini: update release notes, run checks, bump version with npm, create a GitHub release, and verify. Use this skill when preparing a new plugin release.
obsidian-plugin-development
Build, modify, and debug Obsidian plugins using the TypeScript API. Use this skill when working with Obsidian plugin source code, the obsidian npm package, plugin UI (views, modals, settings, commands, ribbons), vault file operations, editor manipulation, workspace management, metadata cache, events, markdown rendering, or the Obsidian CLI. Covers plugin lifecycle, best practices, common patterns, and the full TypeScript API surface.
obsidian-cli
Use the Obsidian CLI to debug, inspect, and test Obsidian plugins during development. Covers plugin reloading, console inspection, runtime evaluation, and common debugging recipes for the gemini-scribe plugin.
gemini-api-dev
Use this skill when building applications with Gemini models, Gemini API, working with multimodal content (text, images, audio, video), implementing function calling, using structured outputs, or needing current model specifications. Covers SDK usage (google-genai for Python, @google/genai for JavaScript/TypeScript, com.google.genai:google-genai for Java, google.golang.org/genai for Go), model selection, and API capabilities.