cross-device-apply

Applies CDP batches to code edits, runs workspace verification, and pushes results.

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/lechao365/AndroidSystemEnhance --skill cross-device-apply-lechao365
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cross-device-apply
Source: https://github.com/lechao365/AndroidSystemEnhance/tree/main/harness/skills/cross-device/cross-device-apply
Command: npx skills add https://github.com/lechao365/AndroidSystemEnhance --skill cross-device-apply-lechao365

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Coordinating cross-device code changes between a development repository and a build workspace is error-prone: batches must be validated against the current HEAD, edits applied to the right files, verification run on real hardware, and results pushed with receipts. This Skill automates that entire apply-side pipeline. ## Core Features & Use Cases - Batch parsing and gating: Parses CDP batches with base-commit rejection (exit 18 on mismatch), branch and clean-tree prechecks, and budget enforcement. - Structured editing with validation: Applies full-file edits for new files and hunk-level edits for diff files, validated by cdp_validate_patch.py, with AI self-healing retries (up to 3 attempts). - Verification and push orchestration: Triggers workspace-verify via loop-engineering for board testing, writes pass/fail/skip receipts with per-direction self-reports, and pushes everything through git-works-push. - Use Case: A developer pastes a CDP batch from the emit side; the Skill validates the base commit, edits code/rpi5 kernel and AOSP files, regenerates the manifest, runs on-device verification, and pushes the commit with timing receipts. ## Quick Start Paste a CDP batch from the emit side and ask the AI to apply it to the code repository, verify on the workspace, and push the results.

Frequently Asked Questions about cross-device-apply

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply a CDP batch to my code repository?

Paste the CDP batch text and the Skill saves it to a timestamped file, runs prechecks (dev branch, clean tree, base match), edits the code directories, then triggers workspace verification and pushes the result with receipts.

What happens when the batch base commit does not match HEAD?

The precheck compares the batch base against the local HEAD's first 12 characters. On mismatch, cdp_parse exits with code 18 and the entire batch is rejected back to the emit side for regeneration.

Can this Skill run outside the apply-side WSL2 machine?

No. It is restricted to the apply device (local WSL2) because it requires access to both the build workspace and the development board for verification steps.

Why does verification failure still get pushed?

Failed verification receipts are intentionally pushed so the emit side can analyze the failure. The receipt contains the CDP original text, failure context, and per-direction self-reports for diagnosis.

How are diff file edits validated?

Edited .diff files are passed to cdp_validate_patch.py in a single call. Apply-semantic validation is deferred to sync_code_to_workspace.py, which runs git apply --check after checking out the base to avoid false failures.