💬 Sample prompts Paste any of these into Claude Code to use this skill
Read my settings adom-cli carbon user get | jq '.hydrogen_preferences.settings'
Set a preference adom-cli carbon user hydrogen-settings '{"key":"desktop.enabled","value":true}'
Delete a key adom-cli carbon user hydrogen-settings '{"key":"desktop.enabled","value":null}'
Install this skill

Paste this into Claude Code (VS Code panel, Adom editor, or terminal) to install:

Search the Adom Wiki for the skill "Carbon Preferences API" (slug: carbon-preferences) at https://wiki-ufypy5dpx93o.adom.cloud/wiki/skills/carbon-preferences and install it into my local ~/.claude/skills/carbon-preferences/ directory. Fetch the skill_source content from the wiki page and save it as SKILL.md. Then confirm it's installed by showing the first 5 lines.
?
What is a skill? Skills are instructions that teach AI assistants like Claude Code how to perform specific tasks. The description below is loaded into the AI as context when you invoke this skill. Well-written skills make the AI significantly more effective. Like Wikipedia, anyone can improve a skill by clicking Edit AI Skill — or have your AI submit an edit on your behalf.

Description

Edit AI Skill

Carbon Preferences API

Store and retrieve per-user key-value pairs via the Carbon hydrogen_preferences object. Adrian built this for Hydrogen's theme/UI settings, but it works for any lightweight per-user config (adom-desktop flags, feature toggles, timestamps, etc.).

Hard limit

10 MB total per user. Keep individual values small. Don't dump logs, blobs, or large JSON objects into preferences.

Data model

GET /user returns the authenticated user. The hydrogen_preferences field contains three sections:

hydrogen_preferences: {
  settings:    Record<string, string | number | boolean>
  keybindings: Record<string, string>
  extensions:  Record<string, { version: string, enabled: boolean }>
}

Reading preferences

Read via GET /user and extract the hydrogen_preferences field.

CLI

# Full user profile (hydrogen_preferences is a top-level field)
adom-cli carbon user get

# Extract just settings with jq
adom-cli carbon user get | jq '.hydrogen_preferences.settings'

# Get a single setting
adom-cli carbon user get | jq -r '.hydrogen_preferences.settings["general.appearance.theme"]'

curl (from container)

API_KEY=$(cat /var/run/adom/api-key)
curl -s -H "Cookie: session_token=$API_KEY" https://carbon.adom.inc/user \
  | jq '.hydrogen_preferences'

JavaScript (Hydrogen web)

const user = await get(`${API_BASE_URL}/user`);
const theme = user.hydrogen_preferences.settings['general.appearance.theme'];

Tauri (Hydrogen Desktop)

const { invoke } = await import('@tauri-apps/api/core');
const result = await invoke('auth_proxy', { path: '/user', method: 'GET' });
const settings = result.data.hydrogen_preferences.settings;

Writing settings

Endpoint

PATCH /user/hydrogen/settings
Content-Type: application/json

Request body

{ "key": "dotted.key.name", "value": "<string | number | boolean | null>" }
  • key -- dotted lowercase string matching ^(?:[a-z0-9_]+)(?:\.[a-z0-9_]+)*$
  • value -- string, number (f64), boolean, or null to delete

One key per request. Returns { "status": 200 } on success.

CLI

# Set a boolean
adom-cli carbon user hydrogen-settings '{"key":"desktop.enabled","value":true}'

# Set a string
adom-cli carbon user hydrogen-settings '{"key":"desktop.last_slug","value":"john-myproject-abc123"}'

# Set a number
adom-cli carbon user hydrogen-settings '{"key":"desktop.last_connect_epoch","value":1747612800}'

# Delete a key (set value to null)
adom-cli carbon user hydrogen-settings '{"key":"desktop.enabled","value":null}'

curl (from container)

API_KEY=$(cat /var/run/adom/api-key)
curl -s -X PATCH https://carbon.adom.inc/user/hydrogen/settings \
  -H "Cookie: session_token=$API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"desktop.enabled","value":true}'

