鸿蒙代码工坊:面向 HarmonyOS 7 的全流程 ArkTS 编码 Skill

鸿蒙代码工坊是 SkillHub 社区 Skill(v6.2.0,@user_8c9419f3/harmonyos-code-workshop),面向 HarmonyOS 7(API 26)与 ArkTS+ArkUI,内置 9700+ 行知识库。核心包括 51+ 组废弃 API 检测、编译五维自检、40 个模板与 76 个 Kit 速查,并覆盖六大 Kit 实战、HSP 模块化与 CI/CD 上架等。本文说明其定位、能力与 SkillHub CLI 安装方式(含 Cursor、Claude Code 等 skills 目录),以及典型对话用法与注意事项;无需 API Key。

Read More
dsh-ohos-shell: Completing the Subprocess Runtime Environment on HarmonyOS/OpenHarmony

dsh-ohos-shell is a plugin for DeepSeek Harness targeted at HarmonyOS/OpenHarmony, designed to address subprocess runtime compatibility issues. By setting zsh environment variables, handling read-only /tmp and sandbox UID differences, and supplementing missing shell configurations, it ensures successful tool invocation. After installation, the plugin injects the harmonybrew environment into the process and provides the necessary function libraries, fixing the defect that the default system shell does not support standard configuration files.

Read More
dsh-harmonyos-hiboard: Pushing DSH Task Results to the HarmonyOS Negative One Screen

The DeepSeek Harness (DSH) plugin supports pushing local task results to the Huawei smartphone's "Minus One" screen for mobile viewing. It is compatible with dsh 0.1.5 / cordis 4 and supports Markdown rendering and table display. Installation can be performed via command line or configuration file, and an authorization code must be obtained on the phone. The plugin features a three-tier fallback mechanism to prevent card loss and provides three utility commands: card push, verification, and self-check. When using it, ensure the authorization code is kept secure, restart for changes to take effect, and pay attention to the special authentication-routing configuration.

Read More
DeepSeek Harness HarmonyOS Development Kit Plugin

DeepSeek Harness (DSH) provides the `dsh-deveco` plugin, which integrates a one-stop toolkit for HarmonyOS development. Its features include real-time log monitoring (HiLog), a Chrome DevTools-style ArkUI Inspector (with screenshot interaction, component tree view, and simulated operations), an ArkTS syntax highlighting viewer, and device management. The plugin supports agents invoking UI tree tools and allows configuring the DevEco Studio or CLT path. Restart DSH after installation, and note the requirements for version compatibility and debug source occupation limits.

Read More
DeepSeek Harness HarmonyOS Emulator Plugin

The `dsh-better-sidebar` plugin for DeepSeek Harness provides a sidebar tab with integrated HarmonyOS emulator management. It allows users to launch the emulator, build, and deploy HarmonyOS applications directly in the DSH environment, with multi-entry detection and real-time feedback. It provides six dedicated AI tools for emulator control, deployment, log viewing, and documentation retrieval. Installation requires Node.js, pnpm, DSH, and DevEco, and supports Windows, macOS, and Linux (with a desktop environment). This plugin significantly improves developer efficiency when developing HarmonyOS applications in Harness.

Read More
DeepSeek Harness Plugin: Push Task Completion Messages to Huawei's Negative One Screen

`dsh-hiboard-push` is a plugin for DeepSeek Harness (DSH) that synchronizes task completion messages to Huawei Hiboard (Negative One Screen) in real time. The plugin uses `authCode` for authentication and provides two tools: `hiboard_push` and `hiboard_verify`. `hiboard_push` can send cards containing a task's name, content, and status, supporting standard tasks, recurring tasks, and summary-only mode. Developers can install and configure the plugin via the terminal to enable visual synchronization of information between agents and mobile devices.

Read More
dsh-hdc-bridge: DSH Native HarmonyOS Development Assistant

