Skip to content
cccskills
FreePublished on GitHub

blockly-best-practices

Implement or modify Blockly/ABS programs using the project’s current board and installed libraries. Check only relevant library evidence, edit the canonical ABS source, sync it to the workspace, and run focused validation when needed.

OriginalShow the original description

Aily Blockly implementation workflow for scoped library evidence, ABS editing, workspace synchronization, and focused validation. Use for creating or modifying Blockly/ABS programs.

ailyProject/aily-blockly3,859 stars(GitHub 3,859 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Adding a feature to an existing Blockly program
  • Editing ABS source and syncing the workspace
  • Checking a focused build or syntax issue

Files included (1)

  • SKILL.md3.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Blockly Implementation Workflow

Use this skill only for implementing or modifying a Blockly/ABS program. Project selection and creation belong to the blockly-project-planning skill.

1. Start from runtime facts

  • Treat the injected project path, current board, installed library list, readme_ai.md references, and project.abs path as current runtime facts.
  • Do not call tools merely to rediscover those facts.
  • Treat project.abs as the canonical editable Blockly source. Generated .ino/C++ is derived output used for diagnostics, not the normal edit target.

2. Gather only task-relevant evidence

  • Identify the smallest set of libraries needed for the current feature. Do not inspect every installed library or add lib-core-* packages speculatively.
  • For each relevant installed library, call analyzeLibrary with mode="auto" first.
  • When it returns a readme_ai.md reference, read that file. The README is usually sufficient, but it is not an absolute stopping point.
  • If the README is missing, incomplete, contradictory, or does not answer the current question, escalate narrowly:
    1. inspect the relevant block.json for block types, fields, inputs, and args0 order;
    2. inspect generator.js only when generated-code semantics remain unclear;
    3. inspect the minimum native source needed only when underlying library behavior remains unresolved.
  • Stop reading once the evidence answers the current implementation question.

3. Resolve board facts through the board capability source

  • Use get_board_parameters for GPIO, ADC, PWM, UART, I2C, SPI, builtin LEDs, and other board defaults. Its board.json result is authoritative.
  • Pinmap data describes schematic terminals and connection geometry. Do not use it as the source of MCU capability or default-pin facts.
  • Use schematic/pinmap capabilities only when the request actually requires wiring or a connection diagram.

4. Edit the canonical ABS source

  1. Read project.abs directly. The host synchronizes the visible Blockly workspace to this file before a submitted turn.
  2. Use syncAbs action="export" only if the workspace may have changed after the turn began or a status check shows drift.
  3. Make the smallest coherent ABS edit. Preserve unrelated blocks and structure.
  4. Use syncAbs action="import" to apply the updated ABS to the visible workspace.
  5. Treat parse warnings, failed blocks, degraded text expressions, or partial imports as failed validation and repair them before continuing.

Load abs-syntax-reference when block argument order, statement inputs, nested value blocks, or other non-trivial ABS grammar is involved. Do not guess positional arguments; verify them from the selected library evidence.

5. Validate immediately

  • Check the imported workspace/ABS structure after a non-trivial change.
  • Run lint for generated-code syntax validation when appropriate.
  • Run buildProject when the task requires a compile result.
  • If validation fails, use the nearest error and the smallest relevant source as the next evidence anchor. Do not restart broad project exploration.

Completion criteria

  • The visible workspace reflects the intended ABS structure.
  • No ABS import warning or failed block remains.
  • Requested focused validation passes, or the remaining blocker is reported precisely.
  • Do not claim completion from compiler success alone when the Blockly import was partial or structurally degraded.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use this reference to write Aily Block Syntax (ABS), a text format for Blockly scripts. It explains block connections, parameter order, statement inputs, values, and variable references, with examples for conditions, loops, and Arduino program structure.

  • Check the correct order of block parameters
  • Write conditions and loops in ABS
  • Look up value and variable syntax for Blockly scripts
ailyProject/aily-blockly3.9KUpdated Oct 26, 2026

Plan a new Blockly hardware project by discovering suitable board and library packages, then comparing viable combinations. Each plan outlines wiring assumptions, workspace structure, implementation steps, and validation before the user confirms project creation.

  • Comparing boards for a new Blockly project
  • Planning libraries for a sensor or actuator
  • Reviewing wiring and validation assumptions
ailyProject/aily-blockly3.9KUpdated Oct 26, 2026

chronicle

FreeSummary

Search indexed chat history to find earlier decisions, tool activity, project summaries, files, and workflow tips. It can also rebuild the local history index when requested or when search results appear out of date.

  • Find a decision made in an earlier conversation
  • Check which tools were used for past work
  • Summarize recent project sessions
ailyProject/aily-blockly3.9KUpdated Oct 26, 2026

handoff

FreeSummary

Create a concise handoff document in the operating system’s temporary directory so another agent can continue the work. It summarizes the conversation, suggests relevant skills, references existing artifacts, and redacts sensitive information.

  • Hand ongoing work to another agent
  • Prepare context for a fresh session
  • Summarize progress without duplicating project artifacts
ailyProject/aily-blockly3.9KUpdated Oct 26, 2026

improve

FreeSummary

Survey a codebase and turn verified improvement opportunities into prioritized, self-contained implementation plans for another agent. It can assess bugs, security, performance, tests, technical debt, migrations, tooling, and product direction while keeping source code read-only.

  • Audit a codebase for high impact issues
  • Plan fixes for security or performance findings
  • Create a grounded roadmap for another agent
ailyProject/aily-blockly3.9KUpdated Oct 26, 2026

Follow a workflow for converting Arduino and ESP32 libraries into Aily Blockly libraries. The guide covers analyzing public APIs, defining blocks, generating code, configuring toolboxes, initializing Serial, I2C, and SPI, adapting boards, and packaging the result.

  • Convert an Arduino library for Aily Blockly
  • Design block definitions and generated code
  • Adapt a library to supported development boards
ailyProject/aily-blockly3.9KUpdated Oct 26, 2026

See all skills by ailyProject

Report a problem with this skill