本文へ移動
cccskills
無料GitHub で公開

documentation

Documentation structure and maintenance rules for the Megahub project. Use whenever making user-facing changes — adding features, changing behavior, fixing hardware compatibility, or modifying configuration. Describes which files to update, the README structure, and writing style.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Documentation — Megahub Project

File Map

FileAudienceMaintained byUpdate trigger
README.mdEnd users — builders, makers, beginnersAI (on every user-facing change)Any change to features, hardware support, configuration, or user workflow
BLOCKS.mdEnd users — visual programmersAuto-generated (npm run generate-docs in frontend/)Any Blockly block added, removed, or modified
HUBAPI.mdDevelopers using WiFi/REST modeHuman or AIAny REST endpoint added or changed in lib/hubwebserver/
LUMP.mdProtocol implementersHumanLEGO UART protocol changes only
CLAUDE.mdAI assistantHumanArchitecture changes, new conventions

Never edit BLOCKS.md manually — it is fully auto-generated and will be overwritten.


README.md Structure

The README is the primary user document. It must always contain these sections in this order:

1. Introduction (project overview, 2–3 sentences)
2. Key Features (bullet list — what the device can do)
3. Screenshots (visual overview — keep current)
4. Hardware Photos
5. Getting Started
   5a. Prerequisites
   5b. Building the Firmware
   5c. Flashing the Board
   5d. First Boot and Connection
6. Hardware Reference
   6a. LEGO Device Ports (ports 0–3, connector type, LUMP protocol)
   6b. GPIO Pins (FastLED pin options, SD card pins, I2C)
   6c. Supported LEGO Devices
7. Using the IDE
   7a. Connecting (BT mode — Web Bluetooth, supported browsers)
   7b. Creating a Project
   7c. Programming with Blockly
   7d. Running and Stopping Programs
   7e. Autostart
8. WiFi Mode
   8a. Switching from BT to WiFi
   8b. config.json format
   8c. Accessing the Web UI
9. Gamepad Support
   9a. Pairing a gamepad
   9b. Supported gamepads (8BitDo M30 tested)
   9c. Blockly blocks available
10. Hardware Features
    10a. LEGO Powered Up support
    10b. FastLED/NeoPixel addressable LEDs
    10c. IMU (MPU6050) — yaw/pitch/roll, acceleration
    10d. SD Card storage
11. Troubleshooting
    11a. Bluetooth not connecting
    11b. Device not found
    11c. LEGO device not responding
    11d. Serial monitor for debugging
12. Documentation (links to BLOCKS.md, HUBAPI.md, LUMP.md)
13. License / Contributing (if applicable)

Writing Style Rules

Audience: Makers and robotics enthusiasts. Assume they know hardware basics but not necessarily ESP32 or Bluetooth internals.

  • Active voice: "Click Connect" not "The Connect button should be clicked"
  • Concrete steps: Use numbered lists for procedures, not prose paragraphs
  • No jargon without explanation: "BLE (Bluetooth Low Energy)" on first use, then "BLE"
  • No internal implementation details: Users don't need to know about FreeRTOS tasks, GATTS, or lua_pcall(). Focus on what they can do, not how it works inside.
  • Code blocks for commands and config: Always use fenced code blocks
  • Present tense: "The device starts in Bluetooth mode" not "The device will start"
  • Remove stale "coming soon" notes: If a feature doesn't exist yet, don't mention it

Key Facts for README Content

Hardware (verified from source code)

LEGO ports: 4 ports (0–3), via SC16IS752 I2C-to-UART bridge. LEGO Powered Up UART protocol. Motor speed: -127 to +127.

FastLED GPIO options: 13, 16, 17, 25, 26, 27, 32, 33 (NeoPixel/WS2812B compatible)

SD card SPI pins: CLK=18, MOSI=23, MISO=19, CS=4

IMU outputs: YAW, PITCH, ROLL (degrees), ACCELERATION_X/Y/Z (m/s²). Update rate: 100ms.

Gamepad: Bluetooth Classic HID. 16 buttons, D-pad, 2 analog sticks (left/right X/Y, range -32768..32767). Tested: 8BitDo M30.

WiFi configuration (/config.json on SD card)

{
  "bluetoothEnabled": true,
  "wifiEnabled": false,
  "ssid": "YourNetwork",
  "pwd": "YourPassword"
}

WiFi web server runs on port 80. Default: BT mode.

Autostart (/autostart.json on SD card)

{ "project": "your-project-id" }

Set via the IDE (project list → autostart toggle). Persists across reboots.

Supported browsers (Web Bluetooth API)

Chrome, Edge, Opera — desktop only. Firefox and Safari are not supported.


Update Rules for AI

When making any code change, check:

  1. New feature or changed behavior → update the matching README section. Add the feature to "Key Features" if it's user-visible.
  2. New Blockly block → run npm run generate-docs in frontend/ to regenerate BLOCKS.md. Do not manually edit BLOCKS.md.
  3. New REST endpoint → update HUBAPI.md with the endpoint signature, request/response format, and example.
  4. New configuration option → update both README.md (user-facing explanation) and HUBAPI.md if it's exposed via API.
  5. Removed or renamed feature → remove stale references from README. Never leave "coming soon" for something that was dropped.
  6. Bug fix with user-visible impact → add to Troubleshooting if it was a common problem.

When updating README:

  • Keep existing sections intact unless they're wrong
  • Add new content in the correct section (use the structure above)
  • Do not restructure the whole document for a small change — find the right section and update it

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

ble

無料

Bluetooth context for the Megahub project. Use when working on BLE GATT server, Classic Bluetooth HID host, Web Bluetooth API integration, btremote library, connection handling, or any Bluetooth-related firmware code.

日本語の概要は準備中です。原文の説明を表示しています。

mirkosertic/Megahub72026年9月29日 更新

blockly

無料

Blockly visual programming context for the Megahub project. Use when adding, modifying, or debugging custom Blockly blocks, the Lua code generator, the toolbox, block colors, or the BLOCKS.md documentation generation script.

日本語の概要は準備中です。原文の説明を表示しています。

mirkosertic/Megahub72026年9月29日 更新

Core firmware context for the Megahub ESP32 project. Use when working on PlatformIO configuration, build scripts, library structure, main.cpp, or general ESP32 firmware development. Covers build system, project structure, common pitfalls, and debugging.

日本語の概要は準備中です。原文の説明を表示しています。

mirkosertic/Megahub72026年9月29日 更新

frontend

無料

Frontend development context for the Megahub project. Use when working on the web-based IDE, Vite build system, Blockly visual programming, Web Bluetooth API integration, JavaScript frontend code, CSS/styles, UI components, or anything in the /frontend/ directory.

日本語の概要は準備中です。原文の説明を表示しています。

mirkosertic/Megahub72026年9月29日 更新

LEGO Powered Up protocol context for the Megahub project. Use when working on LEGO device communication, lpfuart library, UART parsing, motor control, sensor modes, device initialization, or debugging UART noise/corruption issues.

日本語の概要は準備中です。原文の説明を表示しています。

mirkosertic/Megahub72026年9月29日 更新

linting

無料

Code formatting and linting context for the Megahub project. Use when writing or reviewing code in C++ or JavaScript, or when running format/lint checks. Describes tool commands, style conventions, and when to apply them.

日本語の概要は準備中です。原文の説明を表示しています。

mirkosertic/Megahub72026年9月29日 更新

mirkosertic のスキルをすべて見る

このスキルの問題を報告する