dsh-hdc-bridge is a DSH client plugin maintained by 1na-ko, which reuses the local hdc binary to implement device-closed-loop debugging (screenshots, UI operations, package installation, and logs). It integrates the official client-style device panel and provides an offline Tier-1 official knowledge base (28 articles) along with an optional DevEco CLI build/sign/simulator channel. It has zero npm dependencies and is MIT licensed. Installation: dsh plugin --profile <name> add dsh-hdc-bridge.

Read More
HarmonyOS Application Development - Recording, Saving, and Playing Audio

Your code example demonstrates how to implement audio recording and playback functions in HarmonyOS. Below is a summary of the code and some improvement suggestions: ### Summary 1. **Permission Application**: - User authorization is required before starting audio recording. - The `requestPermissionsFromUser` method is used to obtain the user's permission. 2. **Recording Function**: - Use `startRecord` to begin audio recording and save the file to the specified path.

Read More
HarmonyOS Application Development - Recording Audio and Implementing Real - time Speech Recognition with WebSocket

Your code implements a complete example of real-time speech recognition using WebSocket. The following are some supplementary and optimization suggestions for the entire project to ensure robustness and maintainability. ### 1. Permission Check and Prompt When requesting permissions, more detailed prompt information can be provided, and reasonable operational suggestions can be given after the user refuses authorization, or guide the user to go to the settings page for manual authorization. ```javascript reqPermissionsAndRecord(permissions: Ar ```

Read More
HarmonyOS App Development - Customizable Deletable List Popup

This application implements a custom list popup window function, supporting task addition, deletion, and confirmation. The specific implementation is as follows: 1. **Entity Class**: The `Intention` class is used to define task items. 2. **Data Source Class** (`IntentionDataSource`): Manages data operations for the task list, including CRUD operations and notifying listeners of updates. 3. **Custom Popup Component** (`AddIntentionDialog`): Displays the current task list and provides delete and confirm buttons. (Note: The original text cuts off here, the translation assumes standard functionality continuation)

Read More
HarmonyOS Application Development - Imitating WeChat Chat Message List

This example demonstrates how to create a chat application interface similar to WeChat using ArkTS. The page structure includes a scrollable message list and a button to dynamically add new messages. The core code is as follows: 1. The `Msg` class defines the message type (sent or received). 2. The `MsgDataSource` class implements the data source interface, manages the message list, and provides add/delete operations. 3. The page uses the `List` component to display the message list, with `LazyForEach` to dynamically load new messages as the user scrolls.

Read More
HarmonyOS Application Development - Sending POST Request and Obtaining Result

This code is used to send data to the server via a POST request and parse the JSON response. The core functionalities include: 1. Using the `http.createHttp().request()` method to send asynchronous POST requests. 2. Setting request headers and the data to be sent. 3. Obtaining the response result and parsing it into JSON format. 4. Parsing the JSON data and extracting valid information to update the interface text. The code structure clearly demonstrates how to implement HTTP requests in a HarmonyOS application by setting state variables.

Read More
HarmonyOS Application Development - Playing Local Audio Files

This document introduces the implementation of audio playback functionality on HarmonyOS using the AVPlayer audio and video player. The main steps include: 1. Creating an `AVPlayer` instance and registering callback functions to handle state changes and errors; 2. Obtaining the local audio file path, opening the audio file through file system operations to get the file descriptor, and setting it to `AVPlayer` to trigger resource initialization; 3. Implementing state machine transition logic, from resource initialization to playback completion. This code snippet demonstrates how to implement audio playback using the ArkTS language under the Stage model.

Read More
HarmonyOS Application Development - Requesting Voice Synthesis Service to Obtain Audio File

This document describes a text-to-speech service implemented using HarmonyOS, which uploads text data and requests the server to return audio data. Key steps include creating HTTP requests, setting request headers and data bodies, processing response data, and saving it to a local file. The code example demonstrates how to integrate this functionality in an Ability, specifically implementing the download and saving of a .wav format voice file after the user inputs text. It should be noted that the service response type must be `application/octet-stream` to correctly obtain the audio stream, and this service is only applicable to... (The original text appears to be cut off here.)

Read More