← Back to Skills Marketplace
utkarshthedev

Lg Thinq Universal

by Utkarsh Tiwari · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
384
Downloads
1
Stars
1
Active Installs
32
Versions
Install in OpenClaw
/install lg-thinq-universal
Description
Universal LG ThinQ device setup and control. Discovers appliances and generates secure device skills.
README (SKILL.md)

LG ThinQ Universal Manager

🎯 Goal

Provide a secure, automated gateway for LG ThinQ device integration. This skill acts as a discovery engine and skill generator, allowing users to control their appliances via OpenClaw without duplicating sensitive credentials across multiple files.

📦 Supply Chain & Dependencies

For transparency and security, this skill performs the following automated installation steps:

  1. Python Virtual Environment: Created locally within the skill directory to ensure isolation.
  2. External Packages (via PyPI):
    • requests: Used for secure communication with the LG ThinQ API.
    • python-dotenv: Used for local management of the LG_DEVICE_ID.
  3. Network Access: The installation script connects to pypi.org to download these libraries.

🔑 Obtaining Credentials

If the user asks how to get their tokens, provide these instructions:

  1. Visit the Portal: https://connect-pat.lgthinq.com
  2. Log In: Use your official LG ThinQ account.
  3. Create Token: Click "ADD NEW TOKEN", give it a name (e.g., "OpenClaw"), and select the required features.
  4. Copy PAT: Copy the generated Personal Access Token (PAT) immediately.
  5. Identify Country: Use your 2-letter ISO country code (e.g., US, IN, GB).

🛠️ Prerequisites

The agent MUST ensure the following are set before proceeding:

  1. LG_PAT: Stored in shell environment or root .env.
  2. LG_COUNTRY: Stored in shell environment or root .env.

🔄 Agent Workflow (Mandatory)

Follow these steps in order when a user requests setup:

Step 1: Discovery

Run the automated discovery script. It validates configuration and prepares the device database.

Mandatory Safety Flow:

  1. Generate Manifest: Run ./setup.sh (without flags).
  2. Brief User: Present the Manifest and explain exactly what actions will be performed.
  3. Ask for Permission: Use ask_user to obtain explicit consent.
  4. Execute: Only after approval, run: ./setup.sh --confirm.

Step 2: Assemble Workspace

Review the output from Step 1. Present the discovered devices to the user. Once an ID is selected, move immediately to assembly:

  1. Generate Manifest: Run python3 scripts/assemble_device_workspace.py --id \x3CDEVICE_ID> (without flags).
  2. Ask for Permission: Use ask_user to obtain consent for the file/directory operations.
  3. Execute: Run: python3 scripts/assemble_device_workspace.py --id \x3CDEVICE_ID> --confirm.

Step 3: Document and Persist

After the assembly script completes, you MUST immediately:

  1. Analyze: Review the [AVAILABLE COMMANDS] and [ENGINE CODE] printed by the script.
  2. Consult Reference: Read references/api-reference.md for technical headers and control logic.
  3. Generate SKILL.md: Create the documentation in the new directory using references/device-skill-template.md as your guide.
  4. Persistence: Save the trigger phrase, skill path, and command summary into your global MEMORY.md.

⌨️ Universal Management Commands

Use these commands for maintenance and discovery:

Command Description Use Case
python scripts/lg_api_tool.py list-devices List all linked appliances Verify connectivity
python scripts/lg_api_tool.py save-route Discover regional server Fix "Route not found" errors
python scripts/lg_api_tool.py get-state \x3Cid> Get raw device state Deep debugging
python scripts/lg_api_tool.py --help Show all API tool options Explore advanced features

🛡️ Security Mandates

  1. Zero-Leak Policy: NEVER ask the user to paste their LG_PAT into the chat.
  2. Credential Isolation: NEVER copy LG_PAT into generated device skill directories. Only LG_DEVICE_ID is permitted in those locations.
  3. Local-Only: All API communication must remain local.

📚 References

Document Purpose
references/skill-creation.md Detailed post-setup workflow for creating device skills
references/skill-generation-guide.md Instructions for building device-specific SKILL.md files
references/manual-setup.md Manual installation steps (without setup scripts)
references/api-reference.md Technical details on API headers and control logic
references/device-example.md Complete example of a generated device skill
references/public_api_constants.json Public API keys and constants used by the scripts

🚨 Error Handling

Symptom Resolution
401 Unauthorized Token expired. Guide user to https://connect-pat.lgthinq.com.
No devices found Verify device is added to the official LG ThinQ App on mobile first.
Permission denied The script should already be executable. If not, inform the developer.
Usage Guidance
What to check and do before installing or running this skill: - Registry vs runtime mismatch: The skill's registry entry claimed no required env vars, but SKILL.md and the code require LG_PAT and LG_COUNTRY. Treat LG_PAT as a sensitive secret — do not paste it into chat. Confirm the registry metadata with the publisher before proceeding. - Inspect setup.sh and scripts locally before running: The package includes a setup.sh that will create a venv and pip install packages. Open setup.sh (and the scripts directory) and verify there are no unexpected remote downloads, obfuscated code, or commands that modify unrelated system paths before executing it. - Review persistence behavior: The skill's workflow insists on writing generated skill files into your skills directory and saving a record to your global MEMORY.md. If you do not want these artifacts or metadata recorded, do not allow automatic persistence; insist that the agent ask for explicit approval each time and consider doing the assembly manually. - Confirm that LG_PAT is never written to generated per-device folders: The SKILL.md repeatedly warns NOT to copy LG_PAT into device skill directories and says only LG_DEVICE_ID goes into per-device .env. After generation, inspect the new skill directories to confirm .env contains only LG_DEVICE_ID and that no file inadvertently contains the PAT. - Network access and API keys: The included public constants (x-api-key, x-client-id) are non-secret and referenced in code; the only secret used is LG_PAT. Ensure you trust the skill owner to use your PAT only with LG ThinQ endpoints. - Test in a safe environment first: If possible, run the setup and generation on a disposable account or isolated machine, or run the discovery steps without the '--confirm' flag to view the manifest and outputs first. When asked for confirmation, require the agent to show the exact file list and the MEMORY.md entry it proposes to write. - If unsure, err on the side of caution: refuse automatic writing to global memory and require the agent to prompt for each network call and file-modifying action. If you want additional confidence, ask the skill author for a signed/published homepage or repo and a changelog, or run the code review by a trusted developer.
Capability Analysis
Type: OpenClaw Skill Name: lg-thinq-universal Version: 1.1.0 The lg-thinq-universal skill is a legitimate tool designed to discover and manage LG ThinQ appliances by generating device-specific sub-skills. It follows a security-conscious 'factory' pattern that isolates the sensitive Personal Access Token (PAT) in the main skill directory while only placing device IDs in generated sub-skills. The code communicates exclusively with official LG ThinQ API endpoints (e.g., api-kic.lgthinq.com) and includes mandatory safety workflows in SKILL.md that require the agent to obtain explicit user consent before performing network calls or file system modifications. No evidence of data exfiltration, malicious persistence, or unauthorized execution was found; the use of shell scripts and code generation is strictly aligned with the stated purpose of home automation integration.
Capability Assessment
Purpose & Capability
The SKILL.md and code clearly require LG PAT and country (LG_PAT, LG_COUNTRY) and perform device discovery, profile fetching, and generation of per-device skills — which is coherent with the declared purpose. However, the registry metadata at the top of the submission incorrectly lists no required environment variables or credentials; that mismatch (manifest vs runtime instructions/code) is an inconsistency that could mislead users about what secrets this skill needs and uses.
Instruction Scope
SKILL.md prescribes agent actions that include network calls to LG APIs, file creation (skill directories, .env per-device), venv creation, and a mandatory ‘persistence’ step that writes trigger phrases/paths/command summaries to a global MEMORY.md. The instructions claim to require explicit ask_user permission but also say certain actions 'MUST' be performed 'immediately' (e.g., persisting to MEMORY.md). Writing to global memory and copying tools into ~/.openclaw/workspace/skills are beyond simple discovery and are noteworthy scope/privilege expansions that the user should explicitly approve.
Install Mechanism
There is no install spec in the registry (instruction-only), but SKILL.md points to and the package includes setup.sh which will create a local venv and pip install dependencies from PyPI (requests, python-dotenv). Installing from PyPI is expected for a Python tool, but because setup.sh runs locally and extracts files/creates venvs, users should inspect setup.sh before running. No remote, opaque download URLs were shown in provided files, which reduces supply-chain risk compared to arbitrary remote binaries.
Credentials
The environment variables required by the runtime (LG_PAT, LG_COUNTRY, and per-device LG_DEVICE_ID) are appropriate for interacting with the LG ThinQ API — that part is proportional. The inconsistency is that registry metadata didn't declare these required env vars. Also the skill will read LG_PAT from shell or project .env and uses it to contact LG servers; the SKILL.md asserts never to write PAT into generated device folders, but the scripts and templates do create .api_server_cache and per-device .env files (the latter intended to contain only LG_DEVICE_ID). Ensure generated files and copy operations truly do not contain PAT or otherwise expose it.
Persistence & Privilege
The skill will create files under the user's skills workspace, create virtual environments, install dependencies, copy tools/constants, and — per SKILL.md and multiple reference docs — persist a summary into a global MEMORY.md (the skill's instructions say to 'MUST immediately' save trigger phrase, path, and command summary). Persisting this metadata to a global memory file is a privileged action (it writes to a global user artifact) and should be explicitly approved by the user. The skill is not always:true, and autonomous invocation is allowed (default), so combined with persistence this increases blast radius if misused; the SKILL.md does instruct prompting for consent, but the obligation to persist 'immediately' is worth flagging.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lg-thinq-universal
  3. After installation, invoke the skill by name or use /lg-thinq-universal
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
**Enhanced documentation and user guidance, expanded references.** - Updated and expanded reference documentation, including `device-example.md`, `device-skill-template.md`, and `skill-generation-guide.md`. - Improved README with clearer setup instructions and maintenance procedures. - Adjusted scripts and tests for better clarity and usability. - No changes to core functionality or workflow; all changes improve guidance and documentation for users and skill developers.
v1.0.0
Initial stable release with enforced security and documentation standards. - Version 1.0.0 introduces formalized setup, safety, and workflow requirements. - Clearly defines agent steps for device discovery, user consent, and workspace generation. - Mandates strict credential isolation and zero-leak policy for user tokens. - Expands documentation with detailed error handling, command usage, and prerequisite procedures. - Maintains full local operation for security.
v0.1.29
- Simplified and clarified the setup and agent workflow, combining verification and setup into one automated discovery step. - Updated environment variable requirements: now explicitly require `LG_PAT` and `LG_COUNTRY` to be set in the shell or root `.env`. - Streamlined the "assemble workspace" process with direct consent and action steps. - Reduced pre-execution briefing and confirmation requirements; the user is now asked for consent at fewer, more targeted stages. - Updated error handling instructions and made maintenance command descriptions more concise. - Improved security section to focus on essentials: no token in chat, no credential copying, and all API calls are local.
v0.1.28
- Added explicit instructions to ensure LG_PAT and LG_COUNTRY are set in the current shell environment before running configuration checks. - Clarified the configuration verification step by splitting it into checking environment variables and running the config tool. - Updated version number from 0.5.0 to 0.5.1 in SKILL.md. - No changes made to core workflows, commands, or security mandates.
v0.1.27
- Added explicit documentation of automated package installation (Python venv, requests, python-dotenv) and outbound connections to PyPI in SKILL.md. - Clarified supply chain transparency and dependencies for improved user awareness and security. - No changes to user workflow, error handling, or agent protocol.
v0.1.26
- Updated documentation in README.md and references/manual-setup.md. - No code or workflow changes. - Version number and main workflow remain unchanged.
v0.1.25
**Introduces manifest-based safety prompts and explicit user consent before sensitive operations.** - Added a manifest-based "Safety Flow": scripts now generate and present a manifest describing planned actions before making changes. - Explicit user permission (`ask_user`) is required before running setup or device assembly scripts. - Updated setup instructions and agent workflow in SKILL.md to reflect the new manifest and consent process. - Enhanced focus on briefing users and obtaining confirmation prior to file or device operations.
v0.1.24
- Added automated device workspace assembly script (`assemble_device_workspace.py`) for streamlined skill generation. - Updated agent workflow to use the new assembly script and guide creation of high-quality SKILL.md documentation from a dedicated template. - Introduced a centralized device discovery database and enhanced device selection process. - Strengthened security by prohibiting both `LG_PAT` and `LG_COUNTRY` from generated device skill directories (only `LG_DEVICE_ID` is allowed). - Skill now saves trigger phrase, skill path, and command summary into the user's MEMORY.md after setup.
v0.1.23
- Clarified the agent's "Confirmation Protocol" to require explicit explanation and user consent before every network call, file write, or device control command. - Updated documentation in SKILL.md for improved guidance around security and user prompting. - No functional or API changes; documentation and workflow clarification only.
v0.1.22
- Added an install section specifying `./setup.sh` for installation. - Updated the agent workflow to require mandatory user confirmation (via `ask_user`) before running `setup.sh`, including an option for the user to view the script. - Clarified that `setup.sh` both creates a Python virtual environment and fetches device profiles. - No changes to the skill's logic or features beyond enhanced security workflow.
v0.1.21
- Added "LG_DEVICE_ID" as a required variable under the "vars" section. - Included a metadata field specifying an OpenClaw emoji badge ("🔐"). - No functional or behavioral changes to the skill logic itself—documentation update only.
v0.1.20
- Documentation rewritten for improved clarity and guidance. - Added step-by-step instructions for obtaining an LG PAT token. - Expanded workflow details for setup, device discovery, and skill generation. - Enhanced security mandates and error handling guidance. - Updated management and maintenance command references. - Clarified intent and use cases for the skill.
v0.1.19
- Added README.md and testing scaffold for better documentation and testing. - Added sample device profile JSON for device development and integration. - Minor updates to setup script and main control scripts to support new documentation and testing files.
v0.1.18
**Improved environment variable management and documentation.** - Explicitly lists required environment variables (`LG_PAT`, `LG_COUNTRY`) in metadata and documentation. - Clarifies security protocols: recommend shell environment over `.env` files; streamlines guidance for storing credentials. - Updates quick start and security instructions for better clarity and accuracy. - Revised documentation files to match new environment and credential handling practices. - No changes to core command-line operations or usage flow.
v0.1.17
Version 0.4.0 (major update) - Added setup script (setup.sh) and requirements.txt for simplified installation and environment validation. - Expanded documentation with new guides: manual setup and step-by-step skill creation references. - Streamlined quick start instructions and clarified required environment variables. - Enhanced security mandates: minimal credential storage, environment precedence, and explicit consent for actions. - Improved and reorganized usage workflow for device discovery, integration, and script generation. - Refined sample commands and documentation in SKILL.md for better clarity and usability.
v0.1.16
- Added optional environment variable LG_API_SERVER for custom API routing, auto-set by save-route. - Improved setup instructions: save-route step now discovers and caches the API server URL. - Updated documentation to reflect dependency on LG_API_SERVER and revised environment preparation workflow.
v0.1.15
- Updated scripts/lg_api_tool.py. - No changes to documentation or user-facing workflow. - Version remains at 0.1.0 in SKILL.md.
v0.1.14
- Updated `scripts/lg_api_tool.py` with code or logic changes (details not specified). - No updates to documentation or workflow instructions in SKILL.md. - Version increased from 0.1.13 to 0.1.14.
v0.1.13
- Added or updated functionality in scripts/lg_api_tool.py. - Version bump to 0.1.13. - No user-facing documentation changes in SKILL.md. - Minor internal code improvements in the API tool script.
v0.1.12
- Improved scripts/generate_control_script.py and scripts/lg_api_tool.py with new changes. - No updates to user-facing documentation or setup workflow. - Internal enhancements or bug fixes likely, but no changes affect end-user functionality.
Metadata
Slug lg-thinq-universal
Version 1.1.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 32
Frequently Asked Questions

What is Lg Thinq Universal?

Universal LG ThinQ device setup and control. Discovers appliances and generates secure device skills. It is an AI Agent Skill for Claude Code / OpenClaw, with 384 downloads so far.

How do I install Lg Thinq Universal?

Run "/install lg-thinq-universal" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Lg Thinq Universal free?

Yes, Lg Thinq Universal is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Lg Thinq Universal support?

Lg Thinq Universal is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Lg Thinq Universal?

It is built and maintained by Utkarsh Tiwari (@utkarshthedev); the current version is v1.1.0.

💬 Comments