Skip to content

Add Android skills doc for Claude Code#18248

Open
Copilot wants to merge 2 commits intomainfrom
copilot/create-skills-md-doc
Open

Add Android skills doc for Claude Code#18248
Copilot wants to merge 2 commits intomainfrom
copilot/create-skills-md-doc

Conversation

Copy link
Contributor

Copilot AI commented Mar 17, 2026

Summary

Adds .claude/skills/android/SKILL.md — a skills reference doc for the Android codebase, following the same format as existing skills (building, cortex-m, binary-size, etc.).

Covers:

  • Architecture — Java/Kotlin API → fbjni JNI → C++ runtime stack
  • Key files — All major sources across extension/android/ (Java API, JNI layer, build configs)
  • API usageModule, Tensor, EValue, LlmModule with code examples
  • JNI conventionsthrowExecutorchException vs setExecutorchPendingException, thread safety, symbol visibility
  • Build — AAR build flow, backend selection flags, custom JNI library linkage
  • Testing — Unit tests, instrumentation tests, E2E golden model pattern, Spotless formatting
  • Troubleshooting — Common issues table (NDK/SDK setup, fbjni mismatch, missing ops, buffer errors)

Test plan

Documentation-only change. Verified markdown renders correctly and all referenced file paths, class names, method signatures, and build flags match the current codebase.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 17, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18248

Note: Links to docs will display an error until the docs builds have been completed.

⚠️ 1 Awaiting Approval, 3 Unrelated Failures

As of commit f7a0a44 with merge base 043a3a1 (image):

AWAITING APPROVAL - The following workflow needs approval before CI can run:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 17, 2026
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
Copilot AI changed the title [WIP] Add skills documentation for Android code base Add Android skills doc for Claude Code Mar 17, 2026
Copilot AI requested a review from kirklandsign March 17, 2026 20:19
@kirklandsign kirklandsign requested review from Copilot and removed request for kirklandsign March 17, 2026 20:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Android “skill” reference doc under .claude/skills/ to guide work on the Android bindings/JNI layer in extension/android/.

Changes:

  • Introduces .claude/skills/android/SKILL.md describing Android architecture, key files, API usage, build/testing flows, and troubleshooting notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +121 to +122
- **HybridClass methods** (called from fbjni): use `throwExecutorchException(errorCode, details)` for errors.
- **Plain JNIEXPORT functions**: use `setExecutorchPendingException(env, code, details)` instead — defined in `jni_helper.h`.
DType dtype = t.dtype();
```

Supported dtypes: `UINT8`, `INT8`, `INT32`, `INT64`, `FLOAT16`, `FLOAT32`, `FLOAT64`.
Comment on lines +148 to +159
### Backend selection (CMake flags in build script)
| Flag | Default | Backend |
|------|---------|---------|
| `EXECUTORCH_BUILD_XNNPACK` | ON (via preset) | XNNPACK CPU |
| `EXECUTORCH_BUILD_QNN` | ON if `QNN_SDK_ROOT` set | Qualcomm QNN |
| `EXECUTORCH_BUILD_VULKAN` | OFF | Vulkan GPU |
| `EXECUTORCH_BUILD_NEURON` | ON if `NEURON_BUFFER_ALLOCATOR_LIB` set | MediaTek Neuron |
| `EXECUTORCH_BUILD_EXTENSION_LLM` | ON | LLM runner (Llama) |
| `EXECUTORCH_BUILD_LLAMA_JNI` | ON | LLM + ASR JNI bindings |
| `EXECUTORCH_BUILD_EXTENSION_TRAINING` | ON | Training support |
| `EXECUTORCH_ANDROID_PROFILING` | OFF | ETDump profiling |

@kirklandsign kirklandsign marked this pull request as ready for review March 17, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants