Tencent Cloud Lighthouse
Paste the following prompt into your AI chat to install this skill:
Please follow the installation guide at https://skillhub.cn/install/skillhub.md to install @tencent-adm/tencentcloud-lighthouse-skill.
About this skill
The Problem It Solves
Managing Tencent Cloud Lighthouse instances via a web console is often cumbersome, especially for repetitive tasks like querying instances, monitoring metrics, or executing remote commands. Key pain points include:
- Manual operations that are inefficient and error-prone at scale.
- Complexity in credential management, with OAuth offering temporary security (expires in ~2 hours) and AK/SK keys posing permanent risks if misused.
- Frequent need to look up parameters (e.g., region codes, instance IDs) and API changes that can break legacy commands.
- Silent output corruption in messaging platforms (e.g., WeChat, Slack) where Markdown rendering strips underscores or asterisks from identifiers.
This skill addresses these issues by providing a structured command-line interface via the tccli CLI tool.
How the Skill Works
The skill leverages the tccli CLI to interact with Tencent Cloud Lighthouse APIs. Here’s a breakdown of its core capabilities and key steps:
Credential Setup and Security Prioritization
- OAuth Browser Login (Recommended): Uses the
script/tccli-oauth-helper.shscript for non-interactive authentication:
1. Run--statusto check existing credentials.
2. If expired or missing, execute--get-urlto generate a temporary authorization URL (valid for 10 minutes).
3. User logs in via the browser and copies a base64 code, then run--codewith that code to complete login.
4. Verify withtccli lighthouse DescribeRegions. - AK/SK Key Pair: Only used if the user explicitly provides
SecretIdandSecretKey, suitable for cases requiring permanent credentials. - OAuth is the default to minimize security risks from long-lived keys.
Instance Operations and Core Commands
The skill offers quick-reference commands for common tasks:
- Query and Listing:
- tccli lighthouse DescribeInstances --region <region>: List all instances.
- tccli lighthouse DescribeInstances --region <region> --InstanceIds '["lhins-xxx"]': Get details for specific instances.
- Security and Monitoring:
- tccli lighthouse DescribeFirewallRules --region <region> --InstanceId <instance-id>: Inspect firewall rules.
- tccli monitor GetMonitorData --Namespace QCE/LIGHT_HOUSE ...: Retrieve monitoring data.
- Remote Management:
- tccli tat RunCommand --region <region> --InstanceIds '["lhins-xxx"]' --Content "...": Execute commands on instances.
- Snapshots and Traffic:
- tccli lighthouse DescribeSnapshots --region <region>: Manage snapshots.
- tccli lighthouse DescribeInstancesTrafficPackages --region <region> --InstanceIds '["lhins-xxx"]': Check traffic packages.
Operational Safety and Verification Steps
- Region Mandatory: All operations except
DescribeRegionsrequire the--regionparameter. - Query Before Modify: Always run
Describecommands before any creation or deletion to avoid blind actions. - Use Real IDs: Obtain
InstanceIdfromDescribeInstances; never use placeholders. - Parameter Verification: Run
--help(e.g.,tccli lighthouse <Action> --help) to confirm parameter names and formats. - Risk-Based Confirmation: High-risk operations (e.g., deleting instances, applying snapshots) require double confirmation; medium-risk operations (e.g., stopping instances, modifying firewalls) require single confirmation.
Applicable Boundaries and Considerations
- Technical Dependencies: Requires
tcclipre-installed (viapip install tccli), and credentials have limited validity (OAuth expires in ~2 hours). - API Compatibility: Lighthouse and CVM are separate products—never mix their APIs. Always verify parameters with
--helpto avoid errors from API updates. - Output Channel Compatibility: When outputting to messaging platforms:
- Replace underscores
_with%5Fin URLs (e.g., OAuth authorization parameters). - Wrap CLI or script output in code blocks (triple backticks) to prevent Markdown parsing from corrupting identifiers.
- Avoid bare underscores or asterisks in plain text; use inline code (e.g.,
instance_name) for sensitive terms. - Verification Limits: OAuth credentials do not support validation via
tccli sts GetCallerIdentity; prefer lightweight commands likeDescribeRegions. - Creation Means New: When a user requests to "create" or "deploy" a server, default to creating a new instance unless an existing instance ID is explicitly specified.
Use Cases
- When an operations engineer needs to quickly batch-query the running status, IP addresses, and operating system information of multiple Lighthouse instances via a single command-line call.
- Before deploying a new service, a developer must inspect the firewall rules on a target server to confirm that ports 80 or 443 are open for public access.
- When a monitoring alert triggers, the ops team needs to immediately pull CPU usage, memory consumption, and outbound traffic data for the past hour on a specific instance for root-cause analysis.
- When security patches or deployment scripts must be uniformly executed across multiple servers, use the remote command feature to batch-run specified script content.
Best For
- An operations engineer responsible for daily inspections and troubleshooting on multiple Tencent Cloud Lighthouse instances, needing quick query and batch operations.
- A development engineer managing application deployments and server security configurations, who uses command-line tools to set firewall rules and monitor resources for service stability.
- A cloud resource administrator who regularly audits server snapshots and traffic usage to optimize costs, relying on automated scripts for periodic checks and reporting.
- A DevOps engineer orchestrating cloud resources with automation toolchains (e.g., Terraform or custom scripts), requiring integration of server management into CI/CD pipelines.
Related Skills
An independent tool risk query layer for evaluating the security risks of Chinese Agent tools before installation, providing information on permission transparency, privacy direction, and author reputation.
Provides comprehensive operations for Tencent Cloud Object Storage (COS) and Data Processing (CI) via a unified Node.js SDK, covering file management, media processing, AI analysis, and knowledge base construction.
Performs layered security audits and risk assessments for Skills, covering static auditing, behavioral emulation, and supply chain tracing.