JavaScript (Hydrogen web)

await patch(`${API_BASE_URL}/user/hydrogen/settings`, {
  key: 'general.appearance.theme',
  value: 'adom-light'
});

Tauri (Hydrogen Desktop)

await invoke('auth_proxy', {
  path: '/user/hydrogen/settings',
  method: 'PATCH',
  body: { key: 'desktop.enabled', value: true }
});

Writing keybindings

Endpoint

PATCH /user/hydrogen/keybindings
Content-Type: application/json

CLI

adom-cli carbon user hydrogen-keybindings '{"key":"editor.save","value":"Ctrl+S"}'

Key naming conventions

Use dotted namespaces to avoid collisions. Third-party tools (adom-desktop, CLI tools, etc.) MUST use their own namespace prefix so they never clobber keys the Hydrogen frontend uses.

NamespaceOwnerExamples
general.*Hydrogen frontendgeneral.appearance.theme, general.developer_mode
schematic.*Hydrogen schematic editorschematic.nudge_amount.small
3d.*Hydrogen 3D viewer3d.control_style
code.*Hydrogen code editorcode.vim_emulation_mode
simulator.*Hydrogen simulatorsimulator.code_editor_position
desktop.*adom-desktop / HDdesktop.enabled, desktop.last_connect_epoch, desktop.last_slug

Rule: Never write to general.*, schematic.*, 3d.*, code.*, simulator.*, or extensions.* -- those belong to the Hydrogen frontend. Pick a unique prefix for your tool (e.g., desktop.*, chipfit.*, tsci.*).

Known Hydrogen settings (defined in settings tree)

These have schema definitions with types, defaults, and validation:

KeyTypeDefaultDescription
general.developer_modebooleanfalseDeveloper mode
general.pane_focus_modebooleantrueOnly focused pane is active
general.appearance.themestringadom-darkTheme
general.appearance.user_interface_stylestringstandardUI density (standard, compact)
schematic.nudge_amount.smallnumber1Arrow key nudge (px)
schematic.nudge_amount.largenumber8Shift+arrow nudge (px)
schematic.invert_zoom_directionbooleanfalseInvert scroll zoom
schematic.default_cursorstringcrosshairDefault cursor
3d.control_stylestringfusion3D controls (fusion, solidworks, blender)
3d.invert_zoom_directionbooleanfalseInvert 3D scroll zoom
code.appearance.font.familystringDM MonoCode font
code.line_numbers.enabledbooleantrueShow line numbers
code.line_numbers.stylestringabsoluteLine number style
code.vim_emulation_modebooleanfalseVim mode
simulator.code_editor_positionstringrightCode panel position

Custom keys (like desktop.*) are not in this schema -- they are stored and returned as-is with no server-side validation.

Behavior notes

  • Setting a value to null deletes the key entirely (not stored as null)
  • Setting a value equal to the schema default in the Hydrogen frontend also deletes it (clean storage)
  • Keys not in the schema are accepted and stored -- no server-side key validation
  • One key per PATCH request; batch by issuing multiple requests
  • Auth: same as all Carbon endpoints -- session token cookie or X-Api-Key header
  • The full preferences object is returned inline with every GET /user call, so there's no separate GET endpoint for just preferences

Sub-Skills
?
What are Sub-Skills?

Sub-skills are community-contributed AI skill extensions for this component. They teach AI assistants about specific tools, configurators, or workflows.

Examples:

  • A manufacturer’s configuration tool for a motor controller
  • A community-written design guide for an amplifier circuit
  • An automated test/validation script for a sensor module

How to add one: Click Add Sub-Skill, provide the URL to your skill and a brief description. Submissions are reviewed by the Adom team before going live.

No sub-skills yet. Be the first to contribute one!

Recent activity

1 commit
  • 🏷
    Release v1.0.0 John Lauer 6 days ago
    Initial publish — documents the hydrogen_preferences key-value store for cross-app cloud settings
0 revisions · Updated 2026-05-21 22:58:05